mvn clean install

# Check integration tests (with jmx4perl/it/it.pl)
# Check Javascript tests
cd client/javascript/test-app
# Fix version number, test-app is not increased with the release plugin
mvn clean install jetty:run-exploded
firefox http://localhost:8080/

# =======================================================================
# Increase Version Numbers:

vi src/docbkx/index.xml
vi client/javascript/src/main/javascript/jolokia.js
vi client/javascript/src/main/javascript/jolokia-cubism.js
vi agent/core/src/main/java/org/jolokia/Version.java
vi pom.xml
--> <currentStableVersion>1.0.0</currentStableVersion>
    <currentSnapshotVersion>1.0.1-SNAPSHOT</currentSnapshotVersion>
vi src/changes/changes.xml and update date

Check in and push

# ========================================================================
# Build release and deploy it on labs
git clone git@github.com:rhuss/jolokia.git
cd jolokia
mvn -Dmaven.repo.local=/tmp/repo -DdevelopmentVersion=1.0.1-SNAPSHOT -DreleaseVersion=1.0.0 -Dtag=v1.0.0 -Pdist,roo release:prepare
mvn -Dmaven.repo.local=/tmp/repo -DdevelopmentVersion=1.0.1-SNAPSHOT -DreleaseVersion=1.0.0 -Dtag=v1.0.0 -Pdist,roo release:perform

# Copy assembly to Github

* Create a new release ("Draft a release" - Button)
* Upload tar.gz and zip files from target/checkout/src/assembly/target
* Upload all JavaScript files in target/checkout/client/javascript/target:
  - compressed/jolokia-*.js
  - scripts/jolokia*.js
* Upload JVM debian package from
  - agent/jvm/target/*.deb

# Deploy to Sonatype staging
cd target/checkout
mvn -Dmaven.repo.local=/tmp/repo -Pdist,roo deploy
cd ../..

# Release on central maven repo
# See: https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide
# Staging Nexus: https://oss.sonatype.org/
# Steps todo:
# 1. Login into https://oss.sonatype.org/
# 2. "Staging Repositories"
# 3. Select staging repository
# 4. Click "Close" in menu
# 5. Check the artifacts in the "closed" repository
# 6. If ok --> click "Release" in menu

# ========================================================================
# Adapt meta data

# Add new release to jolokia.meta
vi src/site/resources/jolokia.meta
# Sign and create checksums
gpg --allow-weak-digest-algos --digest-algo=SHA1 --local-user roland@jolokia.org -a -b src/site/resources/jolokia.meta
shasum src/site/resources/jolokia.meta > src/site/resources/jolokia.meta.sha1
md5 -q src/site/resources/jolokia.meta > src/site/resources/jolokia.meta.md5


# ========================================================================
# Recreate Website (~/jolokia)

# Update version number in site.xml to next dev version
vi ./src/site/site.xml
# Update Skin version to next snapshot
vi tools/site-skin/pom.xml
git commit -a

# Adapted tracking code
git co analytics
git rebase master
cd tools/site-skin; mvn clean install;
cd ../..
mvn clean install
mvn -N -Pdist site

# Roo-Plugin:
# Adapt uri and version number in root-repository.xml to use a httpgpg URL instead of a relative http
# /home/maven-repository/www/htdocs/repository/roo-repository.xml
# URL

# =============================================================================
# Snapshot release

# Set version number in Version.java, jolokia.js, jolokia-cubism.js, test-app/pom.xml, docbkx/index.xml
mvn -Pdist deploy
# Adapt URI and version number in root-repository.xml on labs.consol.de to us a httppgp URL


