2 Replies Latest reply: Nov 29, 2011 7:43 AM by Radim Hanus RSS

optional module dependency doesn't work in a specific scenario

Radim Hanus Apprentice

Hi,

 

I'm just migrating relatively complicated deployment schema to jboss7 and I have a problem with subdeployment optional module dependency

/jboss-deployment-structure/sub-deployment/dependencies/module[@optional]

 

a fragment of my deployment schema:

- project.ear

-- app.war

- service.sar

 

project.ear/META-INF/jboss-deployment-structure.xml:

<jboss-deployment-structure>

  <ear-subdeployments-isolated>false</ear-subdeployments-isolated>

  <deployment>

    <dependencies>

      ...

    </dependencies>

  </deployment>

  <sub-deployment name="app.war">

     <dependencies>

        <module name="deployment.service.sar" optional="true"/>

          ...

 

if service.sar is not available then project.ear isn't deployed regardless of referenced optional dependency:

 

21:44:15,874 ERROR [org.jboss.as.deployment] (DeploymentScanner-threads - 1) {"Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"Services with missing/unavailable dependencies" => ["jboss.deployment.unit.\"project.ear\".POST_MODULE missing [ jboss.module.spec.service.\"deployment.project.ear.app.war\".main ]","jboss.deployment.subunit.\"project.ear\".\"app.war\".CONFIGURE_MODULE missing [ jboss.module.information.service.\"deployment.service.sar\".main ]"]}}}

 

thanks for any hint,

Radim