Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 12 Next »

Revisions

kernel trunk r57527 (1.1-SNAPSHOT refresh)
kernel-1.0.x r57597 (1.0.3, 1.0.4-SNAPSHOT)
sakai-2.6.x r57646 (testing against)

kernel-1.0.3 tag (r57597)

Current versions

Tag: 1.0.2
Branch: 1.0.3-SNAPSHOT
Trunk 1.1-SNAPSHOT

New versions

Tag: 1.0.3
Branch: 1.0.4-SNAPSHOT
Trunk 1.1-SNAPSHOT

Testing exceptions

When testing before generating the release, make sure you change the hard-coded kernel dependencies to <version>1.0.3-SNAPSHOT</version> in /master/pom.xml and gradebook/app/standalone-app/pom.xml. This will need to be updated to 1.0.3 in the 2.6.x branch after the release along with the /master/pom.xml. The old sections integration-support 1.0RC2 dependency is fixed and needs to be merged to 2.6.x

gradebook/app/standalone-app/pom.xml

<!-- This should be part of the test framework -->
    <dependency>
      <groupId>org.sakaiproject.kernel</groupId>
      <artifactId>sakai-kernel-private</artifactId>
      <version>1.0.3-SNAPSHOT</version>
      <scope>test</scope>
    </dependency>

sections/sections-impl/integration-support/pom.xml

<!--
Binding directly to the kernel impl is not a good idea,
It is liable to change.
When a test harness becomes available this code should be ported.

Hard coding the version so that we dont forget.
-->
    <dependency>
      <groupId>org.sakaiproject.kernel.impl</groupId>
      <artifactId>sakai-util-impl</artifactId>
      <version>1.0RC2-SNAPSHOT</version>
    </dependency>

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]

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
mvn release:perform

When prompted for new versions:

#set the released version to 1.0.3
#set the tag to kernel-1.0.3
#set the the new version to 1.0.4-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.3 tag

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

Refresh Maven Repo with 1.0.3, 1.0.4-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.4-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

References

Maven Release Plugin
Maven mini-guide

J. Ferguson, "Using the Maven Release Plugin"

  • No labels