Per Apache release policy we need to build, vote on and release a source distribution. As a convenience to our users, we can also provide binary packages, that are uploaded to Maven Central, and a binary archive for folks that for whatever reason don't use Maven.
This assumes running a unix-y environment (i.e. OS X, Linux) and that you have the necessary tools installed, such as recent Maven, Java 6, gpg (-agent).
{% highlight console %} eval gpg-agent --daemon --pinentry-program /usr/local/bin/pinentry
{% endhighlight %}
{% highlight console %} export NEWVERSION=6.0.0 export APACHEID=apacheid {% endhighlight %}
{% highlight console %} gpg --armor --detach-sign --use-agent --sign pom.xml rm pom.xml.asc {% endhighlight %}
{% highlight console %} mvn release:branch -DbranchName=build/wicket-$NEWVERSION {% endhighlight %}
{% highlight console %} git checkout build/wicket-$NEWVERSION {% endhighlight %}
Update archetypes/quickstart/src/main/archetype-resources/pom.xml to use NEWVERSION of Wicket and commit
Use Maven to do the first steps of the release process by
{% highlight console %} mvn release:prepare {% endhighlight %}
{% highlight console %} git reset HEAD^ --hard {% endhighlight %}
{% highlight console %} git archive --format=tar.gz --prefix=apache-wicket-$NEWVERSION/ -o apache-wicket-$NEWVERSION.tar.gz wicket-$NEWVERSION git archive --format=zip --prefix=apache-wicket-$NEWVERSION/ -o apache-wicket-$NEWVERSION.zip wicket-$NEWVERSION {% endhighlight %}
{% highlight console %} gpg --armor --detach-sign --use-agent --sign apache-wicket-$NEWVERSION.tar.gz gpg --armor --detach-sign --use-agent --sign apache-wicket-$NEWVERSION.zip gpg --print-md SHA1 apache-wicket-$NEWVERSION.tar.gz > apache-wicket-$NEWVERSION.tar.gz.sha gpg --print-md MD5 apache-wicket-$NEWVERSION.tar.gz > apache-wicket-$NEWVERSION.tar.gz.md5 gpg --print-md SHA1 apache-wicket-$NEWVERSION.zip > apache-wicket-$NEWVERSION.zip.sha gpg --print-md MD5 apache-wicket-$NEWVERSION.zip > apache-wicket-$NEWVERSION.zip.md5 {% endhighlight %}
To sign the tag (overwrites the maven generated tag), execute:
{% highlight console %} git tag -s --force wicket-$NEWVERSION {% endhighlight %}
{% highlight console %} ssh $APACHEID@people.apache.org mkdir public_html/wicket-$NEWVERSION scp apache-wicket-* $APACHEID@people.apache.org:public_html/wicket-$NEWVERSION {% endhighlight %}
The step below uploads the artifacts to a staging area for Maven.
{% highlight console %} mvn release:perform {% endhighlight %}
This will upload artifacts and signatures to Apache nexus in a staging repository.
As we don't vote on binary packages, but do want to cater to developers not using Maven, it is very convenient to create a download for non-Maven users.
The binary distribution should contain the same jar files that are uploaded to Maven Central. Unfortunately the Maven build creates duplicate jar files, but with different manifests (due to the inclusion of date/time of build), and the jar files have different signatures. Therefore it is necessary to create a distribution of the artifacts generated by the mvn release:perform
command.
Perform the following commands in the root of your Wicket checkout to create the binary release files.
{% highlight console %} mkdir apache-wicket-$NEWVERSION cd apache-wicket-$NEWVERSION find ../target/checkout ! ( -type d -name “WEB-INF” -prune ) -regex “.wicket-..[jw]ar” ! -name “-sources” ! -name “-javadoc” ! -name “wicket-archetype-quickstart” ! -name “wicket-common-tests*” -type f -exec cp {} . ; find ../target/checkout ! ( -type d -name “WEB-INF” -prune ) -regex “.wicket-..[jw]ar.asc” ! -name “-sources” ! -name “-javadoc” ! -name “wicket-archetype-quickstart” ! -name “wicket-common-tests*” -type f -exec cp {} . ; cp ../LICENSE . cp ../README . cp ../NOTICE . cd .. tar cfz apache-wicket-$NEWVERSION-bin.tar.gz apache-wicket-$NEWVERSION zip -r apache-wicket-$NEWVERSION-bin.zip apache-wicket-$NEWVERSION gpg --armor --detach-sign --use-agent --sign apache-wicket-$NEWVERSION-bin.tar.gz gpg --armor --detach-sign --use-agent --sign apache-wicket-$NEWVERSION-bin.zip gpg --print-md SHA1 apache-wicket-$NEWVERSION-bin.tar.gz > apache-wicket-$NEWVERSION-bin.tar.gz.sha gpg --print-md MD5 apache-wicket-$NEWVERSION-bin.tar.gz > apache-wicket-$NEWVERSION-bin.tar.gz.md5 gpg --print-md SHA1 apache-wicket-$NEWVERSION-bin.zip > apache-wicket-$NEWVERSION-bin.zip.sha gpg --print-md MD5 apache-wicket-$NEWVERSION-bin.zip > apache-wicket-$NEWVERSION-bin.zip.md5 ssh $APACHEID@people.apache.org mkdir public_html/wicket-$NEWVERSION/bin scp apache-wicket-bin. $APACHEID@people.apache.org:public_html/wicket-$NEWVERSION/bin {% endhighlight %}
This binary release contains all required files to comply with the release policy, and the binary artefacts generated by our Maven release build, including the experimental modules and examples.
Start a vote on dev@ for this release. Allow for at least 72 hours, and ensure you take into account weekends.
When the vote has passed successfully (at least 3 binding +1's) push the branch and the tag to Apache git:
{% highlight console %} git push origin build/wicket-$NEWVERSION:refs/heads/build/wicket-$NEWVERSION git push -tags origin {% endhighlight %}
You only need to do them if you haven't done so yet.
See also managing nexus for the steps needed to publish the artifacts to Maven Central. And don't forget to announce the release!
Make sure your ~/.m2/settings.xml
contains the following definition
{% highlight console %}
The key to stage and manage repositories on Apache Nexus Staging repo are your Apache Commiter credentials.
Note: The steps below are part of release-igor.sh script!
When you run mvn -P release deploy the generated artifacts will be uploaded into a Nexus staging repository.
Maven sends a username/password when attempting to upload the artifacts.
The <id>
of the staging repository is: apache.releases.https.
Place a <server>
definition in your ~/.m2/settings.xml
file like this:
{% highlight console %}
This works if you can deploy artifacts into the repository.apache.org properly (i.e. you don't see failures mentioning 401 errors).
By logging in with your Apache committer credentials to Apache Nexus Staging repo you can access the management interface for the staged artifacts.
The interface will allow you to:
More information is available at: Publishing Maven Artifacts
Edit the _config.yaml file. This file contains a site wide configuration section specific to Wicket:
{% highlight yaml %} wicket: version: 1.4.10 released: 2010-08-11 versions: [1.3.7, 1.3-SNAPSHOT, 1.4.9, 1.4.10, 1.4-SNAPSHOT, 1.5-M1, 1.5-SNAPSHOT] {% endhighlight %}
You'll need to edit this part: modify the version, update the released date, and add the new version to the versions list (remove any stale releases, typically just leave the previous release as well).
{% highlight console %}
mvn javadoc:aggregate
cp -r target/site/apidocs/* ../wicket-common/site/apidocs/1.4/ cd ../wicket-common/
svn stat | grep -e ‘^?’ | sed ‘s/?\W*//’ | xargs svn add svn commit -m “changes to update javadocs to latest release” {% endhighlight %}