You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Aleksander Valtyshev <ah...@mac.com> on 2008/04/06 23:52:22 UTC

Goals, Profile and Phases

Hi!
Suppose I have this in POM file

         <profile>
             <id>tomcat</id>

             <build>
                 <defaultGoal>integration-test</defaultGoal>
                 <plugins>
                     <plugin>
                         <artifactId>maven-antrun-plugin</artifactId>
                         <executions>
                             <execution>
                                 <phase>integration-test</phase>
                                 <configuration>
                                     <tasks>
                                         <property file="${basedir}/ 
tomcat.properties"></property>
                                         <taskdef resource="net/sf/ 
antcontrib/antcontrib.properties"></taskdef>
                                         <if>
                                             <not><equals arg1=""  
arg2="${webapps.dir}"></equals></not>
                                             <then>
                                                 <copy todir="$ 
{webapps.dir}/${project.build.finalName}">
                                                     <fileset  
dir="target/${project.build.finalName}"></fileset>
                                                 </copy>

                                                 <taskdef  
name="reload" classname="org.apache.catalina.ant.ReloadTask"></taskdef>
                                                 <reload path="/$ 
{project.build.finalName}" username="${tomcat.manager.username}"  
password="${tomcat.manager.password}"></reload>
                                             </then>
                                         </if>
                                     </tasks>
                                 </configuration>
                                 <goals>
                                     <goal>run</goal>
                                 </goals>
                             </execution>
                         </executions>
                         <dependencies>
                             <dependency>
                                 <groupId>com.imcode.ant.tasks</groupId>
                                 <artifactId>imcode-ant-tasks</ 
artifactId>
                                 <version>1.3</version>
                             </dependency>
                             <dependency>
                                 <groupId>ant-contrib</groupId>
                                 <artifactId>ant-contrib</artifactId>
                                 <version>20020829</version>
                             </dependency>
                             <dependency>
                                 <groupId>tomcat</groupId>
                                 <artifactId>catalina-ant</artifactId>
                                 <version>5.5.12</version>
                             </dependency>
                         </dependencies>
                     </plugin>
                 </plugins>
             </build>

         </profile>

How do I run it?
"mvn integration-test -P tomcat" ?

Regards,
Alex



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org