mirror of https://github.com/apache/maven.git
o can't have enough references to the documentation
o add a guide for using ant tasks within the POM o update the guide toc git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@326355 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a3808c41b9
commit
15442309bd
|
@ -38,7 +38,7 @@ Documentation
|
|||
|
||||
* {{{mini/guide-embedding-m2.html}Guide to Embedding Maven 2.x}}
|
||||
|
||||
* {{{mini/guide-generating-sources.html}Guide to Generating Sources}}
|
||||
* {{{mini/guide-generating-sources.html}Guide to generating Sources}}
|
||||
|
||||
* {{{mini/guide-ibiblio-upload.html}Guide to uploading artifacts to Ibiblio}}
|
||||
|
||||
|
@ -66,6 +66,8 @@ Documentation
|
|||
|
||||
* {{{mini/guide-site.html}Guide to creating a site}}
|
||||
|
||||
* {{{mini/guide-using-ant.html}Guide to using Ant with Maven}}
|
||||
|
||||
* {{{mini/guide-using-extensions.html}Guide to using Extensions}}
|
||||
|
||||
* {{{mini/guide-webapp.html}Guide to Webapps}}
|
||||
|
|
|
@ -0,0 +1,87 @@
|
|||
------
|
||||
Guide to using Ant with Maven
|
||||
------
|
||||
Jason van Zyl
|
||||
------
|
||||
12 October 2005
|
||||
------
|
||||
|
||||
Guide to using Ant with Maven
|
||||
|
||||
The example above illustrates how to bind an ant script to a lifecycle phase. You can add a script to each lifecycle
|
||||
phase, by duplicating the <execution/> section and specifying a new phase.
|
||||
|
||||
+----+
|
||||
|
||||
<project>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>my-test-app</artifactId>
|
||||
<groupId>my-test-group</groupId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-antrun-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>generate-sources</phase>
|
||||
<configuration>
|
||||
<tasks>
|
||||
|
||||
<!--
|
||||
Place any ant task here. You can add anything
|
||||
you can add between <target> and </target> in a
|
||||
build.xml.
|
||||
-->
|
||||
|
||||
</tasks>
|
||||
</configuration>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
||||
+----+
|
||||
|
||||
So a concrete example would be something like the following:
|
||||
|
||||
+----+
|
||||
|
||||
<project>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>my-test-app</artifactId>
|
||||
<groupId>my-test-group</groupId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-antrun-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>generate-sources</phase>
|
||||
<configuration>
|
||||
<tasks>
|
||||
<exec
|
||||
dir="${basedir}"
|
||||
executable="${basedir}/src/main/sh/do-something.sh"
|
||||
failonerror="true">
|
||||
<arg line="arg1 arg2 arg3 arg4" />
|
||||
</exec>
|
||||
</tasks>
|
||||
</configuration>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
|
||||
+----+
|
|
@ -25,8 +25,11 @@
|
|||
<a href="download.html#installation">Installation Instructions</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="getting-started.html">Getting Started</a>
|
||||
<a href="guides/getting-start/getting-started.html">Getting Started</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="guides/index.html">Documentation</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<p>
|
||||
|
|
Loading…
Reference in New Issue