2

I created a maven plugin that picks up all project dependencies and fills a template file with these artifact informtion: jnlp-maven-plugin. It includes test cases to observe the described behaviour.

Since maven 3.3 the plugin picks up too many artifacts in multi module builds when the dependency is produced by the shade plugin. When I build each module successively the transitive dependencies are correctly provided. Using maven 3.2.5 everything works fine.

The artifacts are retrieved with the following code: AbstractJnlpMojo#73. This fetches the dependencies transitively. Is there a new way to do this since maven 3.3? Or am I doing it wrong?

Assembly plugin on the other hand always fetches the shaded dependencies correctly. But there the dependencies are recursively resolved with it's own algorithm.

To reproduce one has to clone the project from github and install the root module. The files are created in two/target/jnlp. With maven 3.3.X in a multi module build 30 files are created. In older maven versions and in single module installs 20 files are created.

PaL
  • 136
  • 2
  • 10
  • Do you have a complete working example which shows the behaviour ? So which can be run with Maven 3.2.5 and Maven 3.3.X ? – khmarbaise Mar 31 '16 at 15:52
  • BTW: A question does this not help http://www.mojohaus.org/webstart/webstart-maven-plugin/ ? Furthermore i've taken a look into your test ? which i have to admit i don't understand where they are testing something and more important what do they test ? – khmarbaise Mar 31 '16 at 15:58
  • There were several problems with webstart-maven-plugin. That's why I wrote this new plugin. Regarding the test case, you've got to install the root project. 'jnlp-maven-plugin-one' then creates the shaded artifact which 'jnlp-maven-plugin-test-two' depends on. 'two' copies all dependencies into 'target/jnlp' and creates a 'webstart.jnlp' file with it's dependencies. In maven 3.2.5 there are always 20 jar files. In 3.3.9 there are 30 jar files when installed from aggregator and 20 when installed standalone. – PaL Mar 31 '16 at 17:39

0 Answers0