Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Make the build procedure on unix and windows more consistent.

  • Loading branch information...
commit a65428d466a4e6cb44299fde9337bbf3410e6e4d 1 parent 933ec6a
Hiram Chirino chirino authored
4 leveldbjni-linux32/pom.xml
View
@@ -89,8 +89,8 @@
<type>zip</type>
</nativeSrcDependency>
<configureArgs>
- <arg>--with-leveldb=${leveldb}</arg>
- <arg>--with-snappy=${snappy}</arg>
+ <arg>--with-leveldb=${env.LEVELDB_HOME}</arg>
+ <arg>--with-snappy=${env.SNAPPY_HOME}</arg>
</configureArgs>
</configuration>
</plugin>
4 leveldbjni-linux64/pom.xml
View
@@ -88,8 +88,8 @@
<type>zip</type>
</nativeSrcDependency>
<configureArgs>
- <arg>--with-leveldb=${leveldb}</arg>
- <arg>--with-snappy=${snappy}</arg>
+ <arg>--with-leveldb=${env.LEVELDB_HOME}</arg>
+ <arg>--with-snappy=${env.SNAPPY_HOME}</arg>
</configureArgs>
</configuration>
</plugin>
6 leveldbjni-osx/pom.xml
View
@@ -98,11 +98,9 @@
</nativeSrcDependency>
<platform>osx</platform>
<configureArgs>
- <arg>--with-leveldb=${leveldb}</arg>
- <arg>--with-snappy=${snappy}</arg>
+ <arg>--with-leveldb=${env.LEVELDB_HOME}</arg>
+ <arg>--with-snappy=${env.SNAPPY_HOME}</arg>
<arg>--with-universal</arg>
- <arg>--with-leveldb=${leveldb}</arg>
- <arg>--with-snappy=${snappy}</arg>
</configureArgs>
</configuration>
</plugin>
10 leveldbjni/src/test/java/org/fusesource/leveldbjni/test/DBTest.java
View
@@ -396,19 +396,21 @@ public void testCompactRanges() throws IOException, InterruptedException, DBExce
}
String stats = db.getProperty("leveldb.stats");
+ System.out.println(stats);
// Compactions
// Level Files Size(MB) Time(sec) Read(MB) Write(MB)
// --------------------------------------------------
- assertTrue(stats.contains("1 2 2 0 0 2"));
- assertTrue(stats.contains("2 1 1 0 0 1"));
+ assertTrue(stats.contains("1 2 8 0 0 8"));
+ assertTrue(stats.contains("2 1 4 0 0 4"));
// After the compaction, level 1 and 2 should not have any files in it..
((JniDB) db).compactRange(null, null);
stats = db.getProperty("leveldb.stats");
- assertTrue(stats.contains("1 0 0 0 3 2"));
- assertTrue(stats.contains("2 0 0 0 1 1"));
+ System.out.println(stats);
+ assertTrue(stats.contains("1 0 0 0 11 8"));
+ assertTrue(stats.contains("2 0 0 0 4 4"));
}
db.close();
5 pom.xml
View
@@ -259,10 +259,7 @@
</modules>
</profile>
<profile>
- <id>mac</id>
- <!-- <activation>
- <os><family>mac</family></os>
- </activation> -->
+ <id>osx</id>
<modules>
<module>leveldbjni-osx</module>
</modules>
8 readme.md
View
@@ -216,13 +216,17 @@ Patch and Compile the leveldb project. This produces a static library.
Now use maven to build the leveldbjni project.
cd ../leveldbjni
- mvn clean install -Dleveldb=`cd ../leveldb; pwd` -Dsnappy=`cd ../snappy-1.0.5; pwd` -P download -P ${platform}
+ export LEVELDB_HOME=`cd ../leveldb; pwd`
+ export SNAPPY_HOME=`cd ../snappy-1.0.5; pwd`
+ mvn clean install -P download -P ${platform}
Replace ${platform} with one of the following platform identifiers (depending on the platform your building on):
+* osx
* linux32
* linux64
-* mac
+* win32
+* win64
If your platform does not have the right auto-tools levels available
just copy the `leveldbjni-${version}-SNAPSHOT-native-src.zip` artifact
Please sign in to comment.
Something went wrong with that request. Please try again.