buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sean Rhea <>
Subject Passing -Djava.library.path=target/native to all tasks
Date Sun, 17 Oct 2010 15:07:09 GMT

I'm working on moving a Scala library for accessing sqlite3 to Buildr.
 As this library wraps the C interface to sqlite3, it contains some
JNI code.  On MacOS, the only way to pick up a JNI library is to add
it to the current directory, or to pass a java.library.path property
to the JVM.  I took a look at lib/buildr/scala/shell.rb, and it
doesn't look like there's any way to pass properties to the JVM when
involving the Scala shell.  (At least, not in version 1.4.3.)

I also tried to use ScalaTest with my project, and I added this line
to the buildfile:

  test.using :properties => { "java.library.path" => "target/native" }

But that doesn't seem to pick up the library, either.

If I run this from the command line, it works fine:

  scala -classpath target/classes -Djava.library.path=target/native Test

What am I missing?

Thanks in advance,
"I refuse to accept the idea that the ‘isness’ of man’s present nature
makes him morally incapable of reaching up for the eternal ‘oughtness’
that forever confronts him." --MLK

View raw message