diff --git a/java/rocksjni.pom b/java/rocksjni.pom index 552e26f8e..e18a7734d 100644 --- a/java/rocksjni.pom +++ b/java/rocksjni.pom @@ -8,7 +8,8 @@ http://rocksdb.org/ org.rocksdb rocksdbjni - 3.6.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 + + + + +