maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rakesh bhakta <>
Subject Re: Native-Plugin - library name
Date Fri, 08 Oct 2004 13:56:24 GMT
> 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

Yes, I realize "lib" prefix is required on the Linux, and works on
Linux without problem. However, I have not been able to run it on
windows with the windows JVM from Sun, and then add cygwin in the mix.

I did review the maven-native-plugin-1.1/plugin.jelly code and opted
against creating my own version of it.  However, I have been able to
solve my issue with some pre/post goals like below for those

  <preGoal name="native:compile">
    <j:if test="${systemScope[''].startsWith('Windows')}" >
       <echo>Setting Env lib for ${}</echo>  
       <maven:set plugin="maven-native-plugin"
property="maven.native.include.os" value="win32"/>
       <maven:set plugin="maven-native-plugin"
property="maven.native.compiler.arg.start" value="-mno-cygwin"/>
       <maven:set plugin="maven-native-plugin"
property="maven.native.linker.arg.start" value="-mno-cygwin
  <postGoal name="native:compile">
    <j:if test="${systemScope[''].startsWith('Windows')}" >
       <echo>Renaming lib for ${}</echo>  

my environment:
  Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_03-b02) 
  Maven 1.0
  Maven Native Plugin 1.1
  gcc version 3.3.1 (cygming special)
  Windows XP x86

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

View raw message