Listing 4 Maven’s fully worked project object model (POM) file
<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">
<modelVersion>4.0.0</modelVersion>
<groupId>sopwith</groupId>
<artifactId>SunDeveloper</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>Sun Developer Project</name>
<url>http://snagglepuss/maven/sites/developer</url>
<description>The documentation site for the Sun Developer project.</description>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<!-- Details of the continuous integration tool being used by the
project. -->
<ciManagement>
<system>CuiseControl</system>
<url>http://snagglepuss/CruiseControl</url>
<notifiers>
<notifier>
<type>mail</type>
<address>cruise@snagglepuss</address>
</notifier>
</notifiers>
</ciManagement>
<reporting>
<plugins>
<!-- Use Checkstyle to perform various code style checks. By
default, the standard Sun conventions are followed. -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
</plugin>
<!-- Describes which files have been changed and by whom -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>changelog-maven-plugin</artifactId>
</plugin>
<!-- The standard Javadocs report -->
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
</plugin>
<!-- Produces an indexed and cross referenced version of the
source code -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jxr-maven-plugin</artifactId>
</plugin>
<!-- Looks for any @todo or TODO reminders in the code -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>taglist-maven-plugin</artifactId>
</plugin>
<!-- Produces the results of junits tests -->
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
</plugin>
</plugins>
</reporting>
<developers>
<developer>
<name>Craig Caulfield</name>
<id>0</id>
<email>craigc@snagglepuss</email>
<roles>
<role>Senior Software Engineer</role>
<role>Architect</role>
</roles>
<timezone>+8</timezone>
</developer>
<developer>
<name>Johnny Cruiser</name>
<id>1</id>
<email>cruise@snagglepuss</email>
<roles>
<role>Build Manager</role>
</roles>
<timezone>+8</timezone>
</developer>
</developers>
<!-- Details of the source control system being used by the project. -->
<scm>
<connection>scm:svn:http://snagglepuss/svn/DEVELOPER/</connection>
<developerConnection>scm:svn:http://snagglepuss/svn/DEVELOPER/ \
</developerConnection>
<url>http://snagglepuss/svn/DEVELOPER/</url>
</scm>
<distributionManagement>
<site>
<id>developerDocumentation</id>
<url>scp://snagglepuss/opt/maven/sites/developer</url>
</site>
<repository>
<id>internalRepository</id>
<name>An internal repository for artifacts not served by
Ibiblio</name>
<url>scp://snagglepuss/opt/maven/remote</url>
</repository>
</distributionManagement>
<build>
<plugins>
<plugin>
<artifactId>maven-site-plugin</artifactId>
<configuration>
<locales>en</locales>
</configuration>
</plugin>
<!-- The org.apache.maven.plugins will ensure that the
eclipse:eclipse goal works properly. -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<version>2.1</version>
<configuration>
<workspace>/home/craigc/Documents/Skills/Java/ \
Developer/workspace/SunDeveloper</workspace>
</configuration>
</plugin>
<!-- Update the local working copy with the latest from
Subversion before doing a build. Bolted onto validate
phase of the build lifecycle. -->
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>validate</phase>
<configuration>
<tasks>
<ant dir="/home/cruise/Builds"
antfile="SubversionTasks.xml"
target="svn-update">
<property name="svn.repository.URL"
value="http://snagglepuss/svn"/>
<property name="svn.repository.name"
value="DEVELOPER"/>
<property name="svn.repository. \
subproject" value="SunDeveloper"/>
</ant>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Add another plugin here to do the subversion copy -->
</plugins>
</build>
</project>
|