You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Ketan Khairnar <ke...@gmail.com> on 2009/02/26 07:17:34 UTC
maven-antrun-plugin
Hi All,
I am new to maven and some of the tasks are better written in ant compared
to maven and hence I needed to use maven-antrun-plugin.
Ant-run plugin shows following lines on command line
[INFO] [antrun:run]
[INFO] Executing tasks
[INFO] Executed tasks
But Its not executing tasks defined in the build xml which is in the same
directory of pom.xml.
Here is the plugin snippet from pom xml of the project
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.3</version>
<executions>
<execution>
<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>
Deault plugin version was 1.1. I changed it to newer version but still it
didnt work
any help/pointers?
regards,
Ketan
Re: maven-antrun-plugin
Posted by Sagara Gunathunga <sa...@gmail.com>.
Hi Ketan,
you need to define your Build.xml file under the the configuration as follows.
<tasks>
<echo> Hello World ANT</echo>
<property name="compile_classpath" refid="maven.compile.classpath"/>
<property name="runtime_classpath" refid="maven.runtime.classpath"/>
<ant antfile="${basedir}/build.xml">
<target name="run"/>
</ant>
</tasks>
"run" is a target defined in Build.xml file that will execute by
maven-antrun-plugin , hope this will help you
Thanks ,
On Thu, Feb 26, 2009 at 11:47 AM, Ketan Khairnar
<ke...@gmail.com> wrote:
> Hi All,
> I am new to maven and some of the tasks are better written in ant compared
> to maven and hence I needed to use maven-antrun-plugin.
>
> Ant-run plugin shows following lines on command line
>
> [INFO] [antrun:run]
> [INFO] Executing tasks
> [INFO] Executed tasks
>
>
> But Its not executing tasks defined in the build xml which is in the same
> directory of pom.xml.
>
> Here is the plugin snippet from pom xml of the project
>
>
> <plugin>
> <artifactId>maven-antrun-plugin</artifactId>
> <version>1.3</version>
> <executions>
> <execution>
> <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>
>
>
> Deault plugin version was 1.1. I changed it to newer version but still it
> didnt work
>
> any help/pointers?
>
> regards,
> Ketan
>
--
Sagara Gunathunga
Blog - ssagara.blogspot.com
Web - http://sagaras.awardspace.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org