Packaging a Release
This document is intended for committers who are packaging a release. It likely won't be of much use to anyone else.
Initial One-Time Setup
If this is the first time you're performing a release, configure your SourceForge and Sonatype
credentials in ~/.m2/settings.xml (see Security and Deployment Settings).
<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>
Deploying Snapshots
To deploy a snapshot build:
mvn clean deploy -Dmaven.test.skip=true
Release Procedure
Follow these steps for each release:
- Update Maven to the latest version and clean the local repository cache if needed.
-
Because of the circular dependency with
HtmlUnitDriver, create a local release of the driver first:- Update the version number in
pom.xml. -
Build and install to local repository:
mvn -up -U clean install -Dmaven.test.skip=true
- Update the version number in
- Update the version number in
pom.xml. - Update the version number and release date in
src/site/xdoc/index.xml(including the Maven dependency snippet). - Update the release date in
src/changes/changes.xml. - Update the version number, release date, and Maven dependency in
README.md. - Remove references to any snapshot repository from
pom.xml(required for Maven upload requests). -
Build the site and release zip files:
mvn -up -U clean site package -Dmaven.test.skip=true -
Upload the two generated zip files (
htmlunit-x.y.z-bin.zipandhtmlunit-x.y.z-src.zip) to SourceForge, and set the binary package as the default download for all platforms. - Ensure all workspace changes are committed to Git.
- Ensure HtmlUnit-related dependency tags exist in the repository.
-
Deploy the release to the Sonatype OSS Maven repository:
Then visit the Sonatype OSS staging repository to close and release the artifacts.mvn deploy -Dmaven.test.skip=true -
Draft the GitHub release:
- Open https://github.com/HtmlUnit/htmlunit.
- Click Releases > Draft a new release.
- Fill in the tag and title fields with the target version number (e.g.
3.11.0). - Attach
htmlunit-x.y.z-bin.zipandhtmlunit-x.y.z-src.zip. - Do not publish yet—additional artifacts will be attached in a later step.
-
Open a shell session on SourceForge:
ssh -t mguillem,htmlunit@shell.sf.net create -
Clear the previous site deployment directory:
rm -rf /home/project-web/htmlunit/htdocs/* -
Deploy the updated site documentation:
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.z.jartohtmlunit-x.y.z-OSGi.jar, then upload it to SourceForge files and the pending GitHub release. - Publish the GitHub release.
- Announce the release on the mailing list and project social channels.
- Update the version number in
pom.xmlto start the next snapshot development cycle.

