Search code examples
javaeclipsemavenm2eclipse

Automatically install a project in the local repository?


I'm trying to work around a maven bug MDEP-187 ( https://issues.apache.org/jira/browse/MDEP-187 ) by not using workspace resolution.

This forces me to do a mvn install for all my dependencies, I'm doing this by creating a launch configuration in eclipse with goal install.

The problem is that i have to create a launch config for every project in my multiproject workspace, in addition to install i have to manually call every launch config and run it. Which just doesn't work.

Is it possible to automatically install a project in the local repository? (whenever i update my code)


Solution

  • I did go with @khmarbaise solution:

    But than you need to can handle the whole thing via maven-assembly-plugin which can create archives / folders with all the dependencies. Apart from that a swing ui must be started somehow which will need some kind of shell script / batch file which you can create by using appassembler-maven-plugin...And it sounds like you need to go for a multi module project in maven..cause you might have parts like core, ui, etc. which are needed to be combined in the end.

    @khmarbaise i was in the understanding that the assembly-plugin didn't support putting dependencies in a lib/ folder (just putting everything in 1 big jar), but after a little bit of trying i just go myself a zip with a runnable jar and my dependencies in a lib/ folder. Tomorrow i'm going to read a bit more about the assembly-plugin. I'm happy ;-