Building

Building the CometD Project

Building the CometD code has 2 minimum requirements:

You can obtain the source code from either the distribution tarball (see here), or by checking out the source from the CometD subversion repository.
Either unpack the distribution:

$ tar zxvf cometd-[version]-distribution.tar.gz
$ cd cometd-[version]

or checkout from subversion:

$ svn co http://svn.cometd.com/trunk cometd/trunk # For CometD 2.x
$ cd cometd/trunk

$ svn co http://svn.cometd.com/branches/cometd1 cometd/branches/cometd1 # For CometD 1.x
$ cd cometd/branches/cometd1

At this point you need to issue the following command:

$ mvn clean install

If you want to save some time, you can skip the execution of the test suite using the following command:

$ mvn clean install -Dmaven.test.skip=true

Trying Out Your Build

To try out your build just follow these steps (after having built following the above instructions):

$ cd cometd-demo
$ mvn jetty:run

Then point your browser at http://localhost:8080 and you should see the CometD Demo page.

Committers Release Instructions

The following instructions only apply to the CometD project committers.

1. Creating the Release

Work from a fresh checkout of the trunk/branch to release, for example using trunk:

$ svn co https://svn.cometd.org/trunk release/trunk
...
$ cd release/trunk
$ mvn clean install
...
$ mvn release:prepare # Specify the SVN tag to be just the version number
...
$ mvn release:perform
...

2. Managing the Repository

Login to http://oss.sonatype.org.
Under "Enterprise - Staging" choose "cometd", and you should see the staged project just uploaded by the mvn release:perform command issued above, with status "open".
Right click on the open staged project, choose "Close" from the popup menu, and enter a description such as "CometD Release 1.0.0". This will make the staged project downloadable for testing, but not yet published to central.
Right click again on the closed staged project, choose "Promote" from the popup menu, choose the "cometd Releases" repository, then click "Promote". This will publish the project to central.

3. Creating the Distribution Tarball

Work from a fresh checkout of the tag just released (or from the target/checkout directory if you ran the release:perform step):

$ svn co https://svn.cometd.org/tags/<version> release/tag
...
$ cd release/tag
$ mvn clean install
...
$ cd cometd-distribution
$ mvn assembly:assembly
...

This creates the distribution tarball in the cometd-distribution/target directory.

4. Uploading the Distribution Tarball

Upload the tarball:

$ scp cometd-distribution/target/cometd-<version>-distribution.tar.gz <user>@download.cometd.org:/srv/www/vhosts/download.cometd.org/

5. Upload the Archetype Catalog

Make sure the archetype catalog $HOME/.m2/archetype-catalog.xml refers to the release just prepared, then upload it:

$ scp $HOME/.m2/archetype-catalog.xml <user>@cometdproject.dojotoolkit.org:/srv/www/vhosts/cometd.org/

6. Release in JIRA

Perform a release in Jira.