Uploaded image for project: 'Application Server 7'
  1. Application Server 7
  2. AS7-3280

Dependency attribute optional="true" is ignored for deployment modules

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 7.1.0.Final
    • 7.1.0.CR1b
    • Class Loading
    • None
    • Hide

      Replace https://github.com/jbossas/quickstart/blob/master/log4jdemo/src/main/webapp/WEB-INF/jboss-deployment-structure.xml with the content below.

      <jboss-deployment-structure>
        <deployment>
          <dependencies>
            <module name="org.apache.log4j" />
            <module name="deployment.not-yet-existing.jar" optional="true" />
          </dependencies>
        </deployment>
      </jboss-deployment-structure>
      

      Build and deploy the modified log4jdemo quickstart.

      Show
      Replace https://github.com/jbossas/quickstart/blob/master/log4jdemo/src/main/webapp/WEB-INF/jboss-deployment-structure.xml with the content below. <jboss-deployment-structure> <deployment> <dependencies> <module name= "org.apache.log4j" /> <module name= "deployment.not-yet-existing.jar" optional= "true" /> </dependencies> </deployment> </jboss-deployment-structure> Build and deploy the modified log4jdemo quickstart.

    Description

      Setting optional="true" on a deployment module dependency in jboss-deployment-structure.xml is ignored. Allthough the dependency is declared as optional the dependent WAR fails when the optional dependency isn't present.

      The issue is not limited to subdeployment dependencyies (as described in AS7-2832) or additional dependencies (as described in https://community.jboss.org/message/646012). Even the simple form of optional dependency inclusion fails for deployment modules:

      <jboss-deployment-structure>
        <deployment>
          <dependencies>
            <module name="org.apache.log4j" />
            <module name="deployment.not-yet-existing.jar" optional="true" />
          </dependencies>
        </deployment>
      </jboss-deployment-structure>
      
      07:05:02,550 INFO  [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report
      JBAS014775:    New missing/unsatisfied dependencies:
         service jboss.module.spec.service."deployment.not-yet-existing.jar".main (missing) 
         dependents: [service jboss.deployment.unit."jboss-as-log4jdemo.war".POST_MODULE, service jboss.module.service."deployment.jboss-as-log4jdemo.war".main] 
      

      Attachments

        Issue Links

          Activity

            People

              sdouglas1@redhat.com Stuart Douglas
              r.reimann_jira Robert Reimann (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: