Hello,

I'm busy right now trying to implement Option 3. based on jambi 4.4
preview (they now distribute platform specific jars containing the
native code)

- I wrote a shell script that
 - downloads the jambi jar ( linux 32, linux 64, win 32 for now)
 - unpack them
 - deploy the java jar to my local nexus repository ( using fake groupid
ech.trolltech)
     groupId = ech.trolltech
     artifactId = qtjambi
     version = 4.4.0_01
 - deploy the natives jar with 
     groupId = ech.trolltech
     artifactId = qtjambi-native
     classifier = linux32-gcc | linux64-gcc | win32-msvc2005 
     version = 4.4.0_01
 - I also created a qtjambi-deps pom project having depedencies 
   - qt-jambi
   - qt-jambi-natives
   I used profiles activated using the <os> </os> stance to compute the
actual classifier based on the running platform...

Now, creating a project depending on qt-jambi-deps should bring in the
correct native jar


TODO: 
 - check all this by creating a small hello world program with qt-jambi
 - use the assembly plugin to create platform specifics
jar-with-dependencies for deployement on user's computers

BTW, I already touched that topic on the jambi mailing list asking for a
maven repository managed by trolltech hosting those artifacts...
without much success  ( licensing issues ...)

Cheers
Etienne



-----Original Message-----
From: Haim Ashkenazi [mailto:[EMAIL PROTECTED] 
Sent: jeudi 5 juin 2008 12:57
To: Maven Users List
Subject: Need advice about adding native dependencies

Hi

I'm creating a project that uses qtjambi (QT's java binding -
http://trolltech.com/products/qt/features/language-support/java). It
has both jar files and native libraries (statically compiled - seems
to be working fine at least on a few linuxes I've tried). In their
deployment documentation they recommend adding the native libraries to
the jar (top level) plus a descriptor file. Also you may not need all
the native libraries in your application (total of 37MB for linux32).
you may only need a few of them.

I have a few options here and I need you advice:

Option 1: Create an ANT script that downloads the binary zip/tar.gz
file, creates a customized jar (optimized for my project) and deploys
it to my local repository. Since this is a customize jar I need to
give it a unique groupId (i.e. not "com.trolltech.qtjambi") because
otherwise if I'll have another project that used qtjambi with
different settings it'll overwrite it.

Option 2: Create a custom jar like above but put it somewhere in the
system and use a "system" dependency.

Option 3: (I'm not sure if it's even technically possible) deploy the
original qtjambi.jar (without native libraries) to my archiva server
and also deploy the native libs as files into the server and somehow
declare each native library as a dependency . If it's possible, I
guess this would be my favorite option.

Option 4: Create a full jar with the native libs inside or in a
separate jar, deploy it (either on a server, or locally by script) and
hand-pick the parts I need manually in the packaging stage.

Is there a "correct" way to do it?

thanx
-- 
Haim

---------------------------------------------------------------------
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