From 899bab680aeebbfde09ce7883e6419c2d13c000a Mon Sep 17 00:00:00 2001 From: John Dennis Casey Date: Mon, 8 May 2006 19:12:22 +0000 Subject: [PATCH] [MJAR-40] Fixing jar indexing in maven-archiver. Submitted By: Richard van der Hoff git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@405134 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/maven/archiver/MavenArchiver.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/maven-archiver/src/main/java/org/apache/maven/archiver/MavenArchiver.java b/maven-archiver/src/main/java/org/apache/maven/archiver/MavenArchiver.java index 5fb9c7953d..d84afaa0f1 100644 --- a/maven-archiver/src/main/java/org/apache/maven/archiver/MavenArchiver.java +++ b/maven-archiver/src/main/java/org/apache/maven/archiver/MavenArchiver.java @@ -332,6 +332,17 @@ public class MavenArchiver archiver.setDestFile( archiveFile ); + // make the archiver index the jars on the classpath, if we are adding that to the manifest + if ( archiveConfiguration.getManifest().isAddClasspath() ) + { + List artifacts = project.getRuntimeClasspathElements(); + for ( Iterator iter = artifacts.iterator(); iter.hasNext(); ) + { + File f = new File( (String) iter.next() ); + archiver.addConfiguredIndexJars(f); + } + } + // create archive archiver.createArchive();