I am now doing this:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>generate-docbook</id>
<goals>
<goal>run</goal>
</goals>
<phase>pre-site</phase>
</execution>
</executions>
<configuration>
<tasks>
<property name="plugin.path" refid="maven.plugin.classpath"/>
<ant antfile="${basedir}/build.xml"
target="prepare-docbkx"
inheritRefs="true">
</ant>
</tasks>
</configuration>
<dependencies>
<dependency>
<groupId>ant</groupId>
<artifactId>ant-trax</artifactId>
<version>1.6.5</version>
</dependency>
<dependency>
<groupId>rhino</groupId>
<artifactId>rhino</artifactId>
<version>1.5R4.1</version>
</dependency>
....
which seems to work. Here is a snippet from my build.xml file:
<project>
<target name="prepare-docbkx">
<mkdir dir="target/docbkx"/>
<taskdef name="script"
classname="org.apache.tools.ant.taskdefs.optional.Script">
<classpath path="${plugin.path}"/>
</taskdef>
....
Hope it helps.
-----Original Message-----
From: JC Walmetz [mailto:[EMAIL PROTECTED]
Sent: Wed 11/8/2006 5:22 PM
To: [email protected]
Subject: Re: Ant-based Mojo and Classpath
Hi,
I have the same problem. Did someone find a solution ?
Wilfred Springer wrote:
>
> Hi all,
>
> I'm trying to implement a plugin based on the mechanism described here
> (http://maven.apache.org/guides/plugin/guide-ant-plugin-development.html)
> and I can't figure out how to add a libraries to the Ant classpath. Does
> anybody have a clue?
>
> Using these properties:
>
>
> * maven.dependency.classpath
> * maven.compile.classpath
> * maven.runtime.classpath
> * maven.test.classpath
> * maven.plugin.classpath
>
>
> doesn't work.
>
> Thanks,
>
> Wilfred
>
>
--
View this message in context:
http://www.nabble.com/Ant-based-Mojo-and-Classpath-tf1813464s177.html#a7241564
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]