sakai-kernel-1.0.6 release

Revisions

kernel trunk r60339 (1.1-SNAPSHOT refresh)
kernel-1.0.x r60342 (1.0.6, 1.0.7-SNAPSHOT)

New versions

Tag: 1.0.6
Branch: 1.0.7-SNAPSHOT
Trunk 1.1-SNAPSHOT

Testing exceptions

None. sakai.kernel.version property added to gradebook/app/standalone-app/pom.xml and sections/sections-impl/integration-support/pom.xml now binds to sakai-kernel-impl properly

Performing the release

Copy Maven2 /kernel locally

Start now as this can take some time. Folder copy will later serve as target for deploying artifacts generated during the deploy phase.

copy http://source.sakaiproject.org/maven2/org/sakaiproject/kernel 
to 
/tmp/maven2/org/sakaiproject/kernel

Backup Sakai Maven2 Repo /kernel

Create a backup copy of /kernel.

cd /var/www/html/maven2/org/sakaiproject
sudo cp -R kernel kernel-[current version]

Remove old 1.0.X SNAPSHOTS and <version> references in maven-metadata.xml files

\

bash deletesakaiartifact.bash  1.0.6-SNAPSHOT /tmp/maven2/org/sakaiproject/kernel

Checkout the kernel project

Checkout a clean version of the project using SVN not git.

svn co https://source.sakaiproject.org/svn/kernel/branches/kernel-1.0.x/ kernel-1.0.x

(warning) Avoid opening it in Eclipse; otherwise you will pollute the projects with Eclipse metadata files that will have to be deleted before performing the release. Checkout with svn (not git)

Clean out local repo

Verify that a clean build works ok with no external dependencies. Issuing mvn -o clean install ensures that .m2 repo is populated, a requirement for the assembly plugin. If the build fails because external dependencies are missing in .m2 run mvn clean install, then delete /kernel and run mvn -o clean install again.

rm -rf ~/.m2/repository/org/sakaiproject/kernel
mvn -o clean install

Note: check for Eclipse metadata files (.classpath, .project) and remove. Uncommitted versions of these files will cause mvn release:prepare to fail.

Create tag

Issue the following release plugin goals:

mvn release:prepare -DdryRun=true
mvn release:clean release:prepare release:perform

When prompted for new versions:

#set the released version to 1.0.6
#set the tag to kernel-1.0.6
#set the the new version to 1.0.6-SNAPSHOT

Should the build fail rerun the following mvn goals to restart the build:

mvn clean install 
mvn release:prepare

to restart the build.

Note: Beware opening the kernel in Eclipse. If you do you will have to delete Eclipse metadata files (.classpath, .project) before running mvn release:prepare.

Trunk vs Branch releases

When releasing from trunk, issue the branch goal to create a new branch:

mvn release:clean  (clean up release)  
mvn release:branch -DbranchName=kernel-1.1.x

The release plugin will then branch the current trunk to branches/kernel-1.1.x.
Edit the poms to 1.2-SNAPSHOT and commit.

Finis

Check 1.0.6 tag

The release plugin will generate a 1.0.6 tag. Check it out and make sure it works.

Refresh Maven Repo with 1.0.6, 1.0.6-SNAPSHOT and 1.1-SNAPSHOT artifacts

Each new release will require placement of corresponding kernel artifacts in the Maven2 repo.
Steps:

1. Check out 1.0.x branch (1.0.6-SNAPSHOT) and perform

mvn deploy

2. Check out kernel trunk (1.1-SHAPSHOT) and perform

mvn deploy

For each new version (tag, SNAPSHOT) issue the following command from the root folder:

If a release:

mvn -Prelease clean install deploy -DupdateReleaseInfo=true

if a SNAPSHOT

mvn deploy

Maven will populate /tmp/maven2/org/sakaiproject/kernel with updated artifacts

SNAPSHOT refreshes

When refreshing SNAPSHOT artifacts, delete the existing artifact folder and contents before running mvn deploy.

bash deletesakaiartifact.bash 1.1-SNAPSHOT /tmp/maven2/org/sakaiproject/kernel

#!/bin/sh
# Delete artifact folders prior to deploying Maven snapshot artifacts.
# This is necessary as Maven does not update it's metadata files correctly when an old artifact exists in the repo.
# bash deletesakaiartifact.bash [TARGET FOLDER NAME] (e.g., 1.1-SNAPSHOT) [LOCATION] (e.g. /tmp/maven2/org/sakaiproject/kernel)
# author=Anthony Whyte, arwhyte@umich.edu

TARGET=$1
LOCATION=$2

cd $LOCATION
echo "Removing ${TARGET} folders and content recursively from ${LOCATION}"
rm -rf `find . -type d -name ${TARGET}`

Populate Maven Repo

Tar up kernel artifacts. Copy to source.sakaiproject.org. Make sure backup of existing /kernel directory is in place. Explode tar file.

tar -cvzf  kernelrepo.tgz /tmp/maven2/org/sakaiproject/kernel}}

copy kernelrepo.tgz to Maven2 repo

cd /var/www/maven2/org/sakaiproject
tar xvzf kernelrepo.tgz

Repo permissions

Make sure repo permissions are correct

sudo chown -R apache:apache kernel

Jira Kernel project

Set 1.0.6 version to released; add 1.0.6 (tentative).

Jira Release Mgmt project

Update home page and Kernel page.

References

Maven Release Plugin
Maven mini-guide

J. Ferguson, "Using the Maven Release Plugin"