From 8a1bcc39c5b53d0fc4e16f539564e0ff0bccdddf Mon Sep 17 00:00:00 2001 From: fyrz Date: Sat, 15 Nov 2014 01:09:54 +0100 Subject: [PATCH 1/2] [RocksJava] Bump version to 3.8 in rocksjni.pom --- java/rocksjni.pom | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/rocksjni.pom b/java/rocksjni.pom index 552e26f8ee..c0ee88c22e 100644 --- a/java/rocksjni.pom +++ b/java/rocksjni.pom @@ -8,7 +8,7 @@ http://rocksdb.org/ org.rocksdb rocksdbjni - 3.6.0 + 3.8.0 RocksDB fat jar that contains .so files for linux32 and linux64, and jnilib files for Mac OSX. From b8d5e3f08e075fb37af73fdd9dceb7d369f38dd7 Mon Sep 17 00:00:00 2001 From: fyrz Date: Sat, 15 Nov 2014 20:12:04 +0100 Subject: [PATCH 2/2] [RocksJava] MVN Build reads version from version.h --- java/rocksjni.pom | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/java/rocksjni.pom b/java/rocksjni.pom index c0ee88c22e..e18a7734d3 100644 --- a/java/rocksjni.pom +++ b/java/rocksjni.pom @@ -8,7 +8,8 @@ http://rocksdb.org/ org.rocksdb rocksdbjni - 3.8.0 + + - RocksDB fat jar that contains .so files for linux32 and linux64, and jnilib files for Mac OSX. @@ -139,6 +140,38 @@ + + org.codehaus.gmaven + groovy-maven-plugin + 2.0 + + + process-classes + + execute + + + + Xenu + + + String fileContents = new File("${project.basedir}/../include/rocksdb/version.h").getText('UTF-8') + matcher = (fileContents =~ /(?s).*ROCKSDB_MAJOR ([0-9]+).*?/) + String major_version = matcher.getAt(0).getAt(1) + matcher = (fileContents =~ /(?s).*ROCKSDB_MINOR ([0-9]+).*?/) + String minor_version = matcher.getAt(0).getAt(1) + matcher = (fileContents =~ /(?s).*ROCKSDB_PATCH ([0-9]+).*?/) + String patch_version = matcher.getAt(0).getAt(1) + String version = String.format('%s.%s.%s', major_version, minor_version, patch_version) + // Set version to be used in pom.properties + project.version = version + // Set version to be set as jar name + project.build.finalName = project.artifactId + "-" + version + + + + +