Versions Compared

Key

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

...

Revisions

kernel trunk r57527 (1.1-SNAPSHOT

...

refresh)

...


kernel-1.0.x

...

r57597

...

(1.0.4,

...

1.0.4-SNAPSHOT)

...


sakai-2.6.x

...

r57646

...

(testing

...

against)

...

kernel-1.0.4

...

tag

...

(r57597)

...

Current versions

Tag:

...

1.0.2

...


Branch:

...

1.0.4-SNAPSHOT

...


Trunk

...

1.1-SNAPSHOT

...

New versions

Tag:

...

1.0.4

...


Branch:

...

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

...

}
No Format
copy http://source.sakaiproject.org/maven2/org/sakaiproject/kernel 
to 
/tmp/maven2/org/sakaiproject/kernel
{noformat}

h4. Backup Sakai Maven2 Repo /kernel

Create a backup copy of /kernel.

{noformat}

Backup Sakai Maven2 Repo /kernel

Create a backup copy of /kernel.

No Format
cd /var/www/html/maven2/org/sakaiproject
sudo cp -R kernel kernel-[current version]
{noformat}

h4. Checkout the kernel project 

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

{noformat}

Checkout the kernel project

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

No Format
svn co https://source.sakaiproject.org/svn/kernel/branches/kernel-1.0.x/ kernel-1.0.x
{noformat}  

(!) 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)

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

{noformat}

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

No Format
rm -rf ~/.m2/repository/org/sakaiproject/kernel
mvn -o clean install
{noformat}

*

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:

...

}
No Format
mvn release:prepare -DdryRun=true
mvn release:clean release:prepare
mvn release:perform
{noformat}

When

...

prompted

...

for

...

new

...

versions:

...

#set

...

the

...

released

...

version

...

to

...

1.0.4

...


#set

...

the

...

tag

...

to

...

kernel-1.0.4

...


#set

...

the

...

the

...

new

...

version

...

to

...

1.0.4-SNAPSHOT

...

Should

...

the

...

build

...

fail

...

rerun

...

the

...

following

...

mvn

...

goals

...

to

...

restart

...

the

...

build:

...

}
No Format
mvn clean install 
mvn release:prepare
{noformat}

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:

No Format
mvn release:clean  (clean up release)  
mvn release:branch -DbranchName=kernel-1.1.x
{noformat} 

The release plugin will then branch the current trunk to 

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

...

tag

...

The

...

release

...

plugin

...

will

...

generate

...

a

...

1.0.4

...

tag.

...

Check

...

it

...

out

...

and

...

make

...

sure

...

it

...

works.

...

Refresh

...

Maven

...

Repo

...

with

...

1.0.4,

...

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

...

}
No Format
mvn deploy
{noformat}

2.

...

Check

...

out

...

kernel

...

trunk

...

(1.1-SHAPSHOT)

...

and

...

perform

...

}
No Format
mvn deploy
{noformat}

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

...

No Format
#!/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}`
{noformat}

h4. Populate Maven Repo

Tar up kernel artifacts.  Copy to 

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.

...

}
No Format
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
{noformat} 

h4. Repo permissions

Make sure repo permissions are correct

sudo chown -R apache:apache kernel


h3.  References

[Maven Release Plugin|http://maven.apache.org/plugins/maven-release-plugin/]
[Maven mini-guide|http://maven.apache.org/guides/mini/guide-releasing.html]

J. Ferguson, ["Using the Maven Release Plugin"|http://weblogs.java.net/blog/johnsmart/archive/2008/08/using_the_maven.html]

Repo permissions

Make sure repo permissions are correct

sudo chown -R apache:apache kernel

References

Maven Release Plugin
Maven mini-guide

J. Ferguson, "Using the Maven Release Plugin"