Are you positive you are using jar plugin version 2.3?
On Mon, Jan 7, 2013 at 11:26 AM, Anthony Dahanne <[email protected]>wrote: > Hello all, > I am using Maven 3 with Nexus 2. > I am building a cli tool (let's call it cli) , which has dependencies on > some other libraries (let's call them dependencyA and dependencyB) > To make my cli tool work in every environment, I rely on the manifest > classpath, generated with : > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-jar-plugin</artifactId> > <configuration> > <archive> > <manifest> > <addClasspath>true</addClasspath> > </manifest> > </archive> > </configuration> > </plugin> > > and then I package everything (cli and its dependencies) using an assembly > > my launcher script looks like : > java -jar cli*.jar (the * is there so that I won't need to update the > script for any versions) > > If I build everything locally, in version 1.1.0-SNAPSHOT, here is the > manifest classpath entry : > Class-Path: dependencyA-1.1.0-SNAPSHOT.jar dependencyB-1.1.0-S > NAPSHOT.jar slf4j-jdk14-1.6.6.jar slf4j-api-1.6.6.jar > > locally, everything is fine > > Now, if I download the assembly, built by a CI tool and published to Nexus, > the manifest is still the same, but look at the names of the dependencies : > ~> ls lib/ > cli-1.1.0-20130105.224257-7.jar dependencyA-1.1.0-20130105.224257-7.jar > dependencyB-1.1.0-20130105.224257-7.jar > > As you can imagine, the cli won't find it's dependencies since their > version does not match any more the manifest's (SNAPSHOT in the manifest, > 1.1.0-20130105.224257-7 is what we have) > > It seems like this issue was fixed some time ago : > http://jira.codehaus.org/browse/MJAR-28 > > Is is a regression ? > > Thanks a lot for your help! > Anthony >
