OK, after using the -X option , i verifed that jar plugin 2.3 uses archiver 2.4:
[DEBUG] Plugin dependencies for: org.apache.maven.plugins:maven-jar-plugin:2.3 are: org.apache.maven:maven-plugin-api:jar:2.0.6:runtime org.apache.maven:maven-project:jar:2.0.6:runtime org.apache.maven:maven-model:jar:2.0.6:runtime org.apache.maven:maven-artifact:jar:2.0.6:runtime *org.apache.maven:maven-archiver:jar:2.4:runtime* org.codehaus.plexus:plexus-archiver:jar:1.0-alpha-12:runtime commons-lang:commons-lang:jar:2.1:runtime org.codehaus.plexus:plexus-utils:jar:1.4.9:runtime i'm also trying to work out the dependency:build-classpath goal..and see if it can create a custom cp.txt file to use instead of the manifest. Eyal. On Tue, Mar 9, 2010 at 10:00 AM, eyal edri <[email protected]> wrote: > Hi Wayne, > > i'm using jar plugin 2.3. > > i've notice that those new features (custom layout) are implemented in the > Archiver plugin ver 2.4 - should i do something to enforce using > the archiver ver 2.4? > > I replaced ${artifact.artifactId} with a fixed string (log4j) and it > worked: > > > Manifest-Version: 1.0 > Archiver-Version: Plexus Archiver > Created-By: Apache Maven > Built-By: eyale > Build-Jdk: 1.6.0_18 > Main-Class: com.commtouch.url.unknowns.IncreasePriority > Class-Path: /usr/lib/ctch/java/log4j /usr/lib/ctch/java/log4j /usr/lib > /ctch/java/log4j /usr/lib/ctch/java/log4j /usr/lib/ctch/java/log4j > > so what is missing here, is a code/param to fetch the list of all the > artifact dependencies. > > my goal is to build a class-path entry in the manifest without the -version > suffix every dependency has. > > Eyal. > > > On Mon, Mar 8, 2010 at 11:03 AM, eyal edri <[email protected]> wrote: > >> Hello, >> >> i don't know if this a bug or a misuse of the archiver. >> >> when using a custom layout in manifest, i get 'null' for every value i >> use: >> >> <build> >> <plugins> >> <plugin> >> <groupId>org.apache.maven.plugins</groupId> >> <artifactId>maven-jar-plugin</artifactId> >> <configuration> >> <archive> >> <!-- define class path and main class --> >> <manifest> >> <addClasspath>true</addClasspath> >> >> <mainClass>${project.groupId}.${project.artifactId}</mainClass> >> <classpathLayoutType>custom</classpathLayoutType> >> >> <customClasspathLayout>/usr/lib/ctch/java/${artifact.artifactId}</customClasspathLayout> >> </manifest> >> </archive> >> </configuration> >> </plugin> >> </plugins> >> </build> >> >> the manifest.mf: >> >> Manifest-Version: 1.0 >> Archiver-Version: Plexus Archiver >> Created-By: Apache Maven >> Built-By: eyale >> Build-Jdk: 1.6.0_18 >> Main-Class: com.commtouch.url.unknowns.IncreasePriority >> Class-Path: /usr/lib/ctch/java/null/null /usr/lib/ctch/java/null/null >> /usr/lib/ctch/java/null/null /usr/lib/ctch/java/null/null /usr/lib/ct >> ch/java/null/null >> >> >> i'm following the guidelines on the sample page: >> >> http://maven.apache.org/shared/maven-archiver/examples/classpath.html#Custom >> >> >> -- >> Eyal Edri >> >> >> >> -- >> Eyal Edri >> > > > > -- > Eyal Edri > -- Eyal Edri
