2 Replies Latest reply on Jun 21, 2010 6:09 PM by dknox

    Ant Requirement for JBossWeb HttpService

    dknox

      The dependency:

      <dependency>
           <groupId>jboss.web</groupId>
           <artifactId>jbossweb</artifactId>
           <version>3.0.0-beta-2</version>
         </dependency>

      contains these classes:

      org/apache/catalina/ant/AbstractCatalinaTask.class
      org/apache/catalina/ant/BaseRedirectorHelperTask.class
      org/apache/catalina/ant/DeployTask.class
      org/apache/catalina/ant/InstallTask.class
      org/apache/catalina/ant/JKStatusUpdateTask.class
      org/apache/catalina/ant/JMXGetTask.class
      org/apache/catalina/ant/JMXQueryTask.class
      org/apache/catalina/ant/JMXSetTask.class
      org/apache/catalina/ant/ListTask.class
      org/apache/catalina/ant/ReloadTask.class
      org/apache/catalina/ant/RemoveTask.class
      org/apache/catalina/ant/ResourcesTask.class
      org/apache/catalina/ant/ServerinfoTask.class
      org/apache/catalina/ant/SessionsTask.class
      org/apache/catalina/ant/StartTask.class
      org/apache/catalina/ant/StopTask.class
      org/apache/catalina/ant/UndeployTask.class
      org/apache/catalina/ant/ValidatorTask.class
      org/apache/catalina/ant/jmx/Arg.class
      org/apache/catalina/ant/jmx/JMXAccessorCondition.class
      org/apache/catalina/ant/jmx/JMXAccessorCreateTask.class
      org/apache/catalina/ant/jmx/JMXAccessorEqualsCondition.class
      org/apache/catalina/ant/jmx/JMXAccessorGetTask.class
      org/apache/catalina/ant/jmx/JMXAccessorInvokeTask.class
      org/apache/catalina/ant/jmx/JMXAccessorQueryTask.class
      org/apache/catalina/ant/jmx/JMXAccessorSetTask.class
      org/apache/catalina/ant/jmx/JMXAccessorTask.class
      org/apache/catalina/ant/jmx/JMXAccessorUnregisterTask.class

       

      .. which import org.apache.tools.ant.

      Maven reports a unresolved constraint for org.apache.tools.ant from org.apache.catalina.ant. The constraint is resolved by <Import-Package>org.apache.tools.ant*</Import-Package> in the bundle/pom.xml

        • 1. Re: Ant Requirement for JBossWeb HttpService
          thomas.diesler

          How does mvn report the missing dependency? At runtime or compile time?

           

          The reason is likely that jbossweb provides insufficient metadata in its pom (e.g. https://repository.jboss.org/nexus/content/groups/public/jboss/web/jbossweb/3.0.0-beta-5/jbossweb-3.0.0-beta-5.pom)

           

          There is no information given on transitive dependencies. This should be addressed in jbossweb so that this can get fixed in future. Could you please create a jira for that and post the link here? The point is that a consumer of jbossweb (i.e. jbosgi-http) should not be forced to know the complete set of jbossweb's transitive dependencies. It breaks the rules of modularity when you force clients to include your transitive dependencies as their top-level dependencies.

           

          To give an example: project foo-1.0 depends on bar-2.0 but does not declare it in the pom. Project baz wants to use foo but cant without also declaring a dependency on bar, the version of which can only be guessed and is likely to get outdated or incorrect when baz updates foo to a later version.

           

          I'd like to know whether the dependency on ant is in scope compile, provided, test or something else. Naturally, I'd get this info from the pom, which in the case of jbossweb is insufficient.

          • 2. Re: Ant Requirement for JBossWeb HttpService
            dknox

            The dependency first came to notice during compile. It is reported as a Constraint error.

             

            A JIRA for this is at https://jira.jboss.org/browse/JBWEB-170