You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Dave Syer <da...@hotmail.com> on 2006/08/20 12:08:53 UTC
Re: antrun classpaths
> I give. None of this works.
See here http://www.nabble.com/M2-antrun-plugin-problem-tf1400135.html for
the explanation and an example...
--
View this message in context: http://www.nabble.com/antrun-classpaths-tf1776815.html#a5892213
Sent from the Maven - Users forum at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: antrun classpaths
Posted by Lee Meador <le...@leemeador.com>.
Here is how I got it to work:
In the POM I have this:
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<property refid="maven.compile.classpath"
name="cp2"></property>
<ant inheritRefs="true" antfile="build.xml"
dir="${basedir}">
<target name="axisWsdl2Java"></target>
</ant>
</tasks>
<sourceRoot>${project.build.directory
}/generated-sources/java</sourceRoot>
</configuration>
</execution>
</executions>
</plugin>
Furthermore, I have added the axis-ant jar to the dependencies in the
compile classpath. (NOTE: It just occurred to me that it should probably be
in the test classpath or somewhere else that doesn't get it into my ear
file. Does anyone have a suggestion as to which classpath is the appropriate
place for a jar that is used only to generate code in an ant script that is
called during the generate sources phase?)
Anyway, then I put the following in my build.xml:
<path id="axis.classpath" path="${cp2}"></path>
<taskdef name="axis-wsdl2java" classname="
org.apache.axis.tools.ant.wsdl.Wsdl2javaAntTask">
<classpath refid="axis.classpath" />
</taskdef>
Then use 'axis-wsdl2java' in the normal way to generate java from the wsdl
using the axis ant tool.
-- Lee
On 8/20/06, Dave Syer <da...@hotmail.com> wrote:
>
>
>
> > I give. None of this works.
>
> See here http://www.nabble.com/M2-antrun-plugin-problem-tf1400135.html for
> the explanation and an example...
> --
> View this message in context:
> http://www.nabble.com/antrun-classpaths-tf1776815.html#a5892213
> Sent from the Maven - Users forum at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
--
-- Lee Meador
Sent from gmail. My real email address is lee@leemeador.com