Creating an Indie release

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 master <parent>
<parent>
  <groupId>org.sakaiproject</groupId>
  <artifactId>master</artifactId>
  <version>2.10-SNAPSHOT</version>
  <relativePath>../master/pom.xml</relativePath>
</parent>
Define <scm> (Note - makes sure this points to your project!)
<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>
        <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>sonatype-nexus-snapshots</id>
	    <name>Sonatype Nexus Snapshots</name>
	    <url>https://oss.sonatype.org/content/repositories/snapshots</url>
	    <releases>
		<enabled>false</enabled>
	    </releases>
	    <snapshots>
        	<enabled>true</enabled>
            </snapshots>
        </repository>
        <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>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/

Â