looking for help making or updating an indie release tool?
pom.xml cleanup
1. Add namespace declarations and attributes
<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">
2. Delete commented out lines of code
General
<groupId> = org.sakaiproject.project name
<groupId>org.sakaiproject.polls</groupId>
Define project base pom version explicitly (i.e., do not inherit version from <parent>).
Use project variables
<groupId>${project.groupId}</groupId> <version>${project.version}</version>
List <developers>
List <contributors>
Project base pom
Add purepom <parent>
<parent> <groupId>org.sakaiproject.purepoms</groupId> <artifactId>sakai-standard-tool</artifactId> <version>2.9-SNAPSHOT</version> </parent>
Define <scm>
<scm> <connection>scm:svn:https://source.sakaiproject.org/svn/basiclti/trunk</connection> <developerConnection>scm:svn:https://source.sakaiproject.org/svn/basiclti/trunk</developerConnection> <url>https://source.sakaiproject.org/svn/basiclti/trunk</url> </scm>
Add site property
<properties> <url.localsite>scp://source.sakaiproject.org/var/www/html/release/basiclti/${project.version}</url.localsite> </properties>
Define <distributionManagement>
<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>
Define <pluginRepositories>
<pluginRepositories> <pluginRepository> <id>maven2-central-repo</id> <name>Maven2 Central Repo</name> <url>http://repo1.maven.org/maven2/</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>false</enabled> </snapshots> </pluginRepository> <pluginRepository> <id>Sakai Plugin Repo</id> <url>http://source.sakaiproject.org/maven2</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>false</enabled> </snapshots> </pluginRepository> </pluginRepositories>
Define <repositories>
<repositories> <repository> <id>sakai-maven</id> <name>Sakai Maven Repo</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</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>
Add <reporting>
<reporting> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> <version>2.7</version> <configuration> <debug>true</debug> <links> <link>http://download.oracle.com/javase/1.5.0/docs/api/</link> <link>http://download.oracle.com/javase/6/docs/api/</link> </links> <breakiterator>true</breakiterator> <verbose>false</verbose> <aggregate>true</aggregate> <minmemory>168m</minmemory> <maxmemory>1024m</maxmemory> <additionalJOption>-J-Xms168m -J-Xmx1024m -J-XX:PermSize=128m -J-XX:NewSize=64m</additionalJOption> </configuration> </plugin> </plugins> </reporting>
Gotchas
Beware of API jar scope
Sakai API jars are deployed to $CATALINA_HOME/shared/lib and are available on the classpath. If you declare a dependency on a Sakai API be sure to set it's <scope> to provided.
<dependencyManagement> <dependencies> <dependency> <groupId>org.sakaiproject.courier</groupId> <artifactId>sakai-courier-api</artifactId> <version>2.9-SNAPSHOT</version> <scope>provided</scope> </dependency> . . . </dependencies> </dependencyManagement>
Examples
Project |
SVN |
Notes |
---|---|---|
BasicLTI |
https://source.sakaiproject.org/svn/basiclti/ |
|
Profile2 |
https://source.sakaiproject.org/svn/profile2/ |
|
Samigo |
https://source.sakaiproject.org/svn/sam/ |
Uses a profile to sign it's audio jar; assembly deploys OSID jar to /shared |
Sitestats |
https://source.sakaiproject.org/svn/sitestats/ |
|