maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joachim Bader <>
Subject Re: Native-Plugin - library name
Date Fri, 08 Oct 2004 05:28:34 GMT

On Thursday 07 October 2004 17:14, rakesh bhakta wrote:
> I am trying to use the maven-native-plugin and have found some success
> running the HelloWorld sample on both a cygwin/window and a linux
> enviroment after manually renaming the library file.
> The issue I have is with the resulting library name from the
> HelloWorld maven build.
> 1) Why does the library name have a "lib" prefix ? Is this a bug ?  In
> the HelloWorld sample, this prefix is causing the
> System.loadLibrary("native-helloworld-1.0"; to fail . My build creates
> a library called  I believe the intent
> might have been to create a directory "lib/".

on my environment the native hello world sample is working. The "lib" prefix 
of the filename is necessary. If I remove the "lib" prefix of the "so" file I 
run into this error:
Exception in thread "main" java.lang.UnsatisfiedLinkError: no 
native-helloworld-1.0 in java.library.path

my environment:
JDK 1.4.2_02
Maven 1.0
Maven Native Plugin 1.1
gcc version 3.3.2 (Mandrake Linux 10.0 3.3.2-6mdk)
Linux Mandrake 10.0 x86

As you can see in


the name of the native library is plattform dependend. It's new for me that on 
linux systems the "lib" prefix is not needed. 
Can you tell me something about your environment, please?
Java VM? Operating System?

If the "lib" prefix is not needed on your plattform you can easily modifie the 
maven-native.plugin jelly script.

<j:if test="${outputPresent == 'true'}">
	<ant:copy file="${}/native/" 


modify the tofile argument. remove the lib prefix.

> 2) Why must the lib name have a .so extension ?  It is not
> overridable, and thus build not approriate for cygwin/windows.

other libraries extensions like .dll or something else are not supported at 
the moment. I'm waiting for commit of some patches of the native plugin. 
After then I'll implement dll support for the native plugin.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message