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.htm
> >l:
> >
> >      [echo] plugin classpath:
> >
> D:\platina\maven2\repository\net\sourceforge\sql2java\sql2java\2.5.0\sql2ja
> >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]
>
>

Reply via email to