Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

1. Add namespace declarations and attributes

Code Block
xml
xml

<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
Code Block
xml
xml

<groupId>org.sakaiproject.polls</groupId>

...

Use project variables
Code Block
xml
xml

<groupId>${project.groupId}</groupId>
<version>${project.version}</version>

...

Add purepom <parent>
Code Block
xml
xml

<parent>
  <groupId>org.sakaiproject.purepoms<sakaiproject</groupId>
  <artifactId>sakai-standard-tool<<artifactId>master</artifactId>
  <version>2.910-SNAPSHOT</version>
  <relativePath>../master/pom.xml</relativePath>
</parent>
Define <scm> (Note - makes sure this points to your project!)
Code Block
xml
xml

<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
Code Block
xml
xml

<properties>
  <url.localsite>scp://source.sakaiproject.org/var/www/html/release/basiclti/${project.version}</url.localsite>
</properties>
Define <distributionManagement>
Code Block
xml
xml

<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>
Code Block
xml
xml

<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>
Code Block
xml
xml
     <repositories>
        	<repository>
	            <id>sakai-maven<<id>sonatype-nexus-snapshots</id>
	    <name>Sonatype        <name>Sakai Maven Repo<Nexus Snapshots</name>
	            <layout>default</layout>
            <url>http<url>https://sourceoss.sakaiprojectsonatype.org/content/maven2<repositories/snapshots</url>
        	    <releases>
                <enabled>true<		<enabled>false</enabled>
     	       </releases>
	            <snapshots>
                <enabled>false<	<enabled>true</enabled>
            </snapshots>
        </repository>
        <repository>
            <id>sakai-maven2-snapshots<maven</id>
            <name>Sakai Maven Repo</name>
            <layout>default</layout>
            <url>http://source.sakaiproject.org/maven2-snapshots<maven2</url>
            <releases>
                <enabled>false<<enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>true<<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>
Code Block
xml
xml

<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>

...

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.

Code Block
xml
xml

<dependencyManagement>
  <dependencies>
    <dependency>
      <groupId>org.sakaiproject.courier</groupId>
      <artifactId>sakai-courier-api</artifactId>
      <version>2.9-SNAPSHOT</version>
      <scope>provided</scope>
    </dependency>
    . . .
  </dependencies>
</dependencyManagement>

...