Changes between Version 4 and Version 5 of PLATFORM_DEPLOYMENT_BUILD_ANT


Ignore:
Timestamp:
10/14/08 18:44:15 (17 years ago)
Author:
pavlina
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • PLATFORM_DEPLOYMENT_BUILD_ANT

    v4 v5  
    11= Platform Deployment Build Ant = 
    2 To integrate Ant with Maven you have to use maven-antrun-plugin, so you just have to add the following section in your pom.xml file of the parent project: 
    3 {{{ 
    4 <build> 
    5    <plugins> 
    6       <plugin> 
    7          <groupId>org.apache.maven.plugins</groupId> 
    8   
    9          <artifactId>maven-antrun-plugin</artifactId> 
    10   
    11          <executions> 
    12             <execution> 
    13                <phase>compile</phase> 
    14   
    15                <configuration> 
    16                 <!-- Put the Ant Tasks that you wish to call here --> 
    17                   <tasks> 
    18                      <echo>Copy Resources </echo> 
    19   
    20                      <copy file="${basedir}/source" tofile="${basedir}/target/" overwrite="true" /> 
    21                   </tasks> 
    22                </configuration> 
    23   
    24                <goals> 
    25                   <goal>run</goal> 
    26                </goals> 
    27             </execution> 
    28          </executions> 
    29       </plugin> 
    30    </plugins> 
    31 </build> 
    32 }}} 
     2Apache Ant is integrated in Maven using maven-ant-plugin, so there is goal in Maven named ant. You have two options which are ant:ant and ant:clean. 
     3 * executing '''mvn ant:ant''' Maven create build.xml files which can be used by Ant later 
     4 * '''mvn:clean''' remove the created build.xml files if there are any. 
     5Good tutorial to get into Apache Ant: http://supportweb.cs.bham.ac.uk/docs/tutorials/docsystem/build/tutorials/ant/ant.html [[BR]] 
     6You must follow the steps explained in [wiki:PLATFORM_INFRASTRUCTURE_OVERVIEW#ApacheAnt] page to have ant installed on your machine. 
     7Now you can build the project using Ant with the simple command '''ant'''. 
    338 
    34  
    35 As you can see in tasks section you can add any task you want. This is the same as target section in build.xml ant file. [[BR]] 
    36 Good tutorial to get into Apache Ant: http://supportweb.cs.bham.ac.uk/docs/tutorials/docsystem/build/tutorials/ant/ant.html [[BR]] 
    37 Here is more info about the maven-antrun-plugin: http://maven.apache.org/plugins/maven-antrun-plugin/