Building the CometD Project
Building the CometD code has 2 minimum requirements:
$ tar zxvf cometd-[version]-distribution.tar.gz $ cd cometd-[version]
or checkout from the GitHub or Subversion repository:
$ git clone git://github.com/cometd/cometd.git cometd # For CometD greater than 2.2.0 $ cd cometd $ svn co http://svn.cometd.org/trunk cometd/trunk # For CometD 2.x until 2.2.0 included $ cd cometd/trunk $ svn co http://svn.cometd.org/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 -DskipTests=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:
$ git clone git://github.com/cometd/cometd.git release/cometd ... $ cd release/cometd $ mvn clean install ... $ mvn release:prepare # Specify the SVN tag to be just the version number ... $ mvn release:perform -Darguments=-Dgpg.passphrase=... ... $ git push origin master
2. Managing the Repository
Login to http://oss.sonatype.org.
Click on "Build Promotion - Staging Repositories" and you should see the staged project just uploaded by the
mvn release:perform command issued above, with status "open".
Tick the checkbox correspondent to the open staged project, choose "Close" from the toolbar, enter a description such as "CometD Release 1.0.0", then click on the "Close" button.
This will make the staged project downloadable for testing, but not yet published to central.
Tick again the checkbox correspondent to the closed staged project, choose "Release" from the toolbar, enter a description such as "CometD Release 1.0.0", then click on the "Release" button. 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):
$ git checkout <version> ... $ mvn clean install -DskipTests=true ... $ cd cometd-distribution $ mvn assembly:assembly ...
This creates the distribution tarball in the
4. Uploading the Distribution Tarball
Upload the tarball:
$ scp cometd-distribution/target/cometd-<version>-distribution.tar.gz <user>@download.cometd.org:/srv/www/vhosts.d/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>@cometd.org:/srv/www/vhosts.d/cometd.org/
6. Upload Javadocs
Build and upload the javadocs:
$ cd cometd-java $ mvn javadoc:aggregate-jar $ scp target/cometd-java-<version>-javadoc.jar <user>@docs.cometd.org:/srv/www/vhosts.d/docs.cometd.org/
then unjar the javadoc jar file into directory "apidocs".
7. Release in JIRA
Perform a release in Jira.
8. Tag Dojo Bindings
$ git clone https://github.com/cometd/cometd-dojo.git $ cd cometd-dojo $ git pull
Now edit the
package.json file, updating the CometD version and the Dojo dependency version.
$ get push $ git tag -a "<version>" -m "CometD Release <version>." $ git push --tags