You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Max Bowsher <ma...@ukf.net> on 2007/05/02 13:07:47 UTC

jar-plugin addClasspath, assembly-plugin dependencySet, snapshot uniqueVersion mismatch woes

A lot of projects where I work use the following idiom:

  * jar-plugin is configured with addClasspath=true

  * assembly-plugin is used to collect together all the needed jars with
    a dependencySet

  * shell script then invokes "java -jar" on the main jar, to run the
    program.


We're finding that when deployed snapshots are used along with that, the
 assembly-plugin and jar-plugin frequently disagree about whether to use
SNAPSHOT or YYYMMDD.HHMMSS-N naming for jars, resulting in a classpath
which doesn't actually match the actual jar names, causing the program
to fail to run.


I managed to kludge things with a local hack in maven-archiver, to begin
with. But, now assembly-plugin 2.2-beta-1 is released, and my hack no
longer works, because 2.2-beta-1 makes different decisions in SNAPSHOT
vs. YYYMMDD.HHMMSS-N than 2.1.


Are other people using a similar idiom to execute their programs? If so,
have you come up with any solutions to the deployed snapshot problems?


Thanks,

Max.