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
    

Now do this for each release:

  1. Update maven to latest version, and delete ~/.m2/repository folder.
  2. Update the version number in pom.xml
  3. Update the version number and release date in src/site/xdoc/index.xml (maven dependency as well)
  4. Update the release date in src/changes/changes.xml
  5. Remove pom.xml reference to any snapshot repository (needed for Maven upload request).
  6. Build the zip files, (clean avoids duplicated pom.xml because of Maven/Eclipse conflicts)
    mvn -up clean site package -Dmaven.test.skip=true
  7. 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.
  8. Make sure everything is checked in and tag the release:
    mvn scm:tag
    
  9. Ensure HtmlUnit-related dependencies are 'tagged' in the repository.
  10. 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.
  11. 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")
  12. Delete online website (/home/project-web/htmlunit/htdocs).
    rm -rf /home/project-web/htmlunit/htdocs/*
  13. Deploy the site documentation (skipping the tests).
    mvn -Dmaven.test.skip=true site:deploy
  14. Build the OSGi bundle
    mvn -Dmaven.test.skip=true org.apache.felix:maven-bundle-plugin:bundle
  15. Rename 'htmlunit-x.y.jar' to 'htmlunit-x.y-OSGi.jar', and upload it to SourceForge files.
  16. Add a new Milestone in SourceForge bugs system (for both Bugs and Feature-Requests).