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.

  1. 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:

  1. mvn -Dmaven.test.skip=true deploy
    

Now do this for each release:

  1. Update maven to latest version, and delete ~/.m2/repository folder.
  2. In pom.xml: temporarily remove "-Xdoclint:none" javadoc configuration and try to fix javadoc errors other than "script" in BrowserVersion.
  3. Update the version number in pom.xml
  4. Update the version number and release date in src/site/xdoc/index.xml (maven dependency as well)
  5. Update the release date in src/changes/changes.xml
  6. Remove pom.xml reference to any snapshot repository (needed for Maven upload request).
  7. Build the zip files
    mvn -up clean site package -Dmaven.javadoc.failOnError=false
  8. 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.
  9. Make sure everything is checked in and tag the release:
    mvn scm:tag
    
  10. Ensure HtmlUnit-related dependencies are 'tagged' in the repository.
  11. Deploy the release to Sonatype OSS Maven repository.
    mvn deploy
    
    and then go to Sonatype OSS staging repository to close and release the artifacts.
  12. Create a shell to shell.sourceforge.net with your username and project group (see Maven site plugin for details).
    ssh -t mguillem,htmlunit@shell.sf.net create
    (On Windows, PuTTY: Connection -> SSH -> Remote Command -> "create")
  13. Delete online website (/home/project-web/htmlunit/htdocs).
    rm -rf /home/project-web/htmlunit/htdocs/*
  14. Deploy the site documentation (skipping the tests).
    mvn -Dmaven.test.skip=true site:deploy
  15. Build the OSGi bundle
    mvn -Dmaven.test.skip=true org.apache.felix:maven-bundle-plugin:bundle
  16. Rename 'htmlunit-x.y.jar' to 'htmlunit-x.y-OSGi.jar', and upload it to SourceForge files.
  17. Add a new Milestone in SourceForge bugs system (for both Bugs and Feature-Requests).