JBoss Community

Maven plugin classpath woes

created by Douglas Palmer in JBoss AOP - View the full discussion

Hi


I am currently trying to move the JBoss ESB build from ant to maven. In the ant build we use the aopc ant task modify an external jar (which is one of the project dependencies); I am having problems replicating this with the maven aop plugin. I have the maven plugin configured as follows:

 

      <plugin>
        <groupId>org.jboss.maven.plugins</groupId>
        <artifactId>maven-jbossaop-plugin</artifactId>
        <version>2.1.3.GA</version>
        <executions>
          <execution>
            <id>compile</id>
            <configuration>
              <aoppaths>
                <aoppath>src/main/resources/jboss-aop.xml</aoppath>
              </aoppaths>
              <classPath>${project.build.outputDirectory}:${maven.plugin.classpath}:${maven.compile.classpath}</classPath>
              <includeProjectDependency>true</includeProjectDependency>
              <includes>
                <include>com/eviware/soapui/impl/wsdl/support/wsdl/WsdlContext\$Loader.class</include>
              </includes>
            </configuration>
            <goals>
              <goal>compile</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>

        <groupId>org.jboss.maven.plugins</groupId>

        <artifactId>maven-jbossaop-plugin</artifactId>

        <version>2.1.3.GA</version>

        <executions>

          <execution>

            <id>compile</id>

            <configuration>

              <aoppaths>

                <aoppath>src/main/resources/jboss-aop.xml</aoppath>

              </aoppaths>

              <includeProjectDependency>true</includeProjectDependency>

              <includes>

                <include>com/eviware/soapui/impl/wsdl/support/wsdl/WsdlContext\$Loader.class</include>

              </includes>

            </configuration>

            <goals>

              <goal>compile</goal>

            </goals>

          </execution>

        </executions>

      </plugin>

From this configuration the aop plugin generates the following command:

 

java -cp /home/dpalmer/.m2/repository/org/codehaus/plexus/plexus-utils/1.4.9/plexus-utils-1.4.9.jar:/home/dpalmer/.m2/repository/org/apache/maven/plugins/maven-surefire-plugin/2.4/maven-surefire-plugin-2.4.jar:/home/dpalmer/.m2/repository/org/apache/maven/surefire/surefire-booter/2.4/surefire-booter-2.4.jar:/home/dpalmer/.m2/repository/org/apache/maven/surefire/surefire-api/2.4/surefire-api-2.4.jar:/home/dpalmer/.m2/repository/org/jboss/aop/jboss-aop/2.1.3.GA/jboss-aop-2.1.3.GA.jar:/home/dpalmer/.m2/repository/org/apache/ant/ant/1.7.0/ant-1.7.0.jar:/home/dpalmer/.m2/repository/org/apache/ant/ant-launcher/1.7.0/ant-launcher-1.7.0.jar:/home/dpalmer/.m2/repository/javassist/javassist/3.10.0.GA/javassist-3.10.0.GA.jar:/home/dpalmer/.m2/repository/org/jboss/jboss-reflect/2.0.2.GA/jboss-reflect-2.0.2.GA.jar:/home/dpalmer/.m2/repository/org/jboss/logging/jboss-logging-spi/2.0.5.GA/jboss-logging-spi-2.0.5.GA.jar:/home/dpalmer/.m2/repository/org/jboss/jboss-common-core/2.2.11.GA/jboss-common-core-2.2.11.GA.jar:/home/dpalmer/.m2/repository/org/jboss/jboss-mdr/2.0.1.GA/jboss-mdr-2.0.1.GA.jar:/home/dpalmer/.m2/repository/trove/trove/2.1.1/trove-2.1.1.jar:/home/dpalmer/.m2/repository/org/jboss/logging/jboss-logging-log4j/2.0.5.GA/jboss-logging-log4j-2.0.5.GA.jar:/usr/local/maven/maven_home/lib/maven-2.2.1-uber.jar:/usr/local/maven/maven_home/lib/maven-2.2.1-uber.jar:/home/dpalmer/Work/ESB/checkouts/branches/dpalmer/JBESB_4_9_CP/product/services/soapui-client/soapui/../../../lib/ext/soapui-1.7.1.jar:/home/dpalmer/.m2/repository/eviware/soapui-xmlbeans/1.7/soapui-xmlbeans-1.7.jar:/home/dpalmer/.m2/repository/eviware/soap-xmlbeans/1.2/soap-xmlbeans-1.2.jar:/home/dpalmer/.m2/repository/xmlbeans/xbean/2.2.0/xbean-2.2.0.jar:/home/dpalmer/.m2/repository/log4j/log4j/1.2.14/log4j-1.2.14.jar:/home/dpalmer/.m2/repository/wsdl4j/wsdl4j/1.6.2/wsdl4j-1.6.2.jar:/home/dpalmer/.m2/repository/org/jboss/soa/esb/aop/4.9.SNAPSHOT/aop-4.9.SNAPSHOT.jar:/home/dpalmer/Work/ESB/checkouts/branches/dpalmer/JBESB_4_9_CP/product/services/soapui-client/soapui/target/classes org.jboss.aop.standalone.Compiler -verbose -suppress -aoppath /home/dpalmer/Work/ESB/checkouts/branches/dpalmer/JBESB_4_9_CP/product/services/soapui-client/soapui/src/main/resources/jboss-aop.xml /home/dpalmer/Work/ESB/checkouts/branches/dpalmer/JBESB_4_9_CP/product/services/soapui-client/soapui/target/classes/com/eviware/soapui/impl/wsdl/support/wsdl/WsdlContext\$Loader.class

 

This fails with:

 

Trying to compile /home/dpalmer/Work/ESB/checkouts/branches/dpalmer/JBESB_4_9_CP/product/services/soapui-client/soapui/target/classes/com/eviware/soapui/impl/wsdl/support/wsdl/WsdlContext$Loader.class and found it also within file:/home/dpalmer/Work/ESB/checkouts/branches/dpalmer/JBESB_4_9_CP/product/lib/ext/soapui-1.7.1.jar!/com/eviware/soapui/impl/wsdl/support/wsdl/WsdlContext$Loader.class will not proceed.

 

However, if I move the classpath entry for my project.build.outputDirectory from the end of the classpath to the start of the classpath then the aop compile succeeds. Is it possible to change the order of the classpath entries? Or have I configure this incorrectly?

 

Regards

Doug

Reply to this message by going to Community

Start a new discussion in JBoss AOP at Community