You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by simon <sk...@apache.org> on 2008/02/17 15:13:38 UTC

maven-shade-plugin: specifying main-class attribute

Hi All,

I'm trying to use the maven-shade-plugin to build an executable jar.

It all works very nicely except for one thing: when the shade plugin
merges the main artifact together with all the dependency jars, the
META-INF/MANIFEST.MF file that ends up in the generated jar comes from
one of the dependencies, not from the primary artifact. Therefore the
"Main-Class" attribute (along with the other settings) is lost.

I presume that as each dependency jar is processed, any files with the
same name just get overwritten. This would be fine if the "primary" jar
was the one processed last, so that its files overwrite anything from
the dependencies. However that does not appear to be the case.

Can anyone suggest how I ensure that the MANIFEST.MF file that I want in
the merged jar (from the main artifact) gets there?

Thanks,

Simon


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org