Search code examples
maven-2maven-install-plugin

Can I install several files into one artifact with Maven2 instal:install-file command


I'm developping application with JOGL2 and my favorite IDE Eclipse, also I want to use Maven2 for this purpose. Unfortunately, JOGL2 has no artifact yet. Also, I plan to deploy it as a runnable jar file.

So I want to install JOGL artifact locally : so i'll use the install:install-file command.

But I want to group several jars to make several artifacts, that is :

  • gluegen-rt.jar and jogl.all.jar as a single artifact named jogl.core
  • gluegen-rt-natives-linux-i586.jar and jogl.all-natives-linux-i586.jar as a single jar named jogl-natives-linux-i586
  • and so on

Is it possible ? (The official documentation does not mention the possibility or unpossibility to do so).

Thanks in advance


Solution

  • Install all files as usual like file:jar:version. Than create pom with pom packaging and use gluegen-rt.jar and jogl.all.jar as dependencies in it (they must be already installed). After that use new pom as dependency in your project.