This is how we set the java.library.path for surefire, works fine for us:
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <forkMode>once</forkMode>
                    <workingDirectory>target</workingDirectory>
                    <argLine>-Djava.library.path=lib</argLine>


Kalle

On Tue, Nov 4, 2008 at 11:35 AM, Wendy Smoak <[EMAIL PROTECTED]> wrote:

> On Tue, Nov 4, 2008 at 9:27 AM, Wendy Smoak <[EMAIL PROTECTED]> wrote:
>
> > ...but it only works if the library is sitting in the base directory
> > of the Maven project.  If I move it into some other directory and then
> > configure Surefire to pass java.library.path to the tests, I get the
> > same thing Craig was seeing:
> >
> > java.lang.UnsatisfiedLinkError: no HelloWorld in java.library.path
>
> Craig added a build.xml to the example, so we have it working with Ant
> and failing with Maven/Surefire:
> http://wush.net/svn/wsmoak/testing/trunk/jnitest
>
> There is build output in the README file.  At this point someone more
> familiar with JNI and Surefire internals will have to take over. :)
> Craig, if you want to open a JIRA issue, feel free to point to this
> example.
>
> --
> Wendy
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to