Hi

one problem that we found with the maven-native-plugin is that it assumes
you have only one native platform. If you want your code delivered
for for instance Windows, Linux, MacOS X and Solaris, all .so's would
end up in the same place.

Regards
Mark Donszelmann
Stanford
 

-----Original Message-----
From: Dennis Geurts [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 07, 2005 8:32 AM
To: Maven Users List; Ruud Wijnands
Subject: Re: Question: maven 1 - native plugin usage

Hi Ruud,
 What you want is certainly possible...
 Although I haven't used this plugin on a linux platform (yet) I hope I'm able 
to get you up and running: 
 (but please provide your compiler/ linker args yourself :-) )  in your 
properties file:
 
maven.native.compiler.name=gcc
maven.native.link=executable /// or shared if you want to 

maven.native.compiler.arg.start= <your compiler args that end up at the start 
of the command line> maven.native.compiler.arg.mid= <your compiler args that 
end up in the 
middle>
maven.native.compiler.arg.end= <your compiler args that end up at the end>

maven.native.linker.arg.start= <your linker args that end up at the start> 
maven.native.linker.arg.mid= <your linker args that end up in the middle> 
maven.native.linker.arg.end = <your linker args that end up at the end>

after "maven native" the executable (or .so file) ends up in 'target/native/'

and is named '_' (underscore), for the executable or 'lib_.so' for the shared 
library If it's a libary, the file is copied to: 
${maven.build.dir}/native/lib${ pom.artifactId}-${pom.currentVersion}.so

This is done (i think) for your convenience, but you can easily create a 
postGoal yourself to copy the executable (the 'underscore' file) to a human 
readable name.

I always read the project.jelly. Even if you don't know jelly you can 'infer' 
from the jelly code how the properties are used and why things happen.

Hope this helps, feel free to ask more...

  Dennis

     On 7/7/05, Ruud Wijnands <[EMAIL PROTECTED]> wrote: 
> 
> Hi,
> 
> I am new to maven and I would like to find out whether or not it is 
> possible to build native c++ code via the native plugin. I have a few 
> requirements and after investigating the native plugin I think they 
> are not meet.
> 
> By studying the plugin I have the impression that I can only build 
> shared libraries, since the native:compile target is always renamed to 
> something like <artifactId>-<version>.so Is that true?
> 
> Here are my requirements:
> - build a set of c++ files into a single shared library for linux
> - build a set of c++ files into a single static library for linux
> - build a c++ file into an application
> - link against third-party libraries
> - provide include paths to thirdparty libraties
> - set compiler and link flags
> 
> If the stuff mentioned above is possible, does anyone have an or some 
> examples for me?
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to