You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by zfnotes <zf...@163.com> on 2013/01/23 19:34:44 UTC
I need a complete antrun:run command for invoking ant-task by its , other than "default-cli".
Experts:
Here’s my pom.xml config:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<id>startupTomcat</id>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<exec dir="${tomcatHome}/logs" executable="${tomcatHome}/bin/startup.bat" />
</target>
</configuration>
</execution>
</executions>
</plugin>
So please tell me the complete “mvn antrun:run” command to invoke this <id> of “startupTomcat”?! (without <id> binding, it always failed with "No ant target defined - SKIPPED" )
I know the trick of <id>default-cli</id>, and for me it is simply not enough!
Or if you “mvn antrun:run” command does not support <id> binding, please states it clearly, so that I may use <target if/unless> attribute or Maven-Profile!
Thank you!
Zhufei
1/24/2013
Re: I need a complete antrun:run command for invoking ant-task by its
, other than "default-cli".
Posted by Wayne Fay <wa...@gmail.com>.
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-antrun-plugin</artifactId>
> <version>1.7</version>
> <executions>
> <execution>
<phase><!-- needs a lifecycle phase here --></phase>
> <id>startupTomcat</id>
> <goals>
> <goal>run</goal>
> </goals>
Generally I'd expect you to have a lifecycle phase defined in the
<execution> and then you'd run "mvn <phase>" and Antrun would be
automatically invoked during that phase to start your Tomcat instance.
If this startpTomcat step is not going to be a regular part of your
build in this project, you can use Maven Profiles instead, but at that
point I think there is no good reason to use Maven at all and you
might as well use Ant directly with its own build.xml etc.
Wayne
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org