This document is intended for committers who are packaging a release. It likely won't be of much use to anyone else.
If this is the first time you're doing a release you'll need to perform some setup.
-
Configure your SourceForge username in ~/.m2/settings.xml (see Security and Deployment Settings).
As an example, my settings.xml looks like:
<settings> ... <servers> <server> <id>htmlunit-website</id> <username>mguillem,htmlunit</username> <!-- optional element: <password>your-sourceforge-pwd</password> --> </server> <server> <id>sonatype-nexus-snapshots</id> <username>your-jira-id</username> <!-- optional element: <password>your-jira-pwd</password> --> </server> <server> <id>ossrh</id> <username>your-jira-id</username> <!-- optional element: <password>your-jira-pwd</password> --> </server> </servers> ... </settings>
For Snapshots:
-
mvn clean deploy -Dmaven.test.skip=true
Do this for each release:
- Update maven to latest version, and delete ~/.m2/repository folder.
-
Because of the circular dependency to the HtmlUnitDriver you have to create a local release
of the driver first.
- Update the version number in pom.xml
-
Build the release and store it in the local repository
mvn -up -U clean install -Dmaven.test.skip=true
- Update the version number in pom.xml
- Update the version number and release date in src/site/xdoc/index.xml (maven dependency as well)
- Update the release date in src/changes/changes.xml
- Update the version number, release date, and maven dependency in README.md
- Remove pom.xml reference to any snapshot repository (needed for Maven upload request).
-
Build the zip files, (clean avoids duplicated pom.xml because of Maven/Eclipse conflicts)
mvn -up -U clean site package -Dmaven.test.skip=true
- Upload the two zip files (htmlunit-x.y-bin.zip and htmlunit-x.y-src.zip) to SourceForge, and make sure the binary file is the default download for all platforms.
- Make sure everything is checked in.
- Ensure HtmlUnit-related dependencies are 'tagged' in the repository.
- Deploy the release to Sonatype OSS Maven repository.
and then go to Sonatype OSS staging repository to close and release the artifacts.
mvn deploy -Dmaven.test.skip=true
- Create the version on Github
- login to Github and open project https://github.com/HtmlUnit/htmlunit
- click Releases > Draft new release
- fill the tag and title field with the release number (e.g. 1.1.0)
- append
- htmlunit-2.51.0-bin.zip
- htmlunit-2.51.0-src.zip
- do not publish the release now, we have to add a file later on
-
Create a shell to shell.sourceforge.net with your username and project group
(see Maven site plugin for details).
(On Windows, PuTTY: Connection -> SSH -> Remote Command -> "create")
ssh -t mguillem,htmlunit@shell.sf.net create
-
Delete online website (/home/project-web/htmlunit/htdocs).
rm -rf /home/project-web/htmlunit/htdocs/*
-
Deploy the site documentation (skipping the tests).
mvn -Dmaven.test.skip=true site:deploy
-
Build the OSGi bundle
mvn -Dmaven.test.skip=true org.apache.felix:maven-bundle-plugin:bundle
- Rename 'htmlunit-x.y.jar' to 'htmlunit-x.y-OSGi.jar', and upload it to SourceForge files and to the Github release.
- publish the Github release
- Send out the usual email to the mailing list and inform via twitter also.
- Update the version number in pom.xml to start next snapshot development.