diff --git a/maven-plugins/maven-assembly-plugin/pom.xml b/maven-plugins/maven-assembly-plugin/pom.xml index c5003f9979..879848c540 100755 --- a/maven-plugins/maven-assembly-plugin/pom.xml +++ b/maven-plugins/maven-assembly-plugin/pom.xml @@ -50,7 +50,7 @@ org.codehaus.plexus plexus-archiver - 1.0-alpha-3 + 1.0-alpha-4-SNAPSHOT plexus-utils diff --git a/maven-plugins/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/AssemblyMojo.java b/maven-plugins/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/AssemblyMojo.java index 343b8d8e2c..3fe866c591 100755 --- a/maven-plugins/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/AssemblyMojo.java +++ b/maven-plugins/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/AssemblyMojo.java @@ -34,6 +34,7 @@ import org.codehaus.plexus.archiver.Archiver; import org.codehaus.plexus.archiver.ArchiverException; import org.codehaus.plexus.archiver.manager.NoSuchArchiverException; import org.codehaus.plexus.archiver.tar.TarArchiver; +import org.codehaus.plexus.archiver.war.WarArchiver; import org.codehaus.plexus.util.DirectoryScanner; import org.codehaus.plexus.util.FileUtils; import org.codehaus.plexus.util.IOUtil; @@ -358,6 +359,11 @@ public class AssemblyMojo evaluateFileNameMapping( dependencySet.getOutputFileNameMapping(), artifact ) ); } } + else { + // would be better to have a way to find out when a specified include or exclude + // is never triggered and warn() it. + getLog().debug( "artifact: " + artifact + " not included" ); + } } } } @@ -591,6 +597,12 @@ public class AssemblyMojo tarArchiver.setCompression( tarCompressionMethod ); } } + else if ( format.equals( "war" ) ) + { + WarArchiver warArchiver = (WarArchiver) this.archiverManager.getArchiver( "war" ); + warArchiver.setIgnoreWebxml( false ); // See MNG-1274 + archiver = warArchiver; + } else { archiver = this.archiverManager.getArchiver( format );