Local build machine environment
- clean Tomcat 5.5.26
- empty .m2/repository/org/sakaiproject
- new MySQL 5.0.51 sakai db
- add to .M2/settings.xml
<!-- Reference plugins in order to use <goalPrefix> short-hand --> <pluginGroups> <pluginGroup>net.sourceforge.maven-taglib</pluginGroup> </pluginGroups>
Tag preparation
Check out final RC tag.
sakai.properties
1. Update component/component-api/component/src/config/org/sakaiproject/config/sakai.properties
updating version.service
, version.sakai
and uncommenting stealthToolsstealthTools@org.sakaiproject.tool.api.ActiveToolManager
. Commit changes.
version.service=RELEASE version.sakai=2.5.2 . . . # STEALTH TOOLS. A stealth tool is a tool that is running in Sakai, but is not available to be added to a site in Worksite Setup. # For Development/QA purposes stealthTools property will be commented out; release artifacts will have the property uncommented. stealthTools@org.sakaiproject.tool.api.ActiveToolManager=blogger,sakai.messagecenter,sakai.podcasts,sakai.postem,sakai.rutgers.linktool,sakai.rutgers.testlink,sakai.search,sakai.site.roster
2. Update reference/docs/sakai.properties
version.service
and version.sakai
. Make sure stealthedTools property is commented out (i.e., enabling all provisional tools for the demo). Commit changes.
version.service=DEMO version.sakai=2.5.2
/master/pom.xml
Add <distributionManagement>
, maven-taglib-plugin
, wagon-webdav <build>
extension.
Commit changes.
1. <distributionManagement>
<distributionManagement> <repository> <uniqueVersion>false</uniqueVersion> <id>local</id> <name>Local Test</name> <url>file:///tmp/maven2</url> <layout>default</layout> </repository> <site> <id>local</id> <name>Local Test</name> <url>file:///tmp/site</url> </site> </distributionManagement>
2. maven-taglib-plugin
<plugin> <groupId>net.sourceforge.maven-taglib</groupId> <artifactId>maven-taglib-plugin</artifactId> <configuration> <goalPrefix>taglib</goalPrefix> <taglib.src.dir>src</taglib.src.dir> <!-- <taglib.src.dir>src/webapp/WEB-INF</taglib.src.dir> --> </configuration> </plugin>
3. wagon-webdav <build>
extension
<!-- Required for Dav --> <extensions> <extension> <groupId>org.apache.maven.wagon</groupId> <artifactId>wagon-webdav</artifactId> <version>1.0-beta-2</version> </extension> </extensions>
/pack-demo/pom.xml
The current 2.5.x pack-demo pom does not include the binary artifact generation code. Replace entire pom with XML below and commit changes.
<?xml version="1.0"?> <project xmlns="http://maven.apache.org/POM/4.0.0"> <modelVersion>4.0.0</modelVersion> <parent> <artifactId>base</artifactId> <groupId>org.sakaiproject</groupId> <version>2.5.2</version> <relativePath>../pom.xml</relativePath> </parent> <groupId>org.sakaiproject</groupId> <artifactId>pack-demo</artifactId> <packaging>pom</packaging> <name>Sakai Pack Demo</name> <version>2.5.2</version> <organization> <name>Sakai Project</name> <url>http://sakaiproject.org/</url> </organization> <properties> <sakai.plugin.version>2.2</sakai.plugin.version> <sakai.tomcat.version>5.5.26</sakai.tomcat.version> </properties> <dependencies> <dependency> <groupId>tomcat.tomcat</groupId> <artifactId>tomcat</artifactId> <version>${sakai.tomcat.version}</version> <type>zip</type> </dependency> </dependencies> <build> <plugins> <plugin> <artifactId>maven-antrun-plugin</artifactId> <executions> <execution> <id>pack-demo-clean</id> <phase>install</phase> <configuration> <tasks> <!-- clear the deploy area --> <delete dir="${basedir}/target/unpack" /> <delete dir="${basedir}/target/pack" /> <!-- expand the tomcat zip from the repo into the target --> <unzip src="${settings.localRepository}/tomcat/tomcat/tomcat/${sakai.tomcat.version}/tomcat-${sakai.tomcat.version}.zip" dest="${basedir}/target/unpack" overwrite="true" /> <echo> Executing cd ../;mvn -Dmaven.tomcat.home=${basedir}/target/pack -Dmaven.test.skip=true clean install sakai:deploy </echo> <exec dir="../" executable="mvn" failonerror="true"> <arg value="-Dmaven.tomcat.home=${basedir}/target/pack" /> <arg value="-Dmaven.test.skip=true" /> <arg value="-Dkeystore=${keystore}" /> <arg value="-Dalias=${alias}" /> <arg value="-Dstorepass=${storepass}" /> <!-- <arg value="clean"/> --> <arg value="install" /> <arg value="sakai:deploy" /> </exec> <copy todir="${basedir}/target/pack/licenses/"> <fileset dir="${basedir}/../reference/licenses"> <exclude name=".svn/**" /> </fileset> </copy> <copy file="${basedir}/../ECLv1.txt" tofile="${basedir}/target/pack/ECLv1.txt" overwrite="true" /> <!-- zip it --> <delete file="sakai-bin-${sakai.version}.zip" /> <zip destfile="sakai-bin-${sakai.version}.zip" compress="yes"> <zipfileset dir="${basedir}/target/pack/" prefix="sakai-bin-${sakai.version}" /> </zip> <echo> * * * sakai-bin-${sakai.version}.zip </echo> <!-- tar it --> <delete file="sakai-bin-${sakai.version}.tar.gz" /> <tar destfile="sakai-bin-${sakai.version}.tar.gz" longfile="gnu" compression="gzip"> <tarfileset dir="${basedir}/target/pack/" mode="755" prefix="sakai-bin-${sakai.version}"> <include name="**/*.sh" /> </tarfileset> <tarfileset dir="${basedir}/target/pack/" prefix="sakai-bin-${sakai.version}"> <exclude name="**/*.sh" /> </tarfileset> </tar> <echo> * * * sakai-bin-${sakai.version}.tar.gz </echo> <move file="${basedir}/target/pack" tofile="${basedir}/target/pack-stage" overwrite="true" /> <move file="${basedir}/target/unpack/apache-tomcat-${sakai.tomcat.version}" tofile="${basedir}/target/pack" overwrite="true" /> <delete dir="${basedir}/target/unpack" /> <copy todir="${basedir}/target/pack"> <fileset dir="${basedir}/target/pack-stage"> <include name="**/*" /> </fileset> </copy> <!-- add in demo stuff --> <copy file="${basedir}/../reference/demo/sakai.properties" tofile="${basedir}/target/pack/sakai/sakai.properties" /> <copy todir="${basedir}/target/pack/sakai/db"> <fileset dir="${basedir}/../reference/demo/db"> <include name="**/sakai.db.*" /> </fileset> </copy> <copy file="${basedir}/../reference/demo/readme.txt" tofile="${basedir}/target/pack/demo_readme.txt" /> <copy file="${basedir}/../reference/docs/readme.txt" tofile="${basedir}/target/pack/sakai_readme.txt" /> <copy file="${basedir}/../reference/demo/start-sakai.bat" tofile="${basedir}/target/pack/start-sakai.bat" /> <copy file="${basedir}/../reference/demo/start-sakai.sh" tofile="${basedir}/target/pack/start-sakai.sh" /> <copy file="${basedir}/../reference/demo/stop-sakai.bat" tofile="${basedir}/target/pack/stop-sakai.bat" /> <copy file="${basedir}/../reference/demo/stop-sakai.sh" tofile="${basedir}/target/pack/stop-sakai.sh" /> <!-- Replace the favorite icon from tomcat --> <copy file="${basedir}/../reference/library/src/webapp/icon/favicon.ico" tofile="${basedir}/target/pack/webapps/ROOT/favicon.ico" overwrite="true" /> <!-- custom Tomcat mods --> <copy file="${basedir}/../reference/demo/index.html" tofile="${basedir}/target/pack/webapps/ROOT/index.html" /> <copy overwrite="true" file="${basedir}/target/pack/conf/server.xml" tofile="${basedir}/target/pack/conf/server-orig.xml" /> <copy overwrite="true" file="${basedir}/target/pack/conf/server-orig.xml" tofile="${basedir}/target/pack/conf/server.xml"> <filterset begintoken="maxHttpHeaderSize" endtoken=""8192"" recurse="false"> <filter token="=" value="maxHttpHeaderSize="8192" URIEncoding="UTF-8"" /> </filterset> </copy> <!-- makes all ".sh" files readable and executable for anyone on a UNIX system --> <chmod dir="${basedir}/target/pack/" perm="ugo+rx" includes="**/*.sh" /> <!-- zip it --> <delete file="sakai-demo-${sakai.version}.zip" /> <zip destfile="sakai-demo-${sakai.version}.zip" compress="yes"> <zipfileset dir="${basedir}/target/pack/" prefix="sakai-demo-${sakai.version}" /> </zip> <echo> * * * sakai-demo-${sakai.version}.zip </echo> <!-- tar it --> <delete file="sakai-demo-${sakai.version}.tar.gz" /> <tar destfile="sakai-demo-${sakai.version}.tar.gz" longfile="gnu" compression="gzip"> <tarfileset dir="${basedir}/target/pack/" mode="755" prefix="sakai-demo-${sakai.version}"> <include name="**/*.sh" /> </tarfileset> <tarfileset dir="${basedir}/target/pack/" prefix="sakai-demo-${sakai.version}"> <exclude name="**/*.sh" /> </tarfileset> </tar> <echo> * * * sakai-demo-${sakai.version}.tar.gz </echo> <delete dir="${basedir}/target/pack/" /> <delete dir="${basedir}/target/pack-stage/" /> </tasks> </configuration> <goals> <goal>run</goal> </goals> </execution> </executions> </plugin> </plugins> </build> </project>
entitybroker/pom.xml
Remove <distributionManagement> directive which disrupts build process as well as other extraneous definitions. Commit changes.
Delete the following:
<repositories> <repository> <id>sakai-maven</id> <name>Sakai Maven Repo</name> <layout>default</layout> <url>http://source.sakaiproject.org/maven2</url> <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> <snapshots> <enabled>false</enabled> </snapshots> </repository> </repositories> <distributionManagement> <repository> <id>Sakai-Maven2</id> <name>Sakaiproject Maven 2 repository</name> <url>dav:https://source.sakaiproject.org/maven2</url> </repository> <site> <id>local site</id> <url>file:/tmp/entitybroker/site/</url> </site> </distributionManagement> <issueManagement> <system>JIRA</system> <url>http://jira.sakaiproject.org/jira/browse/SAK</url> </issueManagement> <ciManagement> <system>Continuum</system> <url>http://saffron.caret.cam.ac.uk/continuum</url> <notifiers> <notifier> <type>mail</type> <sendOnError>true</sendOnError> <sendOnFailure>true</sendOnFailure> <sendOnSuccess>false</sendOnSuccess> <sendOnWarning>false</sendOnWarning> <configuration> <address>aaron@caret.cam.ac.uk</address> </configuration> </notifier> <notifier> <type>mail</type> <sendOnError>true</sendOnError> <sendOnFailure>true</sendOnFailure> <sendOnSuccess>false</sendOnSuccess> <sendOnWarning>false</sendOnWarning> <configuration> <address>antranig@caret.cam.ac.uk</address> </configuration> </notifier> </notifiers> </ciManagement> <!-- define the license --> <licenses> <license> <name>Educational Community License, Version 1.0</name> <url>http://www.opensource.org/licenses/ecl1.php</url> <distribution>repo</distribution> </license> </licenses>
Update .svnignore
Add
Sakai.keystore sakaiartifactgenerator.sh
Commit changes.
WARNING /reference/conversion
Review sql conversion scripts, update and commit as necessary.
WARNING: /master/pom.xml
Make sure sakai maven plugin <version> value does not get overwritten (e.g. "M2" gets overwritten). It should be 1.0 or later.
<plugin> <inherited>true</inherited> <groupId>org.sakaiproject.maven.plugins</groupId> <artifactId>sakai</artifactId> <version>1.0</version> . . . .
WARNING base pom.xml missing javadoc plugin configuration
Artifact generation failed on default javadoc plugin definition. Update to
<plugin> <!-- javadocs --> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> <configuration> <debug>true</debug> <links> <link>http://java.sun.com/j2se/1.5.0/docs/api/</link> <link>http://java.sun.com/j2ee/1.5.0/docs/api/</link> <link>http://static.springframework.org/spring/docs/2.0.8/api/</link> <link>http://java.sun.com/j2ee/javaserverfaces/1.1_01/docs/api/</link> <link>http://jakarta.apache.org/velocity/api/</link> <link>http://www.hibernate.org/hib_docs/v3/api/</link> <link>http://james.apache.org/javadocs/</link> <link>http://james.apache.org/mailet/</link> </links> <breakiterator>true</breakiterator> <verbose>false</verbose> <aggregate>true</aggregate> <maxmemory>512m</maxmemory> <additionalJOption>-J-Xms168m -J-Xmx512m -J-XX:PermSize=128m -J-XX:NewSize=64m</additionalJOption> <version>2.3</version> </configuration> </plugin>
WARNING Base pom missing taglib <profile>. Add and commit.
<profile> <id>taglib</id> <modules> <module>gradebook/app/ui</module> <module>help/help-tool</module> <module>jsf/widgets</module> <module>mailtool/mailtool</module> <module>metaobj/metaobj-util/tool-lib</module> <module>msgcntr/messageforums-app</module> <module>osp/common/tool-lib</module> <module>osp/glossary/tool-lib</module> <module>osp/jsf/widgets</module> <module>osp/presentation/tool-lib</module> <module>podcasts/podcasts-app</module> <module>postem/postem-app</module> <module>profile/profile-app</module> <module>roster/roster-app</module> <module>rwiki/rwiki-tool/tool</module> <module>sam/samigo-app</module> <module>sections/sections-app</module> <module>sections/sections-app-util</module> <module>syllabus/syllabus-app</module> </modules> <profile>
Update .externals
Check out RC tag .externals to local tag prep folder and update revision numbers to last tag prep commit. This ensures that the next checkout will include all tag prep commits.
cd /Users/arwhyte/Development/svn/sakai_tag_prep svn co -N https://source.sakaiproject.org/svn/sakai/tags/sakai_2-5-2_rc01 sakai_2-5-2_rc01 sed -e "s/-r[0-9]*/-r50137/" <.externals >.externals.tmp cp .externals.tmp .externals rm -f .externals.tmp svn propset -F .externals svn:externals . svn propget svn:externals svn commit -m "tag prep for next release"
Check out final RC tag again and confirm checkout includes all tag prep commits as well as updated .externals.
Generate Release artifacts
1. Mount Sakai Maven2 Repo using DAV (/Volumes/maven2). WARNING: create backup folder of maven2 so that only one copy operation is required in event of a generation failure.
2. run sh sakaiartifactgenerator.sh 2.5.2 storepass keystore
The artifactgenerator script performs the following steps
clean out previous builds clean out target, m2-target, bin clean out /tmp/maven2 replacing the M2 version with the release version in all pom.xml all .classpath all runconversion.sh, also content-runconversion.sh tar up the source perform the following sequence in master mvn install mvn -Ppack-demo install -Dkeystore=${location}/Sakai.keystore -Dalias=sakai -Dstorepass=${KEYSTOREPASS} mvn install source:jar source:test-jar deploy -Dkeystore=${location}/Sakai.keystore -Dalias=sakai -Dstorepass=${KEYSTOREPASS} mvn javadoc:javadoc mvn -Ptaglib taglib:taglibdocjar deploy where ${KEYSTOREPASS} is the keystore password and Sakai.keystore contains the certificates. then package up the maven repo in /tmp/maven2 the javadoc the sakai-demo and sakai-bin artifacts the taglibsdocs
Signing the Samigo audio jar. Uncomment the maven-jar-plugin. Comment out <keystore>, <alias> and <storepass>. DO NOT COMMIT.
<plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <executions> <execution> <goals> <goal>sign</goal> </goals> </execution> </executions> <configuration> <!-- <keystore>/somepath/your.keystore</keystore> <alias>youralias</alias> <storepass>yourpassword</storepass> --> <verify>true</verify> </configuration> </plugin> </plugins>
Update Sakai Maven2 repo
1. Make backup copy of current /org/sakaiproject folder where x.x.x equals the previous Sakai release number.
sudo cp -R sakaiproject sakaiproject.x.x.x
Generate checksums
md5sum sakai-bin-2.5.2.tar.gz > sakai-bin-2.5.2_tar_gz.md5