You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Herve FARGETON (JIRA)" <ji...@codehaus.org> on 2008/09/17 14:15:49 UTC
[jira] Created: (MNG-3754) Plugin classloader don't use global
classloader on ant task
Plugin classloader don't use global classloader on ant task
-----------------------------------------------------------
Key: MNG-3754
URL: http://jira.codehaus.org/browse/MNG-3754
Project: Maven 2
Issue Type: Bug
Components: Ant tasks, Plugin API
Affects Versions: 2.0.9, 2.0.8
Environment: Java version: 1.4.2_08
OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows"
Reporter: Herve FARGETON
I try to execute the Java2WsdlAntTask of Axis 1.4 Ant package.
Using axis-ant, commons-logging and commons-discovery dependencies under plugin configuration (under <project><build><plugins><plugin><dependencies><dependency>), I find this exception : java.lang.NoClassDefFoundError: org/apache/axis/encoding/TypeMappingRegistry. It means that classes of Axis, put as global dependencies, are not visible while executing the Ant task.
When I put axis-ant, commons-logging and commons-discovery as global dependencies (under <project><dependencies><dependency>, same level as axis API), it works well.
POM extract to generate NoClassDefFoundError :
...
<dependencies>
<dependency>
<groupId>axis</groupId>
<artifactId>axis</artifactId>
<version>1.4</version>
</dependency>
...
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.2</version>
<dependencies>
<dependency>
<groupId>org.apache.axis</groupId>
<artifactId>axis-ant</artifactId>
<version>1.4</version>
<scope></scope>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>commons-discovery</groupId>
<artifactId>commons-discovery</artifactId>
<version>0.4</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>generate-webservice</id>
<phase>generate-sources</phase>
<configuration>
<tasks>
<property name="compile_classpath" refid="maven.compile.classpath"/>
<echo message="compile classpath: ${compile_classpath}"/>
<echo message="Appel de la tache axis-wsdl2java" />
<taskdef name="axis-wsdl2java" classname="org.apache.axis.tools.ant.wsdl.Java2WsdlAntTask">
<classpath>
<path location="maven.compile.classpath"/>
</classpath>
</taskdef>
<axis-wsdl2java output="${project.output}" url="...">
</axis-wsdl2java>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
...
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Moved: (MANTRUN-124) Plugin classloader don't use global
classloader on ant task
Posted by "Paul Gier (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MANTRUN-124?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul Gier moved MANTTASKS-120 to MANTRUN-124:
---------------------------------------------
Key: MANTRUN-124 (was: MANTTASKS-120)
Project: Maven 2.x Antrun Plugin (was: Maven 2.x Ant Tasks)
> Plugin classloader don't use global classloader on ant task
> -----------------------------------------------------------
>
> Key: MANTRUN-124
> URL: http://jira.codehaus.org/browse/MANTRUN-124
> Project: Maven 2.x Antrun Plugin
> Issue Type: Bug
> Environment: Java version: 1.4.2_08
> OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows"
> Reporter: Herve FARGETON
>
> I try to execute the Java2WsdlAntTask of Axis 1.4 Ant package.
> Using axis-ant, commons-logging and commons-discovery dependencies under plugin configuration (under <project><build><plugins><plugin><dependencies><dependency>), I find this exception : java.lang.NoClassDefFoundError: org/apache/axis/encoding/TypeMappingRegistry. It means that classes of Axis, put as global dependencies, are not visible while executing the Ant task.
> When I put axis-ant, commons-logging and commons-discovery as global dependencies (under <project><dependencies><dependency>, same level as axis API), it works well.
> POM extract to generate NoClassDefFoundError :
> ...
> <dependencies>
> <dependency>
> <groupId>axis</groupId>
> <artifactId>axis</artifactId>
> <version>1.4</version>
> </dependency>
> ...
> </dependencies>
> <build>
> <plugins>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-antrun-plugin</artifactId>
> <version>1.2</version>
> <dependencies>
> <dependency>
> <groupId>org.apache.axis</groupId>
> <artifactId>axis-ant</artifactId>
> <version>1.4</version>
> <scope></scope>
> </dependency>
> <dependency>
> <groupId>commons-logging</groupId>
> <artifactId>commons-logging</artifactId>
> <version>1.1.1</version>
> </dependency>
> <dependency>
> <groupId>commons-discovery</groupId>
> <artifactId>commons-discovery</artifactId>
> <version>0.4</version>
> </dependency>
> </dependencies>
> <executions>
> <execution>
> <id>generate-webservice</id>
> <phase>generate-sources</phase>
> <configuration>
> <tasks>
> <property name="compile_classpath" refid="maven.compile.classpath"/>
> <echo message="compile classpath: ${compile_classpath}"/>
> <echo message="Appel de la tache axis-wsdl2java" />
> <taskdef name="axis-wsdl2java" classname="org.apache.axis.tools.ant.wsdl.Java2WsdlAntTask">
> <classpath>
> <path location="maven.compile.classpath"/>
> </classpath>
> </taskdef>
>
> <axis-wsdl2java output="${project.output}" url="...">
> </axis-wsdl2java>
> </tasks>
> </configuration>
> <goals>
> <goal>run</goal>
> </goals>
> </execution>
> </executions>
> </plugin>
> </plugins>
> </build>
> ...
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira