You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ca...@apache.org on 2008/07/16 01:23:03 UTC

svn commit: r677085 - in /maven/plugins/trunk/maven-antrun-plugin/src/site/apt: classpaths.apt examples/customTasks.apt index.apt

Author: carlos
Date: Tue Jul 15 16:23:03 2008
New Revision: 677085

URL: http://svn.apache.org/viewvc?rev=677085&view=rev
Log:
Add an example on custom tasks and classpath

Added:
    maven/plugins/trunk/maven-antrun-plugin/src/site/apt/examples/customTasks.apt   (with props)
Removed:
    maven/plugins/trunk/maven-antrun-plugin/src/site/apt/classpaths.apt
Modified:
    maven/plugins/trunk/maven-antrun-plugin/src/site/apt/index.apt

Added: maven/plugins/trunk/maven-antrun-plugin/src/site/apt/examples/customTasks.apt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-antrun-plugin/src/site/apt/examples/customTasks.apt?rev=677085&view=auto
==============================================================================
--- maven/plugins/trunk/maven-antrun-plugin/src/site/apt/examples/customTasks.apt (added)
+++ maven/plugins/trunk/maven-antrun-plugin/src/site/apt/examples/customTasks.apt Tue Jul 15 16:23:03 2008
@@ -0,0 +1,89 @@
+ ------
+ Using tasks not included in Ant default jar
+ ------
+ Carlos Sanchez
+ ------
+ 15 July 2008
+ ------
+
+~~ Copyright 2008 The Apache Software Foundation.
+~~
+~~ Licensed under the Apache License, Version 2.0 (the "License");
+~~ you may not use this file except in compliance with the License.
+~~ You may obtain a copy of the License at
+~~
+~~      http://www.apache.org/licenses/LICENSE-2.0
+~~
+~~ Unless required by applicable law or agreed to in writing, software
+~~ distributed under the License is distributed on an "AS IS" BASIS,
+~~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+~~ See the License for the specific language governing permissions and
+~~ limitations under the License.
+
+~~ NOTE: For help with the syntax of this file, see:
+~~ http://maven.apache.org/doxia/references/apt-format.html
+
+Using tasks not included in Ant default jar
+
+ To use ant tasks not included in the Ant jar, like Ant optional or custom tasks you need to add the dependencies needed for the task
+ to run to the plugin classpath and use the {{maven.plugin.classpath}} reference if needed.
+
+------
+<project>
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>my-test-app</artifactId>
+  <groupId>my-test-group</groupId>
+  <version>1.0-SNAPSHOT</version>
+
+  <build>
+    <plugins>
+       <plugin>
+         <groupId>org.apache.maven.plugins</groupId>
+         <artifactId>maven-antrun-plugin</artifactId>
+         <executions>
+           <execution>
+             <id>ftp</id>
+             <phase>deploy</phase>
+             <configuration>
+               <tasks>
+
+                 <ftp action="send" server="myhost" remotedir="/home/test" userid="x" password="y" depends="yes" verbose="yes">
+                   <fileset dir="${project.build.directory}">
+                     <include name="*.jar" />
+                   </fileset>
+                 </ftp>
+
+                 <taskdef name="myTask" classname="com.acme.MyTask" classpathref="maven.plugin.classpath"/>
+                 <myTask a="b"/>
+
+               </tasks>
+             </configuration>
+             <goals>
+               <goal>run</goal>
+             </goals>
+           </execution>
+         </executions>
+         <dependencies>
+           <dependency>
+             <groupId>commons-net</groupId>
+             <artifactId>commons-net</artifactId>
+             <version>1.4.1</version>
+           </dependency>
+           <dependency>
+             <groupId>ant</groupId>
+             <artifactId>ant-commons-net</artifactId>
+             <version>1.6.5</version>
+           </dependency>
+           <dependency>
+             <groupId>ant</groupId>
+             <artifactId>ant-nodeps</artifactId>
+             <version>1.6.5</version>
+           </dependency>
+         </dependencies>
+       </plugin>
+    </plugins>
+  </build>
+</project>
+
+------
+

Propchange: maven/plugins/trunk/maven-antrun-plugin/src/site/apt/examples/customTasks.apt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/plugins/trunk/maven-antrun-plugin/src/site/apt/examples/customTasks.apt
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Modified: maven/plugins/trunk/maven-antrun-plugin/src/site/apt/index.apt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-antrun-plugin/src/site/apt/index.apt?rev=677085&r1=677084&r2=677085&view=diff
==============================================================================
--- maven/plugins/trunk/maven-antrun-plugin/src/site/apt/index.apt (original)
+++ maven/plugins/trunk/maven-antrun-plugin/src/site/apt/index.apt Tue Jul 15 16:23:03 2008
@@ -57,3 +57,5 @@
   * {{{examples/classpaths.html}Referencing the Maven Classpaths}}
 
   * {{{examples/tasksAttributes.html}Using <<<\<tasks/\>>>> Attributes}}
+
+  * {{{examples/customTasks.html}Using tasks not included in Ant default jar}}