Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Wiki Markup
h1. Transitioning from Maven 1 to Maven 2 project management

Igor Pavlin
Version 0.1
Date: December 1, 2007

This is a "hands on tutorial" for transitioning from Maven 1 to Maven 2 project management. It could be easily a large book, but I will try to keep things short and simple. If you do not understand something please  refer to the mentioned literature or feel free to ask me.

For the purposes of this document I will be strict about names Maven 1.x and Maven 2.x, but later we should assume that unless oterhwiseotherwise specified, when we say maven it will mean Maven 2.x.

The reader is assumed to be completely familiar with Maven 1, and not so much with Maven 2. I recommend reading at least the User documentation at [http://maven.apache.org/].
I found book: *Better Builds with Maven* by Vincent Massol et al. (there is an electronic version available), very valuable. Published by DevZuz Library Press, April 2007.

In hands on approacheapproach, I will convert one of the GLAST projects: *org-glast-groupmanager,* that was built with Maven 1, into a Maven 2 project. I will also assume that NetBeans 6.0 is used for building the project using Netbeans Maven 2 plugin. However, initiallyInitially I willwould test transitions using command line mvn.

Install Maven 2 for your OS and set MVN_HOME, as well as create .m2 directory in your home(working) directory. Link is: [http://maven.apache.org/]

In Appendix One, I  list  typical GLAST Maven 1 project files and give a log of a successful 'maven' (Maven 1.x) run.

I  will concentrate only on the significant changes when transitioning from Maven 1 to Maven 2. The changes will be presented in tabular forms bellow.

h2. 1.    Default Directory Structure:

The default directory structure is strongly encouraged, as this leads to better project management.  Most of the time you do not need to change the Maven 1 directory
structure, as it usually follows the recommended default structure for Maven 2.

The default directory structure is actually defined in the Maven 2 "Super POM" file, which all Maven 2 POM objects  inherit from. Here is the GLAST directory structure for Maven 2 projects:
{code}
artifactId/        								project directory
\
|-\- .cvsignore    contains files that are local to buildcvsignore                                                        contains files that are local to build: target, profiles.xml, etc
\
|-\- pom.xml    POM
\|-\- profiles.xml   xml                                                         POM file

|-- profiles.xml    						     local, user and project dependent profile definitions; this should not be version controlled
\
|-\- LICENSE.txt    license of the project
\|-\- README.txt    welcome to the reader
\|-\- src/    original src material; this should be version controlled
\|   \|-\- main/    the original material for the artifact
\|   \|   \|-\- java/    root of main Java source; wil be compiled into target/classes
\|   \|   \|-\- resources/    main Java resources; will be copied into target/classes
\|   \|   \|-\- webapp/
\|   \|       \|-\- WEB-INF/
\|   \|       \|   `-\- web.xml
\|   \|       `-\- index.jsp    web application with standard web application structure
\|   \|   \|-\- assembly/
\|   \|       `-\- dep.xml    assembly descriptor for maven-assembly-plugin
\|   \|   \|-\- filters/    resource filter properties files for main Java resources
\|   \|   \|-\- config/    configuration files for the artifact
\|   \|   \|-\- bash/
\|   \|   \|-\- groovy/
\|   \|   \|-\- prolog/
\|   \|   `-\- sql/    sources in other technologies for the artifact
\|   \|-\- site/    project documentation in different formats; mvn site will produce a project website in target/site based on this material and structure (Doxia)
\|   \|   \|-\- apt/
\|   \|   \|   \|-\- format.apt
\|   \|   \|   `-\- index.apt    documentation in APT format (wiki-like HTML generation)
\|   \|   \|-\- fml/
\|   \|   \|   `-\- faq.fml    documentation in FML format (XML based FAQ format)
\|   \|   \|-\- resources/
\|   \|   \|   \|-\- css/
\|   \|   \|   \|-\- img/
\|   \|   \|   `-\- js/    site resources; will be copied into target/site as-is
\|   \|   \|-\- site.xml    site descriptor: description of site structure; this will generate menus
\|   \|   `-\- xdoc/
\|   \|       `-\- xdoc.xml    documentation in Xdoc format (XML based HTML generation; maven 1 legacy)
\|   `-\- test/    original material to test the artifact
\|       \|-\- java/    root of Java source for testing the artifact; usually JUnit test classes; will be compiled into target/test-classes
\|       \|-\- resources/    resources for testing the artifact; will be copied into target/test-classes
\|       \|-\- filters/    resource filter properties files for resources for testing the artifact
\|       \|-\- perl/
\|       \|-\- haskell/
\|       `-\- python/    sources in other technologies for testing the artifact
`-\- target/    generated material; this should not be under version control
    \|-\- artifactId-version.jar    generated artifact
    \|-\- classes/    result of compilation of src/main/java and copy of src/main/resources
    \|-\- exported-pom.xml    consolidated POM
    \|-\- javadoc/    javadoc of src/main/java
    \|-\- site/    project site generated by mvn site
    \|-\- surefire-reports/    test reports
    \|-\- test-classes/    result of compilation of src/test/java and copy of src/test/resources
    `-\- announcement/
            `-\- announcement.vm    org.codehaus.mojo:changelog-maven-plugin generates announcement mail here



2.    Maven 2 project file pom.xml

The most reliable way to convert from project.xml to pom.xml is to follow the respective XML schema:
1.    http://maven.apache.org/maven-v3_0_0.xsd for Maven 1.1.
2.    http://maven.apache.org/maven-v4_0_0.xsd for Maven 2.0.


Note: The simplest thing to do in transition from Maven 1 to Maven 2 project building is to convert project.xml file into pom.xml file first. However, there are slight differences that need to be addressed and they are presented in the table bellow. I recommend creating  subdirectories in the project directory called maven1 and maven2, where project files from both versions  are kept (under the version control), until you are comfortable that your project is fully converted to a Maven 2 project.

You can start by moving project.xml to pom.xml, change pomVersion to modelVersion in the table bellow and than follow some of the mappings (bold letters denote elements that need to be changed. The following table resulted from conversion of project.xml in pom.xml of org-glast-groupmanager.
 
Mappings between project.xml and pom.xml project elements:

Maven 1.x    Maven 2.x    Description
<project>

&nbsp;&nbsp;&nbsp; <project xmlns="http://maven.apache.org/POM/4.0.0"
&nbsp; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
&nbsp; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">&nbsp;&nbsp;&nbsp; Keep more extended version of project, so you can visit the schema and validate document
<pomVersion>3.0.0</pomVersion>
&nbsp;&nbsp;&nbsp; <modelVersion>4.0.0</modelVersion>
&nbsp;&nbsp;&nbsp; Differentiates between different versions of POM objects
<groupId>&nbsp;&nbsp;&nbsp; <groupId>&nbsp;&nbsp;&nbsp; Stays the same
<artifactId> &nbsp;&nbsp;&nbsp; <artifactId>&nbsp;&nbsp;&nbsp; Stays the same
<currentVersion>&nbsp;&nbsp;&nbsp; <version>&nbsp;&nbsp;&nbsp; Same meaning
<shortDescription> &nbsp;&nbsp;&nbsp; <description>&nbsp;&nbsp;&nbsp; Same meaning
<package>&nbsp;&nbsp;&nbsp; Not used, JavaDoc is done differently in Maven 2&nbsp;&nbsp;&nbsp; The Java package name of the project. This value is used when generating JavaDoc.
<siteAddress>&nbsp;&nbsp;&nbsp; Not used, hostname is part of url element&nbsp;&nbsp;&nbsp; The hostname of the web server that hosts the project's web site. This is used when the web site is deployed.
<siteDirectory>&nbsp;&nbsp;&nbsp; Not used, directory part of url&nbsp;&nbsp;&nbsp;
<repository>&nbsp;&nbsp;&nbsp; Should be nested into <repositories> element&nbsp;&nbsp;&nbsp;
<developerConnection>&nbsp;&nbsp;&nbsp; Should be moved to <scm> element for defining connection to SCM (Source Control Management) for developers.&nbsp;&nbsp;&nbsp; SCM connection for developers
<reports> (and <report>*)&nbsp;&nbsp;&nbsp; Delete, it is deprecated in Maven 2.&nbsp;&nbsp;&nbsp;
<properties>&nbsp;&nbsp;&nbsp; If used inside <dependency> delete the element, instead use <scope>, <version>,<type> as described in
http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html&nbsp;&nbsp;&nbsp; Dependency properties
<url>&nbsp;&nbsp;&nbsp; If used inside <dependency>, delete it.&nbsp;&nbsp;&nbsp;
<sourceDirectory>&nbsp;&nbsp;&nbsp; Used inside <build>, no need to specify, if the default src directory is used.&nbsp;&nbsp;&nbsp;
<resource>, <directory>&nbsp;&nbsp;&nbsp; Used inside <resources>, no need to specify,
If the default resources directory is used.&nbsp;&nbsp;&nbsp;

3.&nbsp;&nbsp;&nbsp; File after substitutions:

(Note: This file will still not work, as we need to specify some other Maven 2 properties, like local, GLAST and global repositories, etc.)

<?xml version="1.0" encoding="UTF-8"?>
<\!-\-

Maven 2 is shortly identified as maven. If we want to give a reference to Maven 1.0.2 we will call Maven 1.

This POM extends SuperPOM, which means that the following elements are already defined:
maven central repository (http://repo1.maven.org/maven2)
maven plugin repository&nbsp; (http://repo1.maven.org/maven2)

default build directories:
&nbsp; target
&nbsp; target/classes
&nbsp; target/test-classes
&nbsp; target/site
&nbsp; src/main/java
&nbsp; src/test/java
&nbsp; src/main/scripts
&nbsp; src/main/resources
&nbsp; src/test/resources

as well as default profiles:
&nbsp;release-profile

and default plugins:

&nbsp;maven-source-plugin
&nbsp;maven-javadoc-plugin
&nbsp;maven-deploy-plugin

\-->

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

&nbsp; <modelVersion>4.0.0</modelVersion>
&nbsp; <artifactId>org-glast-groupmanager</artifactId>
&nbsp; <groupId>glast</groupId>
&nbsp; <version>1.6-SNAPSHOT</version>
&nbsp; <description>Glast Group Manager</description>
&nbsp; <url>http://glast-ground.slac.stanford.edu/GroupManager/</url>
&nbsp; <name>Glast Group Manager</name>
&nbsp; <inceptionYear>2005</inceptionYear>
&nbsp; <repositories>
&nbsp;&nbsp;&nbsp;&nbsp; <\!---\- Not yet defined \-->
&nbsp; </repositories>
&nbsp; <scm>
&nbsp;&nbsp;&nbsp; <developerConnection>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; scm:cvs:ext:${maven.username}@glast&nbsp;&nbsp; java.slac.stanford.edu:/cvs/java:${pom.artifactId}
&nbsp;&nbsp;&nbsp; </developerConnection>
&nbsp; </scm>
&nbsp; <dependencies>
&nbsp;&nbsp;&nbsp; <dependency>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <groupId>tomcat</groupId>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <artifactId>servlet-api</artifactId>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <version>5.0.18</version>
&nbsp;&nbsp;&nbsp; </dependency>
&nbsp;&nbsp;&nbsp; <dependency>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <groupId>tomcat</groupId>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <artifactId>jsp-api</artifactId>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <version>5.0.18</version>
&nbsp;&nbsp;&nbsp; </dependency>
&nbsp;&nbsp;&nbsp; <dependency>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <groupId>jstl</groupId>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <artifactId>jstl</artifactId>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <version>1.1.2</version>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <type>war</type>
&nbsp;&nbsp;&nbsp; </dependency>
&nbsp;&nbsp;&nbsp; <dependency>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <groupId>taglibs</groupId>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <artifactId>standard</artifactId>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <version>1.1.2</version>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <type>war</type>
&nbsp;&nbsp;&nbsp; </dependency>
&nbsp;&nbsp;&nbsp; <\!---more dependencies here \-->
&nbsp;&nbsp;&nbsp; <\!-\- Needed by cruisecontrol \-->
&nbsp;&nbsp;&nbsp; <dependency>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <groupId>maven</groupId>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <artifactId>maven-scm-plugin</artifactId>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <version>1.5</version>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <type>plugin</type>
&nbsp;&nbsp;&nbsp; </dependency>
&nbsp; </dependencies>
&nbsp; <build>
&nbsp;&nbsp;&nbsp; <resources>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <resource>
&nbsp;&nbsp;&nbsp; <directory>src/main/resource</directory>
&nbsp;&nbsp;&nbsp; <includes>
&nbsp;&nbsp;&nbsp; &nbsp; <include>META-INF/*.tld</include>
&nbsp;&nbsp;&nbsp; </includes>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </resource>
&nbsp;&nbsp;&nbsp; </resources>
&nbsp; </build>
</project>


4.&nbsp;&nbsp;&nbsp; Profiles.xml file
&nbsp;&nbsp;&nbsp;&nbsp; Todo
3.&nbsp;&nbsp;&nbsp; Maven 2 repositories.
Todo
4.&nbsp;&nbsp;&nbsp; Web application deployments on tomcat servers
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Todo
5.&nbsp;&nbsp;&nbsp; Using inheritance for POM objects
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Todo


Appendix A
project.xml
<?xml version="1.0" encoding="UTF-8"?>
<project>
&nbsp;&nbsp; <pomVersion>3</pomVersion>
&nbsp;&nbsp; <artifactId>org-glast-groupmanager</artifactId>
&nbsp;&nbsp; <groupId>glast</groupId>
&nbsp;&nbsp; <currentVersion>1.6-SNAPSHOT</currentVersion>
&nbsp;&nbsp; <shortDescription>Glast Group Manager</shortDescription>
&nbsp;&nbsp; <url>http://glast-ground.slac.stanford.edu/GroupManager/</url>
&nbsp;&nbsp; <name>Glast Group Manager</name>
&nbsp;&nbsp; <package>org.glast.groupmanager</package>
&nbsp;&nbsp; <inceptionYear>2005</inceptionYear>
&nbsp;&nbsp; <siteAddress>glast-java.slac.stanford.edu</siteAddress>
&nbsp;&nbsp; <siteDirectory>/nfs/slac/g/glast/ground/docs/${pom.artifactId}</siteDirectory>
&nbsp;&nbsp; <reports>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <report>maven-jdepend-plugin</report>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <report>maven-changes-plugin</report>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <report>maven-changelog-plugin</report>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <report>maven-developer-activity-plugin</report>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <report>maven-file-activity-plugin</report>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <report>maven-javadoc-plugin</report>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <report>maven-jxr-plugin</report>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <report>maven-junit-report-plugin</report>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <report>maven-linkcheck-plugin</report>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <report>maven-tasklist-plugin</report>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <report>taglib</report>
&nbsp; </reports>
&nbsp;&nbsp; <repository>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <developerConnection>
scm:cvs:ext:${maven.username}@glast-java.slac.stanford.edu:/cvs/java:${pom.artifactId}
</developerConnection>
<url>http://www-glast.stanford.edu/cgi-bin/viewcvs/${pom.artifactId}/?root=java</url>
&nbsp;&nbsp; </repository>
&nbsp;&nbsp; <dependencies>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <dependency>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <groupId>tomcat</groupId>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <artifactId>servlet-api</artifactId>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <version>5.0.18</version>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </dependency>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <dependency>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <groupId>tomcat</groupId>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <artifactId>jsp-api</artifactId>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <version>5.0.18</version>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </dependency>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <dependency>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <groupId>jstl</groupId>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <artifactId>jstl</artifactId>
&nbsp;&nbsp;&nbsp;txt                                                     license of the project

|-- README.txt                                                     welcome to the reader

|-- src/                                                               original src material; this should be version controlled

|   |-- main/                                                        the original material for the artifact

|   |   |-- java/                                                    root of main Java source; wil be compiled into target/classes

|   |   |-- resources/                                             main Java resources; will be copied into target/classes

|   |   |-- webapp/

|   |       |-- WEB-INF/

|   |       |   `-- web.xml

|   |       `-- index.jsp                                            web application with standard web application structure

|   |   |-- assembly/

|   |       `-- dep.xml                                             assembly descriptor for maven-assembly-plugin

|   |   |-- filters/                                                   resource filter properties files for main Java resources

|   |   |-- config/                                                  configuration files for the artifact

|   |   |-- bash/

|   |   |-- groovy/

|   |   |-- prolog/

|   |   |-- sql/                                                      sources in other technologies for the artifact

|   |    -- site/                                                      project documentation in different formats; mvn site will produce a project website in target/site based on this material and structure (Doxia)

|   |   |-- apt/

|   |   |   |-- format.apt

|   |   |   `-- index.apt                                           documentation in APT format (wiki-like HTML generation)

|   |   |-- fml/

|   |   |   `-- faq.fml                                             documentation in FML format (XML based FAQ format)

|   |   |-- resources/

|   |   |   |-- css/

|   |   |   |-- img/

|   |   |   `-- js/                                                  site resources; will be copied into target/site as-is

|   |   |-- site.xml                                               site descriptor: description of site structure; this will generate menus

|   |   `-- xdoc/

|   |       `-- xdoc.xml                                         documentation in Xdoc format (XML based HTML generation; maven 1 legacy)

|   `-- test/                                                       original material to test the artifact

|       |-- java/                                                  root of Java source for testing the artifact; usually JUnit test classes; will be compiled into target/test-classes

|       |-- resources/                                           resources for testing the artifact; will be copied into target/test-classes

|       |-- filters/    r                                           resource filter properties files for resources for testing the artifact

|       |-- perl/

|       |-- haskell/

|       |-- python/                                              sources in other technologies for testing the artifact

`-- target/                                                      generated material; this should not be under version control

    |-- artifactId-version.jar                                 generated artifact

    |-- classes/                                                 result of compilation of src/main/java and copy of src/main/resources

    |-- exported-pom.xml                                   consolidated POM

    |-- javadoc/                                                javadoc of src/main/java

    |-- site/                                                     project site generated by mvn site

    |-- surefire-reports/                                      test reports

    |-- test-classes/                                           result of compilation of src/test/java and copy of src/test/resources

    `-- announcement/

            `-- announcement.vm                           org.codehaus.mojo:changelog-maven-plugin generates announcement mail here
{code}

h2. *2.&nbsp;&nbsp;&nbsp; Maven 2 project file pom.xml*

The most reliable way to convert from project.xml to pom.xml is to follow the respective XML schema:
1.&nbsp;&nbsp;&nbsp; [http://maven.apache.org/maven-v3_0_0.xsd] for Maven 1.1.
2.&nbsp;&nbsp;&nbsp; [http://maven.apache.org/maven-v4_0_0.xsd] for Maven 2.0.

_Note: The simplest thing to do in transition from Maven 1 to Maven 2 project building is to convert project.xml file into pom.xml file first. However, there are slight differences that need to be addressed and they are presented in the table bellow. I recommend creating&nbsp; subdirectories in the project directory called maven1 and maven2, where project files from both versions&nbsp; are kept (under the version control), until you are comfortable that your project is fully converted to a Maven 2 project._

You can start by moving project.xml to pom.xml, change pomVersion to modelVersion in the table bellow and than follow some of the mappings (bold letters denote elements that need to be changed. The following table resulted from conversion of project.xml in pom.xml of org-glast-groupmanager.\\
|| Maven 1.x&nbsp; \\ || &nbsp; Maven 2.x&nbsp;&nbsp; \\ || Description\\ ||
|  <project> | <project xmlns="http://maven.apache.org/POM/4.0.0"\\
 &nbsp; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\\
 &nbsp; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 [http://maven.apache.org/maven-v4_0_0.xsd]"> | Keep more extended version of project, so you can visit the schema and validate document |
| <pomVersion>3.0.0</pomVersion> | <modelVersion>4.0.0</modelVersion> | Differentiates between different versions of POM objects |
|  <groupId>&nbsp; |  <groupId>&nbsp;&nbsp;&nbsp; | &nbsp; Stays the same\\
 \\ |
| \\
 <artifactId> &nbsp;&nbsp;&nbsp; \\ | \\
 <artifactId> &nbsp;&nbsp;&nbsp; \\ |  Stays the same |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |

&nbsp;
Mappings between project.xml and pom.xml project elements:

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;

<currentVersion>&nbsp;&nbsp;&nbsp; <version>&nbsp;&nbsp;&nbsp; Same meaning
<shortDescription> &nbsp;&nbsp;&nbsp; <description>&nbsp;&nbsp;&nbsp; Same meaning
<package>&nbsp;&nbsp;&nbsp; Not used, JavaDoc is done differently in Maven 2&nbsp;&nbsp;&nbsp; The Java package name of the project. This value is used when generating JavaDoc.
<siteAddress>&nbsp;&nbsp;&nbsp; Not used, hostname is part of url element&nbsp;&nbsp;&nbsp; The hostname of the web server that hosts the project's web site. This is used when the web site is deployed.
<siteDirectory>&nbsp;&nbsp;&nbsp; Not used, directory part of url&nbsp;&nbsp;&nbsp;
<repository>&nbsp;&nbsp;&nbsp; Should be nested into <repositories> element&nbsp;&nbsp;&nbsp;
<developerConnection>&nbsp;&nbsp;&nbsp; Should be moved to <scm> element for defining connection to SCM (Source Control Management) for developers.&nbsp;&nbsp;&nbsp; SCM connection for developers
<reports> (and <report>*)&nbsp;&nbsp;&nbsp; Delete, it is deprecated in Maven 2.&nbsp;&nbsp;&nbsp;
<properties>&nbsp;&nbsp;&nbsp; If used inside <dependency> delete the element, instead use <scope>, <version>,<type> as described in
[http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html&nbsp;&nbsp;&nbsp]; Dependency properties
<url>&nbsp;&nbsp;&nbsp; If used inside <dependency>, delete it.&nbsp;&nbsp;&nbsp;
<sourceDirectory>&nbsp;&nbsp;&nbsp; Used inside <build>, no need to specify, if the default src directory is used.&nbsp;&nbsp;&nbsp;
<resource>, <directory>&nbsp;&nbsp;&nbsp; Used inside <resources>, no need to specify,
If the default resources directory is used.&nbsp;&nbsp;&nbsp;

3.&nbsp;&nbsp;&nbsp; File after substitutions:

(Note: This file will still not work, as we need to specify some other Maven 2 properties, like local, GLAST and global repositories, etc.)

<?xml version="1.0" encoding="UTF-8"?>
<\!-\-

Maven 2 is shortly identified as maven. If we want to give a reference to Maven 1.0.2 we will call Maven 1.

This POM extends SuperPOM, which means that the following elements are already defined:
maven central repository ([http://repo1.maven.org/maven2])
maven plugin repository&nbsp; ([http://repo1.maven.org/maven2])

default build directories:
&nbsp; target
&nbsp; target/classes
&nbsp; target/test-classes
&nbsp; target/site
&nbsp; src/main/java
&nbsp; src/test/java
&nbsp; src/main/scripts
&nbsp; src/main/resources
&nbsp; src/test/resources

as well as default profiles:
&nbsp;release-profile

and default plugins:

&nbsp;maven-source-plugin
&nbsp;maven-javadoc-plugin
&nbsp;maven-deploy-plugin

\-->

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 [http://maven.apache.org/maven-v4_0_0.xsd]">

&nbsp; <modelVersion>4.0.0</modelVersion>
&nbsp; <artifactId>org-glast-groupmanager</artifactId>
&nbsp; <groupId>glast</groupId>
&nbsp; <version>1.6-SNAPSHOT</version>
&nbsp; <description>Glast Group Manager</description>
&nbsp; <url>[http://glast-ground.slac.stanford.edu/GroupManager/]</url>
&nbsp; <name>Glast Group Manager</name>
&nbsp; <inceptionYear>2005</inceptionYear>
&nbsp; <repositories>
&nbsp;&nbsp;&nbsp;&nbsp; <\!-\--\- Not yet defined -->
&nbsp; </repositories>
&nbsp; <scm>
&nbsp;&nbsp;&nbsp; <developerConnection>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; scm:cvs:ext:$
{maven.username}@glast   java.slac.stanford.edu:/cvs/java:${pom.artifactId}
   
 
 
   
     tomcat
     servlet-api
     5.0.18
   
   
     tomcat
     jsp-api
     5.0.18
   
   
     jstl
     jstl
     1.1.2
     war
   
   
     taglibs
     standard
     1.1.2
     war
   
    <\!---more dependencies here \-->
    <\!-\- Needed by cruisecontrol \-->
   
     maven
     maven-scm-plugin
     1.5
     plugin
   
 
 
   
     
   src/main/resource
   
     META-INF/*.tld
   
     
   
 



4.    Profiles.xml file
     Todo
3.    Maven 2 repositories.
Todo
4.    Web application deployments on tomcat servers
            Todo
5.    Using inheritance for POM objects
      Todo


Appendix A
project.xml


  3
  org-glast-groupmanager
  glast
  1.6-SNAPSHOT
  Glast Group Manager
  http://glast-ground.slac.stanford.edu/GroupManager/
  Glast Group Manager
  org.glast.groupmanager
  2005
  glast-java.slac.stanford.edu
  /nfs/slac/g/glast/ground/docs/${pom.artifactId}
  
     maven-jdepend-plugin
     maven-changes-plugin
     maven-changelog-plugin
     maven-developer-activity-plugin
     maven-file-activity-plugin
     maven-javadoc-plugin
     maven-jxr-plugin
     maven-junit-report-plugin
     maven-linkcheck-plugin
     maven-tasklist-plugin
     taglib
 
  
     
scm:cvs:ext:${maven.username}
@glast-java.slac.stanford.edu:/cvs/java:$
{pom.artifactId}

http://www-glast.stanford.edu/cgi-bin/viewcvs/${pom.artifactId}
/?root=java</url>
&nbsp;&nbsp; </repository>
&nbsp;&nbsp; <dependencies>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <version>1.1.2</version>
&nbsp;&nbsp;&nbsp;<dependency>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <properties>
&nbsp;&nbsp;&nbsp; <groupId>tomcat</groupId>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <war.bundle>true</war.bundle><artifactId>servlet-api</artifactId>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </properties><version>5.0.18</version>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </dependency>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <dependency>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <groupId>taglibs<<groupId>tomcat</groupId>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <artifactId>standard<<artifactId>jsp-api</artifactId>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <version>1<version>5.10.2<18</version>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </dependency>
&nbsp;&nbsp;&nbsp; <properties>
&nbsp;&nbsp;&nbsp; <dependency>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <war.bundle>true</war.bundle><groupId>jstl</groupId>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <<artifactId>jstl</properties>artifactId>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </dependency>
&nbsp;&nbsp; <version>1.1.2</version>
&nbsp;&nbsp;&nbsp; <dependency>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <properties>
&nbsp;&nbsp;&nbsp; <groupId>displaytag</groupId>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <artifactId>displaytag</artifactId><war.bundle>true</war.bundle>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <version>1.0<</version>properties>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </dependency>
&nbsp;&nbsp; <url>http://displaytag.sourceforge.net/</url>
&nbsp;&nbsp;&nbsp; <dependency>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <properties>
&nbsp;&nbsp;&nbsp; <groupId>taglibs</groupId>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <war.bundle>true</war.bundle><artifactId>standard</artifactId>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </properties><version>1.1.2</version>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </dependency>
&nbsp;&nbsp;&nbsp; <properties>
&nbsp;&nbsp;&nbsp; <dependency>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <groupId>commons-lang</groupId><war.bundle>true</war.bundle>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <artifactId>commons-lang<</artifactId>properties>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </dependency>
&nbsp;&nbsp;&nbsp; <version>2.0</version>
&nbsp;&nbsp; <dependency>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <properties>
&nbsp;&nbsp; <groupId>displaytag</groupId>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <war.bundle>true</war.bundle> <artifactId>displaytag</artifactId>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <<version>1.0</properties>version>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </dependency>
&nbsp;&nbsp;&nbsp; <url>[http://displaytag.sourceforge.net/]</url>
&nbsp;&nbsp; <dependency>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <properties>
&nbsp;&nbsp;&nbsp; <groupId>commons-beanutils</groupId>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <artifactId>commons-beanutils</artifactId><war.bundle>true</war.bundle>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <version>1.7.0</version></properties>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </dependency>
&nbsp;&nbsp;&nbsp; <properties>
&nbsp;&nbsp;&nbsp; <dependency>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <war.bundle>true</war.bundle><groupId>commons-lang</groupId>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <<artifactId>commons-lang</properties>artifactId>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </dependency>
&nbsp;&nbsp;&nbsp; <version>2.0</version>
&nbsp;&nbsp;&nbsp; <dependency>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <properties>
&nbsp;&nbsp;&nbsp; <groupId>commons-collections</groupId>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <artifactId>commons-collections</artifactId><war.bundle>true</war.bundle>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <version>3.1<</version>properties>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </dependency>
&nbsp;&nbsp;&nbsp; <properties>
&nbsp;&nbsp; <dependency>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <war.bundle>true</war.bundle> <groupId>commons-beanutils</groupId>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <<artifactId>commons-beanutils</properties>artifactId>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </dependency>
&nbsp;&nbsp; <version>1.7.0</version>
&nbsp;&nbsp;&nbsp; <dependency>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <properties>
&nbsp;&nbsp;&nbsp; <groupId>codeczar-tomcat</groupId>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <artifactId>maven-tomcat-plugin</artifactId><war.bundle>true</war.bundle>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <version>1.1</version>
&nbsp;</properties>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </dependency>
&nbsp;&nbsp; <type>plugin</type>
&nbsp;&nbsp;&nbsp; <dependency>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <properties>
&nbsp;&nbsp;&nbsp; <groupId>commons-collections</groupId>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <comment>Compile time only</comment><artifactId>commons-collections</artifactId>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <<version>3.1</properties>version>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </dependency>
&nbsp;&nbsp;&nbsp; <properties>
&nbsp;&nbsp;&nbsp; <dependency>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <groupId>cas</groupId><war.bundle>true</war.bundle>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <artifactId>casclient<</artifactId>
&nbsp;&nbsp;&nbsp;properties>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <version>2.1.1</version></dependency>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <dependency>
&nbsp;&nbsp;&nbsp; <url>http://tp.its.yale.edu/tiki/tiki-index.php?page=CentralAuthenticationService</url>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <groupId>codeczar-tomcat</groupId>
&nbsp;&nbsp;&nbsp;&nbsp; <properties>
&nbsp;&nbsp;&nbsp;&nbsp; <artifactId>maven-tomcat-plugin</artifactId>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <war<version>1.bundle>true<1</war.bundle>version>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <<type>plugin</properties>type>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </dependency>
&nbsp;&nbsp;&nbsp; <properties>
&nbsp;&nbsp;&nbsp; <dependency>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <comment>Compile time <groupId>oracle<only</groupId>comment>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <artifactId>ojdbc<</artifactId>properties>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </dependency>
&nbsp;&nbsp;&nbsp; <version>1.4</version>
&nbsp;&nbsp; <dependency>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <jar>ojdbc14.jar</jar>
&nbsp;&nbsp; <groupId>cas</groupId>
&nbsp;&nbsp;&nbsp; </dependency>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <dependency><artifactId>casclient</artifactId>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <groupId>opensymphony</groupId><version>2.1.1</version>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <artifactId>sitemesh</artifactId><url>[http://tp.its.yale.edu/tiki/tiki-index.php?page=CentralAuthenticationService]</url>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <version>2.2.1</version><properties>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <type>jar</type>&nbsp;&nbsp;&nbsp; <war.bundle>true</war.bundle>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <properties></properties>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </dependency>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <war.bundle>true</war.bundle> <dependency>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <<groupId>oracle</properties>groupId>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </dependency>
&nbsp;&nbsp;&nbsp; <artifactId>ojdbc</artifactId>
&nbsp;&nbsp; <\!-\- Needed by cruisecontrol \-->
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <dependency><version>1.4</version>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <groupId>maven<<jar>ojdbc14.jar</groupId>jar>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </dependency>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <artifactId>maven-scm-plugin</artifactId><dependency>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <version>1.5<<groupId>opensymphony</version>groupId>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <type>plugin<<artifactId>sitemesh</type>artifactId>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <url>http://www.ibiblio.org/maven/maven/plugins/</url>
<version>2.2.1</version>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </dependency>
&nbsp;&nbsp; <<type>jar</dependencies>type>
&nbsp;&nbsp;&nbsp; <build>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <sourceDirectory>src/main/java</sourceDirectory><properties>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <resources>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <war.bundle>true</war.bundle>
&nbsp;&nbsp; <resource>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;; </properties>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <directory>src/main/resource</directory></dependency>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <\!-\- Needed by cruisecontrol -->
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <includes><dependency>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <groupId>maven</groupId>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <include>META-INF/*.tld</include>
&nbsp;&nbsp; <artifactId>maven-scm-plugin</artifactId>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </includes> <version>1.5</version>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <<type>plugin</resource>type>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </resources>
&nbsp;&nbsp; </build>
</project>

project.properties:

maven.repo.remote=http://mirrors.ibiblio.org/pub/mirrors/maven,&nbsp; <url>[http://javawww.freehepibiblio.org/maven,http://glast-ground.slac.stanford.edu/maven
maven.war.src=src/webapp
maven.tomcat.war.context=/GroupManager
maven.war.final.name=GroupManager.war
maven.tomcat.precompile=false
maven.repo.list=glast
maven.repo.glast=scpexe://glast-java.slac.stanford.edu
maven.repo.glast.directory=/nfs/slac/g/glast/ground/maven
maven.site.deploy.method=ssh
maven.compile.target=1.5
maven.compile.source=1.5
taglib.src.dir=src/main/resource/META-INF

maven.xml:

<?xml version="1.0" encoding="UTF-8"?>

<project xmlns:j="jelly:core"maven/plugins/]</url>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </dependency>
&nbsp;&nbsp; </dependencies>
&nbsp;&nbsp; <build>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <sourceDirectory>src/main/java</sourceDirectory>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <resources>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <resource>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <directory>src/main/resource</directory>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; xmlns:u="jelly:util" default="war">


&nbsp;&nbsp;&nbsp; <goal name="webInstall">
<includes>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <attainGoal name="tomcat:install"/>
&nbsp;&nbsp;&nbsp; </goal>

&nbsp;&nbsp;&nbsp; <goal name="webReload">
<include>META-INF/*.tld</include>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <attainGoal name="tomcat:remove"/>
&nbsp;&nbsp; </includes>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <attainGoal name="tomcat:install"/>
&nbsp;&nbsp;&nbsp; </goal>
resource>
&nbsp;&nbsp;&nbsp; <goal name="webRemove">
&nbsp;&nbsp; </resources>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <attainGoal name="tomcat:remove"/>
&nbsp;&nbsp;&nbsp; </goal>

&nbsp;&nbsp;&nbsp; <goal name="tomcat03Redeploy">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <u:properties file="${user.home}/tomcat03.properties" />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <attainGoal name="clean"/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <attainGoal name="tomcat:remove"/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <attainGoal name="tomcat:deploy"/>
&nbsp;&nbsp;&nbsp; </goal>&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; <goal name="tomcat03Deploy">; </build>
</project>
\\

project.properties:

maven.repo.remote=[http://mirrors.ibiblio.org/pub/mirrors/maven,http://java.freehep.org/maven,http://glast-ground.slac.stanford.edu/maven]
maven.war.src=src/webapp
maven.tomcat.war.context=/GroupManager
maven.war.final.name=GroupManager.war
maven.tomcat.precompile=false
maven.repo.list=glast
maven.repo.glast=scpexe://glast-java.slac.stanford.edu
maven.repo.glast.directory=/nfs/slac/g/glast/ground/maven
maven.site.deploy.method=ssh
maven.compile.target=1.5
maven.compile.source=1.5
taglib.src.dir=src/main/resource/META-INF

maven.xml:

<?xml version="1.0" encoding="UTF-8"?>

<project xmlns:j="jelly:core"
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <u:properties file="${user.home}/tomcat03.properties" />
&nbsp; xmlns:u="jelly:util" default="war">

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <attainGoal <goal name="cleanwebInstall"/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <attainGoal name="tomcat:deployinstall"/>
&nbsp;&nbsp;&nbsp; </goal>

&nbsp;&nbsp;&nbsp; <goal name="webReload">
&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp; <goal<attainGoal name="tomcat01Redeploytomcat:remove"/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <u:properties<attainGoal filename="${user.home}/tomcat01.properties" tomcat:install"/>
&nbsp;&nbsp;&nbsp;&nbsp;; </goal>

&nbsp;&nbsp;&nbsp; <attainGoal<goal name="cleanwebRemove"/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <attainGoal name="tomcat:remove"/>
&nbsp;&nbsp;&nbsp;&nbsp; </goal>

&nbsp;&nbsp;&nbsp; <attainGoal<goal name="tomcat:deploytomcat03Redeploy"/>
&nbsp;&nbsp;&nbsp; </goal>&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;nbsp; <u:properties file="$
{user.home}/tomcat03.properties" />
       
       
       
      
   
   
        
/tomcat03.properties" />
        <attainGoal name="clean"/>
        <attainGoal name="tomcat:deploy"/>
    </goal>  
   
    <goal name="tomcat01Deploytomcat01Redeploy">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;        <u:properties file="${user.home}/tomcat01.properties" />
       
       
       
      
   
   
        
/tomcat01.properties" />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;        <attainGoal name="clean"/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"/>
        <attainGoal name="tomcat:deploy"/>
&nbsp;&nbsp;&nbsp;    </goal>&nbsp;&nbsp;goal>  
</project>
project> 
build.properties:

maven.netbeans.exec.run=webReload
maven.netbeans.exec.build=war:war


tomcat01.properties:
maven.repo.remote = http://mirrors.ibiblio.org/pub/mirrors/maven,http://java.freehep.org/maven,http://glast-ground.slac.stanford.edu/maven,http://www.codeczar.com/maven
maven.tomcat.host=glast-tomcat01.slac.stanford.edu
maven.tomcat.port=8080
maven.tomcat.username=glast
maven.tomcat.password=...
maven.tomcat.precompile=false
maven.compile.compilerargs=-Xlint:unchecked
maven.tomcat.war.context=/dp2
maven.war.src=src/main/webapp
maven.war.final.name=dp2.war



and this is a log file produced by running command line maven:

&nbsp; __&nbsp;  \_\_
\|&nbsp;  \/&nbsp;  \|_\_ \_Apache_\_ \__\_
\| \|\/\| / \_` \ V / \-_) ' \&nbsp;  ~ intelligent projects ~
\|_\|&nbsp;  \|_\__,_\|\_/\___\|_\|\|_\|&nbsp;  v. 1.0.2

build:start:

war:init:

war:war-resources:
&nbsp;&nbsp;&nbsp; \:
    [mkdir\] Created dir: /Users/igor/work/java/glast/org-glast-groupmanager/target/org-glast-groupmanager
&nbsp;&nbsp;&nbsp; \    [mkdir\] Created dir: /Users/igor/work/java/glast/org-glast-groupmanager/target/org-glast-groupmanager/WEB-INF
&nbsp;&nbsp;&nbsp; \    [copy\] Copying 15 files to /Users/igor/work/java/glast/org-glast-groupmanager/target/org-glast-groupmanager
&nbsp;&nbsp;&nbsp; \    [copy\] Copying 1 file to /Users/igor/work/java/glast/org-glast-groupmanager/target/org-glast-groupmanager/WEB-INF

java:prepare-filesystem:
&nbsp;&nbsp;&nbsp; \    [mkdir\] Created dir: /Users/igor/work/java/glast/org-glast-groupmanager/target/classes

java:compile:
&nbsp;&nbsp;&nbsp; \    [echo\] Compiling to /Users/igor/work/java/glast/org-glast-groupmanager/target/classes
&nbsp;&nbsp;&nbsp; \    [javac\] Compiling 6 source files to /Users/igor/work/java/glast/org-glast-groupmanager/target/classes

java:jar-resources:
Copying 1 file to /Users/igor/work/java/glast/org-glast-groupmanager/target/classes

test:prepare-filesystem:
&nbsp;&nbsp;&nbsp; \    [mkdir\] Created dir: /Users/igor/work/java/glast/org-glast-groupmanager/target/test-classes
&nbsp;&nbsp;&nbsp; \    [mkdir\] Created dir: /Users/igor/work/java/glast/org-glast-groupmanager/target/test-reports

test:test-resources:

test:compile:
&nbsp;&nbsp;&nbsp; \    [echo\] No test source files to compile.

test:test:
&nbsp;&nbsp;&nbsp; \    [echo\] No tests to run.

war:webapp:
&nbsp;&nbsp;&nbsp; \    [echo\] Assembling webapp org-glast-groupmanager
&nbsp;&nbsp;&nbsp; \    [mkdir\] Created dir: /Users/igor/work/java/glast/org-glast-groupmanager/target/org-glast-groupmanager/WEB-INF/lib
&nbsp;&nbsp;&nbsp; \    [mkdir\] Created dir: /Users/igor/work/java/glast/org-glast-groupmanager/target/org-glast-groupmanager/WEB-INF/tld
&nbsp;&nbsp;&nbsp; \    [mkdir\] Created dir: /Users/igor/work/java/glast/org-glast-groupmanager/target/org-glast-groupmanager/WEB-INF/classes
&nbsp;&nbsp;&nbsp; \    [copy\] Copying 1 file to /Users/igor/work/java/glast/org-glast-groupmanager/target/org-glast-groupmanager/WEB-INF/lib
&nbsp;&nbsp;&nbsp; \    [copy\] Copying 1 file to /Users/igor/work/java/glast/org-glast-groupmanager/target/org-glast-groupmanager/WEB-INF/lib
&nbsp;&nbsp;&nbsp; \    [copy\] Copying 1 file to /Users/igor/work/java/glast/org-glast-groupmanager/target/org-glast-groupmanager/WEB-INF/lib
&nbsp;&nbsp;&nbsp; \    [copy\] Copying 1 file to /Users/igor/work/java/glast/org-glast-groupmanager/target/org-glast-groupmanager/WEB-INF/lib
&nbsp;&nbsp;&nbsp; \    [copy\] Copying 1 file to /Users/igor/work/java/glast/org-glast-groupmanager/target/org-glast-groupmanager/WEB-INF/lib
&nbsp;&nbsp;&nbsp; \    [copy\] Copying 1 file to /Users/igor/work/java/glast/org-glast-groupmanager/target/org-glast-groupmanager/WEB-INF/lib
&nbsp;&nbsp;&nbsp; \    [copy\] Copying 1 file to /Users/igor/work/java/glast/org-glast-groupmanager/target/org-glast-groupmanager/WEB-INF/lib
&nbsp;&nbsp;&nbsp; \    [copy\] Copying 1 file to /Users/igor/work/java/glast/org-glast-groupmanager/target/org-glast-groupmanager/WEB-INF/lib
&nbsp;&nbsp;&nbsp; \    [copy\] Copying 1 file to /Users/igor/work/java/glast/org-glast-groupmanager/target/org-glast-groupmanager/WEB-INF/lib
&nbsp;&nbsp;&nbsp; \    [copy\] Copying 11 files to /Users/igor/work/java/glast/org-glast-groupmanager/target/org-glast-groupmanager/WEB-INF/classes

war:war:
&nbsp;&nbsp;&nbsp; \    [echo\] Building WAR org-glast-groupmanager
&nbsp;&nbsp;&nbsp; \    [jar\] Building jar: /Users/igor/work/java/glast/org-glast-groupmanager/target/GroupManager.war
BUILD SUCCESSFUL
Total time: 4 seconds
Finished at: Thu Nov 29 15:59:57 PST 2007