Seems to be realted to the allready known issue MANTRUN-63.
Putting all my antrun dependencies in the parent pom pluginManagement solves this, This is a workaround, but cannot be used if incompatible classpath are required for multiple antrun executions. Nico. 2007/11/12, nicolas de loof <[EMAIL PROTECTED]>: > > Here is a sample 2-modules project that demonstrates the issue : > > The first module use the antrun plugin with custom dependencies and dump > the plugin classpaht. > The second module also use antrun with different dependencies and dump its > classpath. > > When running mvn install, same classpath is output for both modules : > > [INFO] > ---------------------------------------------------------------------------- > [INFO] Building Unnamed - test:antrun-1:jar:1 > [INFO] task-segment: [install] > [INFO] > ---------------------------------------------------------------------------- > [INFO] [antrun:run {execution: antrun-1}] > [INFO] Executing tasks > [echo] plugin classpath: ...ant- 1.6.5.jar;...ant-contrib-1.0b2.jar > ;...plexus-utils\1.1\plexus-utils-1.1.jar;...ant-launcher-1.6.5.jar > ;...maven-core-2.0.7-uber.jar > > [INFO] > ---------------------------------------------------------------------------- > > [INFO] Building Unnamed - test:antrun-2:jar:1 > [INFO] task-segment: [install] > [INFO] > ---------------------------------------------------------------------------- > [INFO] [antrun:run {execution: antrun-2}] > [INFO] Executing tasks > [echo] plugin classpath: ...ant-1.6.5.jar;...ant-contrib-1.0b2.jar > ;...plexus-utils\1.1\plexus-utils-1.1.jar;...ant-launcher-1.6.5.jar > ;...maven-core-2.0.7-uber.jar > > This makes antrun-2 fail : > > [INFO] Error executing ant tasks > Embedded error: taskdef class org.castor.anttask.CastorCodeGenTask cannot > be found > > > Nico. > > > 2007/11/9, nicolas de loof <[EMAIL PROTECTED]>: > > > > parent (POM) - no plugin used > > |- module1 : antrun for sql2java, with custom plugin <dependencies> > > |- module 2 (depends on module1) : antrun for castor, with custom plugin > > <dependencies> > > > > module2 fails, and antrun classpath is set to modul1 configuration > > > > I'll try to setup a demonstation project for this issue > > > > > > 2007/11/9, Roland Asmann < [EMAIL PROTECTED]>: > > > > > > And the ant-run is defined in the parent? Or in the separate modules? > > > > > > > > > On Friday 09 November 2007 16:47, nicolas de loof wrote: > > > > Not the case. > > > > I only have a parent pom to group modules, and all modules are on > > > the same > > > > hierarchival level. > > > > > > > > 2007/11/9, Roland Asmann <[EMAIL PROTECTED]>: > > > > > If one of the ant-runs is defined in a parent to the other, try > > > adding > > > > > <inherited>false</inherited>... > > > > > > > > > > On Friday 09 November 2007 16:15, nicolas de loof wrote: > > > > > > Here is my antrun configuration. As you can see, I'm setting > > > some > > > > > > plugin dependencies. > > > > > > I'm also using antrun in another module to run a java command > > > line > > > > > > class from sql2java, set as plugin dependency. > > > > > > > > > > > > On the second antrun execution, it's classpath is set from the > > > first > > > > > > one (sql2java) and not the expected dependencies. > > > > > > > > > > > > > > > > > > <plugin> > > > > > > <artifactId>maven-antrun-plugin</artifactId> > > > > > > <version>1.1</version> > > > > > > <executions> > > > > > > <execution> > > > > > > <id>castor</id> > > > > > > <phase>generate-sources</phase> > > > > > > <configuration> > > > > > > <tasks> > > > > > > <taskdef > > > > > > > > > resource="net/sf/antcontrib/antcontrib.properties" /> > > > > > > <taskdef name="castor-srcgen" > > > > > > classname=" > > > > > > org.exolab.castor.tools.ant.taskdefs.CastorSourceGenTask" > > > > > > classpathref=" maven.plugin.classpath" /> > > > > > > <available > > > > > > > > > > > > file="${project.build.directory}/generated-sources/castor" > > > > > > property=" file.exists" value="true" /> > > > > > > <if> > > > > > > <not> > > > > > > <isset property="file.exists" /> > > > > > > </not> > > > > > > <then> > > > > > > <mkdir > > > > > > > > > > > > dir="${project.build.directory}/generated-sources/castor" /> > > > > > > <castor-srcgen > > > > > > > > > file="${basedir}/src/xsd/SchemaCdeAcces.xsd" > > > > > > > > > > > > package="sfr.hamlet.commande.daoxml.SchemaCdeAcces > > > > > > > > > > " > > > > > > > > > > > todir="${project.build.directory}/generated-sources/castor" > > > > > > /> > > > > > > </then> > > > > > > </if> > > > > > > </tasks> > > > > > > <sourceRoot> > > > > > > ${project.build.directory > > > }/generated-sources/castor > > > > > > </sourceRoot> > > > > > > </configuration> > > > > > > <goals> > > > > > > <goal>run</goal> > > > > > > </goals> > > > > > > </execution> > > > > > > </executions> > > > > > > <dependencies> > > > > > > <dependency> > > > > > > <groupId>ant-contrib</groupId> > > > > > > <artifactId>ant-contrib</artifactId> > > > > > > <version>1.0b2</version> > > > > > > </dependency> > > > > > > <dependency> > > > > > > <groupId>org.codehaus.castor </groupId> > > > > > > <artifactId>castor-codegen-anttask</artifactId> > > > > > > <version>${castor.version}</version> > > > > > > </dependency> > > > > > > </dependencies> > > > > > > </plugin> > > > > > > > > > > > > 2007/11/9, Roland Asmann < [EMAIL PROTECTED]>: > > > > > > > Might be a configuration-error. Please post the part of your > > > POM > > > > > > > where the ant-run is configured! > > > > > > > > > > > > > > On Friday 09 November 2007 15:41, nicolas de loof wrote: > > > > > > > > Hello, > > > > > > > > > > > > > > > > My project uses the antrun plugin to invoke some custom ant > > > tasks > > > > > > > > > > that > > > > > > > > > > > > have > > > > > > > > > > > > > > > not (yet) be re-written as mojos. Thos task generate some > > > code ant > > > > > > > > > > are > > > > > > > > > > > > tied > > > > > > > > > > > > > > > to the generate-source phase > > > > > > > > > > > > > > > > When I build the project modules all works fine. > > > > > > > > > > > > > > > > When I run the eclipse:eclipse goal from the parent project, > > > I get > > > > > > > > a classpath issue : > > > > > > > > I've dumped the plugin classpath as shown in > > > > > > > > > > > > > http://maven.apache.org/plugins/maven-antrun-plugin/examples/classpaths.h > > > > > > > > > > > >tm > > > > > > > > > > > > > > >l: > > > > > > > > > > > > > > > > [echo] plugin classpath: > > > > > > > > > > > > > D:\platina\maven2\repository\net\sourceforge\sql2java\sql2java\2.5.0\sql2 > > > > > > > > > > > >ja > > > > > > > > > > > > > > >va- 2.5.0.jar;....... > > > > > > > > > > > > > > > > This path is the classpath set for a previous use of the > > > plugin, in > > > > > > > > > > > > > > another > > > > > > > > > > > > > > > module. > > > > > > > > It seems the plugin has been reused by maven, with no > > > consideration > > > > > > > > > > for > > > > > > > > > > > > != > > > > > > > > > > > > > > > dependencies. > > > > > > > > > > > > > > > > Known issue ? > > > > > > > > Any workaround ? > > > > > > > > > > > > > > > > Nico. > > > > > > > > > > > > > > -- > > > > > > > Roland Asmann > > > > > > > > > > > > > > CFC Informationssysteme Entwicklungsgesellschaft m.b.H > > > > > > > Bäckerstrasse 1/2/7 > > > > > > > A-1010 Wien > > > > > > > FN 266155f, Handelsgericht Wien > > > > > > > > > > > > > > Tel.: +43/1/513 88 77 - 27 > > > > > > > Fax.: +43/1/513 88 62 > > > > > > > Email: [EMAIL PROTECTED] > > > > > > > Web: www.cfc.at > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > -- > > > > > Roland Asmann > > > > > > > > > > CFC Informationssysteme Entwicklungsgesellschaft m.b.H > > > > > Bäckerstrasse 1/2/7 > > > > > A-1010 Wien > > > > > FN 266155f, Handelsgericht Wien > > > > > > > > > > Tel.: +43/1/513 88 77 - 27 > > > > > Fax.: +43/1/513 88 62 > > > > > Email: [EMAIL PROTECTED] > > > > > Web: www.cfc.at > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > -- > > > Roland Asmann > > > > > > CFC Informationssysteme Entwicklungsgesellschaft m.b.H > > > Bäckerstrasse 1/2/7 > > > A-1010 Wien > > > FN 266155f, Handelsgericht Wien > > > > > > Tel.: +43/1/513 88 77 - 27 > > > Fax.: +43/1/513 88 62 > > > Email: [EMAIL PROTECTED] > > > Web: www.cfc.at > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > >