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 clean deploy -Dmaven.test.skip=true
    

Do this for each release:

  1. Update maven to latest version, and delete ~/.m2/repository folder.
  2. Because of the circular dependency to the HtmlUnitDriver you have to create a local release of the driver first.
    1. Update the version number in pom.xml
    2. Build the release and store it in the local repository
      mvn -up -U clean install -Dmaven.test.skip=true
  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. Update the version number, release date, and maven dependency in README.md
  7. Remove pom.xml reference to any snapshot repository (needed for Maven upload request).
  8. Build the zip files, (clean avoids duplicated pom.xml because of Maven/Eclipse conflicts)
    mvn -up -U clean site package -Dmaven.test.skip=true
  9. 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.
  10. Make sure everything is checked in.
  11. Ensure HtmlUnit-related dependencies are 'tagged' in the repository.
  12. Deploy the release to Sonatype OSS Maven repository.
    mvn deploy -Dmaven.test.skip=true
    and then go to Sonatype OSS staging repository to close and release the artifacts.
  13. Create the version on Github
    1. login to Github and open project https://github.com/HtmlUnit/htmlunit
    2. click Releases > Draft new release
    3. fill the tag and title field with the release number (e.g. 1.1.0)
    4. append
      • htmlunit-2.51.0-bin.zip
      • htmlunit-2.51.0-src.zip
    5. do not publish the release now, we have to add a file later on
  14. Create a shell to shell.sourceforge.net with your username and project group (see Maven site plugin for details).
    ssh -t mguillem,[email protected] create
    (On Windows, PuTTY: Connection -> SSH -> Remote Command -> "create")
  15. Delete online website (/home/project-web/htmlunit/htdocs).
    rm -rf /home/project-web/htmlunit/htdocs/*
  16. Deploy the site documentation (skipping the tests).
    mvn -Dmaven.test.skip=true site:deploy
  17. Build the OSGi bundle
    mvn -Dmaven.test.skip=true org.apache.felix:maven-bundle-plugin:bundle
  18. Rename 'htmlunit-x.y.jar' to 'htmlunit-x.y-OSGi.jar', and upload it to SourceForge files and to the Github release.
  19. publish the Github release
  20. Send out the usual email to the mailing list and inform via twitter also.
  21. Update the version number in pom.xml to start next snapshot development.