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
<[email protected]> 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: [email protected]
For additional commands, e-mail: [email protected]