From e49abd2d50a8171825a6d5db49f00a98f51a2c06 Mon Sep 17 00:00:00 2001 From: Will Lauer Date: Wed, 1 Jul 2015 12:48:14 -0500 Subject: [PATCH 1/2] Enabling maven support and removing ant support for building sketch library. --- build.xml | 296 ------------------------------------------------------ pom.xml | 70 +++++++++++++ 2 files changed, 70 insertions(+), 296 deletions(-) delete mode 100755 build.xml create mode 100644 pom.xml diff --git a/build.xml b/build.xml deleted file mode 100755 index 698af9c88..000000000 --- a/build.xml +++ /dev/null @@ -1,296 +0,0 @@ - - - - - - Build file for Sketch Library - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pom.xml b/pom.xml new file mode 100644 index 000000000..fe51c5411 --- /dev/null +++ b/pom.xml @@ -0,0 +1,70 @@ + + 4.0.0 + + com.yahoo.data-sketches + sketches-core + 0.0.1-SNAPSHOT + jar + + Sketch Core + Core Sketch library + http://datasketches.github.io/ + + 2015 + + Yahoo! Inc. + http://www.yahoo.com + + + + + Apache License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0 + repo + + + + + scm:git:https://github.com/DataSketches/sketches-core + scm:git:git://github.com/DataSketches/sketches-core + https://www.github.com/DataSketches/sketches-core + + + + 1.8 + 1.8 + UTF-8 + + + + + org.testng + testng + 6.8.8 + test + + + + + + + + org.apache.maven.plugins + maven-source-plugin + 2.4 + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.10.3 + + + org.apache.maven.plugins + maven-deploy-plugin + 2.8.2 + + + + + \ No newline at end of file From c26a12f9490d03aec184a177259f15cfd4c61a92 Mon Sep 17 00:00:00 2001 From: Will Lauer Date: Wed, 1 Jul 2015 15:52:08 -0500 Subject: [PATCH 2/2] Adding instructions for building and releasing with maven --- README.md | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/README.md b/README.md index 4cec105ad..a8217b2a9 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,58 @@ # sketches-core Core Sketch Library + +## Building +Use Apache Maven 3.0 to build this project + +### Basic Build + mvn clean install + +### Build including source and javadoc jars + mvn -P release-profile clean install + +### Release build, incrementing the version number and publising to maven central repository + +#### Prepare a release +First, "prepare" a release. Preparing a release ensures you have no checked out file and no SNAPSHOT dependencies. +It changes the version in all pom.xml files to the release version. It then runs all the tests. If everything passes, +the release version is committed to the SCM system and tagged. The version number is then updated in all the pom.xml +files again, this time to the next development version. Finally, the changes are commited again to the SCM repository. + + mvn release:prepare + +1. ensure you have **no** uncommitted files in your workspace. Ideally, use a fresh workspace for the release process. +2. Answer the prompts with appropriate values for the tag, version, and new development version + - release version should be something like 1.0.1 + - development version should be something like 1.0.2-SNAPSHOT + - tag should be something like sketches-core-1.0.1 +3. If the prepare has an error (the build will fail if any tests fail), run 'mvn release:clean' to clean up the +generated files and reset the workspace. If the prepare needs to be rolled back (undone in the SCM system), run 'mvn release:rollback'. + +See http://maven.apache.org/maven-release/maven-release-plugin/examples/prepare-release.html for more info. + +#### Perform a release: +Next, "perform" a release. Performing a release checks out the tagged release from the SCM system into a new directory, +builds it, and then runs the configured deploy goals to publish the release to a maven repository (Maven central). Performing +a release automatically enables the `release-profile` in maven, causing source and javadoc jars to be automatically created +and published. + + mvn release:perform + +You can add the '-DdryRun=true' option to test the release process without actually generating a release. dryRun is +supported on both the prepare and perform steps. + +See http://maven.apache.org/maven-release/maven-release-plugin/examples/perform-release.html for more info. + +#### Rollback a release +If a release has been prepared but not performed yet, the release can be rolled back. Rolling back a release resets +the pom.xml version numbers and tags in the SCM system, effectively nullifying the release. + + mvn release:rollback + +A release cannot be rolled back if it has already been cleaned up (the release.properties file and other metadata removed). + +#### Clean a release +If a release fails to prepare or crashs, it can leave various files behind. These can be cleaned up with a release clean. + + mvn release:clean +