Hi,
In fact i didn't tell you all the truth :) :
In order to make a generic behavior of my modules, I built pom parent with:
//
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<dependencies>
<dependency>
<groupId>sun</groupId>
<artifactId>tools</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${java.home}/../lib/tools.jar</systemPath>
</dependency>
<executions>
<!-- Run ant compile target of the buildForMaven.xml of the
project or module
after the maven compile phase
<execution>
<id>antrun_compile</id>
<phase>compile</phase>
<configuration>
<tasks>
<ant antfile="${basedir}/buildForMaven.xml"
inheritRefs="true">
<target name="ant-compile"/>
</ant>
</tasks>
</configuration>
<goals><goal>run</goal></goals>
</execution>-->
</executions>
</plugin>
\\
and I override this behavior on my specific module with the first mail code
script...
With ant-run you can override the ant script call of a child if the
<execution><id> is the same as the parent... but it appears that the
maven.plugin.classpath can't be overrided...
Thanks : your code works well, my mistake was that I had a parent
maven-antrun-plugin call.
If a put the
<dependency>
<groupId>com.bea.weblogic</groupId>
<artifactId>weblogic</artifactId>
<version>${weblogic.version}</version>
<scope>system</scope>
<systemPath>${weblogic.serverPath
}\lib\weblogic.jar</systemPath>
</dependency>
on the parent, it's work well: the weblogic.jar is on the
maven.plugin.classpath, so the system scope is not a problem.
On 10/08/07, Tim Kettler <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> just tested with this pom:
>
> <project>
> <modelVersion>4.0.0</modelVersion>
> <artifactId>my-test-app</artifactId>
> <groupId>my-test-group</groupId>
> <version>1.0-SNAPSHOT</version>
>
> <build>
> <plugins>
>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-antrun-plugin</artifactId>
> <dependencies>
> <dependency>
> <groupId>org.apache.ant</groupId>
> <artifactId>ant-junit</artifactId>
> <version>1.7.0</version>
> </dependency>
> </dependencies>
> <executions>
> <execution>
> <id>compile</id>
> <phase>compile</phase>
> <configuration>
> <tasks>
> <property name="compile_classpath"
> refid="maven.compile.classpath"/>
> <property name="runtime_classpath"
> refid="maven.runtime.classpath"/>
> <property name="test_classpath"
> refid="maven.test.classpath"/>
> <property name="plugin_classpath"
> refid="maven.plugin.classpath"/>
>
> <echo message="compile classpath: ${compile_classpath}"/>
> <echo message="runtime classpath: ${runtime_classpath}"/>
> <echo message="test classpath: ${test_classpath}"/>
> <echo message="plugin classpath: ${plugin_classpath}"/>
> </tasks>
> </configuration>
> <goals>
> <goal>run</goal>
> </goals>
> </execution>
> </executions>
> </plugin>
> </plugins>
> </build>
> </project>
>
> ant-junit is on the plugin classpath as expected. So everything seems to
> work as it should. Perhaps your problem has something to do with the
> system scope of your dependency or the variables used?
>
> -Tim
>
> Gex Dev schrieb:
> > Hi,
> >
> > I'm using maven-antrun-plugin in order to call specific ant targets....
> > those ant targets needs a specific jar on the ant classpath. I don't
> > understand how works
> > the maven.plugin.classpath (
> >
> http://maven.apache.org/plugins/maven-antrun-plugin/examples/classpaths.html
> )
> > in this plugin :
> > - is it the classpath of the ant called by maven-antrun-plugin ?
> > - how can we set it ?
> > - and how maven-antrun-plugin call ant target ? I mean, which ant is
> call ?
> > Can we specify an ant version ?
> >
> > A little example:
> >
> > POM :
> > //
> > <plugin>
> > <artifactId>maven-antrun-plugin</artifactId>
> > <executions>
> > <execution>
> > <id>antrun_compile</id>
> > <phase>compile</phase>
> > <goals>
> > <goal>run</goal>
> > </goals>
> > <configuration>
> > <tasks>
> > <property name="plugin_classpath" refid="
> > maven.plugin.classpath"/>
> > <echo message="plugin classpath:
> > ${plugin_classpath}"/>
> >
> > <ant antfile="${basedir}/buildForMaven.xml"
> > inheritRefs="true">
> > <target name="ant-compile"/>
> > </ant>
> > </tasks>
> > </configuration>
> > </execution>
> > </executions>
> > <dependencies>
> > <dependency> <!-- this dependency works well in the build
> > dependencies-->
> > <groupId>com.bea.weblogic</groupId>
> > <artifactId>weblogic</artifactId>
> > <version>${weblogic.version}</version>
> > <scope>system</scope>
> > <systemPath>${weblogic.serverPath
> > }\lib\weblogic.jar</systemPath>
> > </dependency>
> > </dependencies>
> > </plugin>
> > \\
> >
> > buildForMaven.xml :
> > //
> > <target name="ant-compile">
> > <echo>Ant call...</echo>
> > <echo message="plugin classpath: ${plugin_classpath}"/>
> >
> > <ant target="appc" /> <!-- Specific weblogic ant target-->
> > </target>
> > \\
> >
> > mvn compile
> > =>
> > //
> > [INFO] [antrun:run {execution: antrun_compile}]
> > [INFO] Executing tasks
> > [echo] plugin classpath: C:\...<target of mvn compile but not
> > weblogic.jar>
> >
> > ant-compile:
> > [echo] Ant call...
> > [echo] plugin classpath: C:\...<target of mvn compile but not
> > weblogic.jar>
> >
> > <errors on appc ant target due to weblogic.jar not available>
> > \\
> >
> > Regards,
> >
> > Gerald Reinhart
> >
> > //
> > Thanks to markku : the build-helper-maven-plugin works well!
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>