Namespaces
<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">
Maven project coordinates
Base pom:
<groupId>org.sakaiproject.emailtemplateservice</groupId> <artifactId>emailtemplateservice</artifactId>
Child modules: api pom example
<groupId>org.sakaiproject.emailtemplateservice</groupId> <artifactId>emailtemplateservice-api</artifactId>
Parent
<parent> <groupId>org.sakaiproject.purepoms</groupId> <artifactId>sakai-standard-tool</artifactId> <version>2.7.0-build03</version> </parent>
Child poms:
<parent> <groupId>org.sakaiproject.emailtemplateservice</groupId> <artifactId>emailtemplateservice</artifactId> <version>0.4-SNAPSHOT</version> </parent>
Delete this: redundant
<relativePath>../pom.xml</relativePath>
Properties
<properties> <url.localsite>scp://source.sakaiproject.org/var/www/html/release/emailtemplateservice/${project.version} </url.localsite> </properties>
scm
<scm> <connection>scm:svn:https://source.sakaiproject.org/svn/emailtemplateservice/trunk</connection> <developerConnection>scm:svn:https://source.sakaiproject.org/svn/emailtemplateservice/trunk</developerConnection> <url>https://source.sakaiproject.org/svn/emailtemplateservice/trunk</url> </scm>
Plugin Respositories (minimum listing)
<pluginRepositories> <pluginRepository> <id>maven2-central-repo</id> <name>Maven2 Central Repo</name> <url>http://repo1.maven.org/maven2/</url> <releases> <enabled>true</enabled> </releases> </pluginRepository> <pluginRepository> <id>Sakai Plugin Repo</id> <url>http://source.sakaiproject.org/maven2</url> <releases> <enabled>true</enabled> </releases> </pluginRepository> </pluginRepositories>
Repositories (minimum listing)
<repositories> <repository> <id>sakai-maven2</id> <name>Sakai Maven Repository</name> <layout>default</layout> <url>http://source.sakaiproject.org/maven2</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>false</enabled> </snapshots> </repository> <repository> <id>sakai-maven2-snapshots</id> <name>Sakai Maven Repo Snapshots</name> <layout>default</layout> <url>http://source.sakaiproject.org/maven2-snapshots</url> <releases> <enabled>false</enabled> </releases> <snapshots> <enabled>true</enabled> </snapshots> </repository> <repository> <id>default</id> <name>Maven Repository Switchboard</name> <layout>default</layout> <url>http://repo1.maven.org/maven2</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>false</enabled> </snapshots> </repository> </repositories>
Distribution management
<distributionManagement> <downloadUrl>http://source.sakaiproject.org/maven2/</downloadUrl> <snapshotRepository> <uniqueVersion>false</uniqueVersion> <id>sakai-maven-snapshots-scp</id> <name>Sakai snapshot Repo</name> <url>scp://source.sakaiproject.org/var/www/html/maven2-snapshots</url> <layout>default</layout> </snapshotRepository> <repository> <uniqueVersion>false</uniqueVersion> <id>sakai-maven2-scp</id> <name>Sakai maven2 repository</name> <url>scp://source.sakaiproject.org/var/www/html/maven2</url> <layout>default</layout> </repository> <site> <id>sakai-site</id> <name>Sakai release Site</name> <url>${url.localsite}</url> </site> </distributionManagement>
Dependency Management
<dependencyManagement> <dependencies> <dependency> <groupId>${project.groupId}</groupId> <artifactId>emailtemplateservice-api</artifactId> <version>${project.version}</version> <scope>provided</scope> </dependency> <dependency> <groupId>${project.groupId}</groupId> <artifactId>emailtemplateservice-impl</artifactId> <version>${project.version}</version> </dependency> </dependencies> </dependencyManagement>
Child poms:
Impl
<dependencies> <dependency> <groupId>${project.groupId}</groupId> <artifactId>emailtemplateservice-api</artifactId> </dependency> </dependencies>
Impl: accomodate change from <parent> master to purepom:
<dependency> <groupId>net.sf.ehcache</groupId> <artifactId>ehcache</artifactId> <version>${sakai.ehcache.version}</version> <scope>provided</scope> </dependency>
<dependency> <groupId>net.sf.ehcache</groupId> <artifactId>ehcache</artifactId> </dependency>
Reporting
<reporting> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> <reportSets> <reportSet> <id>aggregate</id> <configuration> <aggregate>true</aggregate> <source>1.5</source> <encoding>UTF-8</encoding> <links> <link>http://java.sun.com/j2se/1.5.0/docs/api</link> <link>http://java.sun.com/products/servlet/2.3/javadoc/</link> </links> <breakiterator>true</breakiterator> <verbose>false</verbose> <maxmemory>512m</maxmemory> <additionalJOption> -J-Xms168m -J-Xmx512m -J-XX:PermSize=128m -J-XX:NewSize=64m </additionalJOption> </configuration> <reports> <report>aggregate</report> </reports> </reportSet> </reportSets> </plugin> </plugins> </reporting>
h3 Assembly: deploy.xml
<?xml version="1.0"?> <assembly> <id>tomcat-overlay</id> <formats> <format>zip</format> </formats> <includeBaseDirectory>false</includeBaseDirectory> <dependencySets> <dependencySet> <outputDirectory>shared/lib/</outputDirectory> <useTransitiveDependencies>false </useTransitiveDependencies> <includes> <include>org.sakaiproject.emailtemplateservice:emailtemplateservice-api:jar:*</include> </includes> <unpack>false</unpack> </dependencySet> <dependencySet> <outputDirectory>components/emailtemplateservice-pack</outputDirectory> <useTransitiveDependencies>false</useTransitiveDependencies> <includes> <include>org.sakaiproject.emailtemplateservice:emailtemplateservice-pack:war:*</include> </includes> <unpack>true</unpack> </dependencySet> <dependencySet> <outputDirectory>webapps/</outputDirectory> <outputFileNameMapping>${artifact.artifactId}.war</outputFileNameMapping> <useTransitiveDependencies>false</useTransitiveDependencies> <includes> <include>org.sakaiproject.emailtemplateservice:emailtemplateservice-tool:war:*</include> </includes> <unpack>false</unpack> </dependencySet> </dependencySets> <fileSets> <fileSet> <outputDirectory></outputDirectory> <includes> <include>${project.basedir}/README*</include> </includes> </fileSet> </fileSets> </assembly>