Hi

the idea is the following:

you publish your jni (dll and jar) file together as a nar artifact (that is a 
set of files) on some repository.

Then, in your other project you can just declare to be dependent on the nar 
file (in the very latest version  
of nar you need to depend on the nar type, previously depend on the jar type). 

The nar files get downloaded and unpacked. 

If you make the project of packaging type "nar" all unpacking will be done 
automatically and testing will
include the dll on the library-path. 

Regards
Mark

On Dec 27, 2009, at 8:53 PM, Francis Lalonde wrote:

> Can the nar-plugin also be used to provide the JNI libs dependencies at maven 
> runtime for another plugin?
> 
> For example, I have a custom Borland starteam plugin that depends on the 
> Starteam JNI DLL. I would like to be able to run that plugin in a standalone 
> manner (mvn starteam:plugin) and have it download its required DLL (and 
> unpack them if required) from the repo as it would  for jars. _That_ would be 
> fantastic.
> 
> Francis
> 
> On 26/12/2009 6:00 PM, Donszelmann Mark wrote:
>> Hi
>> 
>> there is an example in the source of a 3rd party jni library, which is what 
>> you want.
>> 
>> Regards
>> Mark
>> 
>> On Dec 26, 2009, at 6:23 PM, Tich29 wrote:
>> 
>>   
>>> Hi,
>>> I just took a look on the maven-nar-plugin and it seems to be used to
>>> compile and package a JNI library but I don't have to compile my library.
>>> Perharps this plugin can be used so as it skips the compilation of the
>>> library ?
>>> 
>>> 
>>> duns wrote:
>>>     
>>>> Hi
>>>> 
>>>> or use the maven-nar-plugin at http://duns.github.com/maven-nar-plugin/
>>>> 
>>>> which handles most of this for you.
>>>> 
>>>> Regards
>>>> Mark Donszelmann
>>>> 
>>>> On Dec 26, 2009, at 3:43 PM, Anders Hammar wrote:
>>>> 
>>>>       
>>>>> I'd suggest you do add each of the binaries of the library as separate
>>>>> artifacts. Then you could use the normal dependency machanism of Maven.
>>>>> Write a simple shell script that deploys all of the binaries to your repo
>>>>> whenever they are update. That shell script could do pretty much anything
>>>>> you want to; for example, unpack a distro zip and then deploy each of the
>>>>> artifacts.
>>>>> 
>>>>> As written here many times, don't fight the Maven way!
>>>>> /Anders
>>>>> 
>>>>> On Sat, Dec 26, 2009 at 15:23, Tich<[email protected]>  wrote:
>>>>> 
>>>>>         
>>>>>> Hello,
>>>>>> 
>>>>>> I need to use a JNI library in multiple modules of my maven project. The
>>>>>> binaries of this library (dll and jars) are frequently updated so I
>>>>>> don't
>>>>>> want to manually add each file of the distribution to the maven
>>>>>> repository.
>>>>>> So I decided to write a maven module that packages all the files of the
>>>>>> JNI
>>>>>> library in a zip file and now I would like to automatically add the jars
>>>>>> of
>>>>>> this archive to the dependencies of any other maven modules that need
>>>>>> them
>>>>>> at compile time.
>>>>>> As I am new to maven, I don't see what is the best way to do this.
>>>>>> 
>>>>>> Could someone help 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]
>>>> 
>>>> 
>>>> 
>>>>       
>>> -- 
>>> View this message in context: 
>>> http://old.nabble.com/JNI-binaries-to-maven-module-tp26927448p26928451.html
>>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>> 
>>> 
>>> ---------------------------------------------------------------------
>>> 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]
>> 
>>   
> 
> 
> ---------------------------------------------------------------------
> 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