You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ol...@apache.org on 2008/02/11 22:30:39 UTC
svn commit: r620614 - in /maven/plugins/trunk/maven-war-plugin: ./
src/it/MWAR-143/ src/it/MWAR-143/war-common/
src/it/MWAR-143/war-common/src/ src/it/MWAR-143/war-common/src/main/
src/it/MWAR-143/war-common/src/main/resources/ src/it/MWAR-143/war-comm...
Author: olamy
Date: Mon Feb 11 13:30:37 2008
New Revision: 620614
URL: http://svn.apache.org/viewvc?rev=620614&view=rev
Log:
[MWAR-143] War Overlays and resources filtering
Added:
maven/plugins/trunk/maven-war-plugin/src/it/MWAR-143/ (with props)
maven/plugins/trunk/maven-war-plugin/src/it/MWAR-143/goals.txt (with props)
maven/plugins/trunk/maven-war-plugin/src/it/MWAR-143/pom.xml (with props)
maven/plugins/trunk/maven-war-plugin/src/it/MWAR-143/verify.bsh (with props)
maven/plugins/trunk/maven-war-plugin/src/it/MWAR-143/war-common/ (with props)
maven/plugins/trunk/maven-war-plugin/src/it/MWAR-143/war-common/pom.xml (with props)
maven/plugins/trunk/maven-war-plugin/src/it/MWAR-143/war-common/src/
maven/plugins/trunk/maven-war-plugin/src/it/MWAR-143/war-common/src/main/
maven/plugins/trunk/maven-war-plugin/src/it/MWAR-143/war-common/src/main/resources/
maven/plugins/trunk/maven-war-plugin/src/it/MWAR-143/war-common/src/main/resources/filter.properties (with props)
maven/plugins/trunk/maven-war-plugin/src/it/MWAR-143/war-common/src/main/webapp/
maven/plugins/trunk/maven-war-plugin/src/it/MWAR-143/war-common/src/main/webapp/WEB-INF/
maven/plugins/trunk/maven-war-plugin/src/it/MWAR-143/war-common/src/main/webapp/WEB-INF/web.xml (with props)
maven/plugins/trunk/maven-war-plugin/src/it/MWAR-143/war-filter-overlay/ (with props)
maven/plugins/trunk/maven-war-plugin/src/it/MWAR-143/war-filter-overlay/pom.xml (with props)
maven/plugins/trunk/maven-war-plugin/src/it/MWAR-143/war-filter-overlay/src/
maven/plugins/trunk/maven-war-plugin/src/it/MWAR-143/war-filter-overlay/src/main/
maven/plugins/trunk/maven-war-plugin/src/it/MWAR-143/war-filter-overlay/src/main/webapp/
maven/plugins/trunk/maven-war-plugin/src/it/MWAR-143/war-filter-overlay/src/main/webapp/WEB-INF/
maven/plugins/trunk/maven-war-plugin/src/it/MWAR-143/war-filter-overlay/src/main/webapp/WEB-INF/web.xml (with props)
Modified:
maven/plugins/trunk/maven-war-plugin/pom.xml
maven/plugins/trunk/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/packaging/AbstractWarPackagingTask.java
maven/plugins/trunk/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/packaging/ClassesPackagingTask.java
maven/plugins/trunk/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/packaging/OverlayPackagingTask.java
maven/plugins/trunk/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/packaging/WarProjectPackagingTask.java
Modified: maven/plugins/trunk/maven-war-plugin/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-war-plugin/pom.xml?rev=620614&r1=620613&r2=620614&view=diff
==============================================================================
--- maven/plugins/trunk/maven-war-plugin/pom.xml (original)
+++ maven/plugins/trunk/maven-war-plugin/pom.xml Mon Feb 11 13:30:37 2008
@@ -200,8 +200,13 @@
<configuration>
<projectsDirectory>src/it</projectsDirectory>
<pomIncludes>
- <pomInclude>**/**/pom.xml</pomInclude>
+ <pomInclude>**/pom.xml</pomInclude>
</pomIncludes>
+ <pomExcludes>
+ <pomExclude>MWAR-143/war-common/pom.xml</pomExclude>
+ <pomExclude>MWAR-143/war-filter-overlay/pom.xml</pomExclude>
+ <pomExclude>**/META-INF/**/pom.xml</pomExclude>
+ </pomExcludes>
<postBuildHookScript>verify.bsh</postBuildHookScript>
<localRepositoryPath>${basedir}/target/local-repo</localRepositoryPath>
<goals>
Propchange: maven/plugins/trunk/maven-war-plugin/src/it/MWAR-143/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Mon Feb 11 13:30:37 2008
@@ -0,0 +1 @@
+build.log
Added: maven/plugins/trunk/maven-war-plugin/src/it/MWAR-143/goals.txt
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-war-plugin/src/it/MWAR-143/goals.txt?rev=620614&view=auto
==============================================================================
--- maven/plugins/trunk/maven-war-plugin/src/it/MWAR-143/goals.txt (added)
+++ maven/plugins/trunk/maven-war-plugin/src/it/MWAR-143/goals.txt Mon Feb 11 13:30:37 2008
@@ -0,0 +1 @@
+clean install
\ No newline at end of file
Propchange: maven/plugins/trunk/maven-war-plugin/src/it/MWAR-143/goals.txt
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-war-plugin/src/it/MWAR-143/goals.txt
------------------------------------------------------------------------------
svn:executable = *
Propchange: maven/plugins/trunk/maven-war-plugin/src/it/MWAR-143/goals.txt
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/plugins/trunk/maven-war-plugin/src/it/MWAR-143/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-war-plugin/src/it/MWAR-143/pom.xml?rev=620614&view=auto
==============================================================================
--- maven/plugins/trunk/maven-war-plugin/src/it/MWAR-143/pom.xml (added)
+++ maven/plugins/trunk/maven-war-plugin/src/it/MWAR-143/pom.xml Mon Feb 11 13:30:37 2008
@@ -0,0 +1,53 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<project xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
+ xsi:schemaLocation='http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd'
+ xmlns='http://maven.apache.org/POM/4.0.0'>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>debug.war</groupId>
+ <artifactId>MWAR-143</artifactId>
+ <packaging>pom</packaging>
+ <version>1.0-SNAPSHOT</version>
+ <name>MWAR-143 Maven Webapp</name>
+ <url>http://maven.apache.org</url>
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <artifactId>maven-war-plugin</artifactId>
+ <version>@pom.version@</version>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+ <modules>
+ <module>war-common</module>
+ <module>war-filter-overlay</module>
+ </modules>
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>debug.war</groupId>
+ <artifactId>common-overlay</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+</project>
Propchange: maven/plugins/trunk/maven-war-plugin/src/it/MWAR-143/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-war-plugin/src/it/MWAR-143/pom.xml
------------------------------------------------------------------------------
svn:executable = *
Propchange: maven/plugins/trunk/maven-war-plugin/src/it/MWAR-143/pom.xml
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/plugins/trunk/maven-war-plugin/src/it/MWAR-143/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-war-plugin/src/it/MWAR-143/verify.bsh?rev=620614&view=auto
==============================================================================
--- maven/plugins/trunk/maven-war-plugin/src/it/MWAR-143/verify.bsh (added)
+++ maven/plugins/trunk/maven-war-plugin/src/it/MWAR-143/verify.bsh Mon Feb 11 13:30:37 2008
@@ -0,0 +1,67 @@
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.io.*;
+import org.codehaus.plexus.util.*;
+
+boolean result = true;
+
+try
+{
+ File target = new File( basedir, "war-filter-overlay/target" );
+ if ( !target.exists() || !target.isDirectory() )
+ {
+ System.err.println( "target file is missing or not a directory." );
+ return false;
+ }
+
+ File webappDirectory = new File( target, "custom-manifest-1.0-SNAPSHOT" );
+ if ( !webappDirectory.exists() || !webappDirectory.isDirectory() )
+ {
+ System.err.println( "webappDirectory is missing or not a directory." );
+ return false;
+ }
+
+ File param = new File ( webappDirectory, "WEB-INF/classes/filter.properties" );
+ if ( !param.exists() || param.isDirectory() )
+ {
+ System.err.println( "filter.properties file is missing or a directory." );
+ return false;
+ }
+
+
+ FileInputStream fis = new FileInputStream ( param );
+ String paramContent = IOUtil.toString ( fis );
+
+ int indexOf = paramContent.indexOf( "debug.test = hello world !" );
+ if ( indexOf < 0)
+ {
+ System.err.println( "filter.properties does not contains debug.test = hello world !" );
+ return false;
+ }
+
+}
+catch( Throwable e )
+{
+ e.printStackTrace();
+ result = false;
+}
+
+return result;
Propchange: maven/plugins/trunk/maven-war-plugin/src/it/MWAR-143/verify.bsh
------------------------------------------------------------------------------
svn:executable = *
Propchange: maven/plugins/trunk/maven-war-plugin/src/it/MWAR-143/war-common/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Mon Feb 11 13:30:37 2008
@@ -0,0 +1,2 @@
+build.log
+target
Added: maven/plugins/trunk/maven-war-plugin/src/it/MWAR-143/war-common/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-war-plugin/src/it/MWAR-143/war-common/pom.xml?rev=620614&view=auto
==============================================================================
--- maven/plugins/trunk/maven-war-plugin/src/it/MWAR-143/war-common/pom.xml (added)
+++ maven/plugins/trunk/maven-war-plugin/src/it/MWAR-143/war-common/pom.xml Mon Feb 11 13:30:37 2008
@@ -0,0 +1,46 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>debug.war</groupId>
+ <artifactId>MWAR-143</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>common-overlay</artifactId>
+ <packaging>war</packaging>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-war-plugin</artifactId>
+ <configuration>
+ <archive>
+ <manifestEntries>
+ <Class-Path>properties</Class-Path>
+ </manifestEntries>
+ </archive>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Propchange: maven/plugins/trunk/maven-war-plugin/src/it/MWAR-143/war-common/pom.xml
------------------------------------------------------------------------------
svn:executable = *
Propchange: maven/plugins/trunk/maven-war-plugin/src/it/MWAR-143/war-common/pom.xml
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/plugins/trunk/maven-war-plugin/src/it/MWAR-143/war-common/src/main/resources/filter.properties
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-war-plugin/src/it/MWAR-143/war-common/src/main/resources/filter.properties?rev=620614&view=auto
==============================================================================
--- maven/plugins/trunk/maven-war-plugin/src/it/MWAR-143/war-common/src/main/resources/filter.properties (added)
+++ maven/plugins/trunk/maven-war-plugin/src/it/MWAR-143/war-common/src/main/resources/filter.properties Mon Feb 11 13:30:37 2008
@@ -0,0 +1,4 @@
+title.main=Prototype ${pom.name}
+title.version=version ${pom.version}
+
+debug.test = ${my.filter.value}
Propchange: maven/plugins/trunk/maven-war-plugin/src/it/MWAR-143/war-common/src/main/resources/filter.properties
------------------------------------------------------------------------------
svn:executable = *
Propchange: maven/plugins/trunk/maven-war-plugin/src/it/MWAR-143/war-common/src/main/resources/filter.properties
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/plugins/trunk/maven-war-plugin/src/it/MWAR-143/war-common/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-war-plugin/src/it/MWAR-143/war-common/src/main/webapp/WEB-INF/web.xml?rev=620614&view=auto
==============================================================================
--- maven/plugins/trunk/maven-war-plugin/src/it/MWAR-143/war-common/src/main/webapp/WEB-INF/web.xml (added)
+++ maven/plugins/trunk/maven-war-plugin/src/it/MWAR-143/war-common/src/main/webapp/WEB-INF/web.xml Mon Feb 11 13:30:37 2008
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+ version="2.4">
+
+</web-app>
Propchange: maven/plugins/trunk/maven-war-plugin/src/it/MWAR-143/war-common/src/main/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-war-plugin/src/it/MWAR-143/war-common/src/main/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
svn:executable = *
Propchange: maven/plugins/trunk/maven-war-plugin/src/it/MWAR-143/war-common/src/main/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Propchange: maven/plugins/trunk/maven-war-plugin/src/it/MWAR-143/war-filter-overlay/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Mon Feb 11 13:30:37 2008
@@ -0,0 +1,2 @@
+build.log
+target
Added: maven/plugins/trunk/maven-war-plugin/src/it/MWAR-143/war-filter-overlay/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-war-plugin/src/it/MWAR-143/war-filter-overlay/pom.xml?rev=620614&view=auto
==============================================================================
--- maven/plugins/trunk/maven-war-plugin/src/it/MWAR-143/war-filter-overlay/pom.xml (added)
+++ maven/plugins/trunk/maven-war-plugin/src/it/MWAR-143/war-filter-overlay/pom.xml Mon Feb 11 13:30:37 2008
@@ -0,0 +1,65 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>debug.war</groupId>
+ <artifactId>MWAR-143</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>custom-manifest</artifactId>
+ <packaging>war</packaging>
+
+ <dependencies>
+ <!-- War Overlay -->
+ <dependency>
+ <groupId>debug.war</groupId>
+ <artifactId>common-overlay</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <type>war</type>
+ <scope>runtime</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-war-plugin</artifactId>
+ <configuration>
+ <overlays>
+ <overlay>
+ <groupId>debug.war</groupId>
+ <artifactId>common-overlay</artifactId>
+ <!--targetPath>filter</targetPath-->
+ <filtered>true</filtered>
+ </overlay>
+ </overlays>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <properties>
+ <my.filter.value>hello world !</my.filter.value>
+ </properties>
+
+</project>
Propchange: maven/plugins/trunk/maven-war-plugin/src/it/MWAR-143/war-filter-overlay/pom.xml
------------------------------------------------------------------------------
svn:executable = *
Propchange: maven/plugins/trunk/maven-war-plugin/src/it/MWAR-143/war-filter-overlay/pom.xml
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Added: maven/plugins/trunk/maven-war-plugin/src/it/MWAR-143/war-filter-overlay/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-war-plugin/src/it/MWAR-143/war-filter-overlay/src/main/webapp/WEB-INF/web.xml?rev=620614&view=auto
==============================================================================
--- maven/plugins/trunk/maven-war-plugin/src/it/MWAR-143/war-filter-overlay/src/main/webapp/WEB-INF/web.xml (added)
+++ maven/plugins/trunk/maven-war-plugin/src/it/MWAR-143/war-filter-overlay/src/main/webapp/WEB-INF/web.xml Mon Feb 11 13:30:37 2008
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+ version="2.4">
+
+
+</web-app>
Propchange: maven/plugins/trunk/maven-war-plugin/src/it/MWAR-143/war-filter-overlay/src/main/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/plugins/trunk/maven-war-plugin/src/it/MWAR-143/war-filter-overlay/src/main/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
svn:executable = *
Propchange: maven/plugins/trunk/maven-war-plugin/src/it/MWAR-143/war-filter-overlay/src/main/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
svn:keywords = "Author Date Id Revision"
Modified: maven/plugins/trunk/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/packaging/AbstractWarPackagingTask.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/packaging/AbstractWarPackagingTask.java?rev=620614&r1=620613&r2=620614&view=diff
==============================================================================
--- maven/plugins/trunk/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/packaging/AbstractWarPackagingTask.java (original)
+++ maven/plugins/trunk/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/packaging/AbstractWarPackagingTask.java Mon Feb 11 13:30:37 2008
@@ -73,8 +73,8 @@
* @throws IOException if an error occured while copying the files
*/
protected void copyFiles( String sourceId, WarPackagingContext context, File sourceBaseDir, PathSet sourceFilesSet,
- String targetPrefix )
- throws IOException
+ String targetPrefix, boolean filtered )
+ throws IOException, MojoExecutionException
{
for ( Iterator iter = sourceFilesSet.iterator(); iter.hasNext(); )
{
@@ -90,8 +90,16 @@
{
destinationFileName = targetPrefix + fileToCopyName;
}
+
- copyFile( sourceId, context, sourceFile, destinationFileName );
+ if ( filtered )
+ {
+ copyFilteredFile( sourceId, context, sourceFile, destinationFileName );
+ }
+ else
+ {
+ copyFile( sourceId, context, sourceFile, destinationFileName );
+ }
}
}
@@ -108,10 +116,10 @@
* @param sourceFilesSet the files to be copied
* @throws IOException if an error occured while copying the files
*/
- protected void copyFiles( String sourceId, WarPackagingContext context, File sourceBaseDir, PathSet sourceFilesSet )
- throws IOException
+ protected void copyFiles( String sourceId, WarPackagingContext context, File sourceBaseDir, PathSet sourceFilesSet, boolean filtered )
+ throws IOException, MojoExecutionException
{
- copyFiles( sourceId, context, sourceBaseDir, sourceFilesSet, null );
+ copyFiles( sourceId, context, sourceBaseDir, sourceFilesSet, null, filtered );
}
/**
Modified: maven/plugins/trunk/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/packaging/ClassesPackagingTask.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/packaging/ClassesPackagingTask.java?rev=620614&r1=620613&r2=620614&view=diff
==============================================================================
--- maven/plugins/trunk/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/packaging/ClassesPackagingTask.java (original)
+++ maven/plugins/trunk/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/packaging/ClassesPackagingTask.java Mon Feb 11 13:30:37 2008
@@ -62,7 +62,7 @@
try
{
copyFiles( Overlay.currentProjectInstance().getId(), context, context.getClassesDirectory(),
- sources, CLASSES_PATH );
+ sources, CLASSES_PATH, false );
}
catch ( IOException e )
{
Modified: maven/plugins/trunk/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/packaging/OverlayPackagingTask.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/packaging/OverlayPackagingTask.java?rev=620614&r1=620613&r2=620614&view=diff
==============================================================================
--- maven/plugins/trunk/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/packaging/OverlayPackagingTask.java (original)
+++ maven/plugins/trunk/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/packaging/OverlayPackagingTask.java Mon Feb 11 13:30:37 2008
@@ -76,7 +76,7 @@
// Copy
if ( null == overlay.getTargetPath() )
{
- copyFiles( overlay.getId(), context, tmpDir, includes );
+ copyFiles( overlay.getId(), context, tmpDir, includes, overlay.isFiltered() );
}
else
{
@@ -87,7 +87,7 @@
{
targetPath = targetPath + "/";
}
- copyFiles( overlay.getId(), context, tmpDir, includes, targetPath );
+ copyFiles( overlay.getId(), context, tmpDir, includes, targetPath, overlay.isFiltered() );
}
}
catch ( IOException e )
Modified: maven/plugins/trunk/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/packaging/WarProjectPackagingTask.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/packaging/WarProjectPackagingTask.java?rev=620614&r1=620613&r2=620614&view=diff
==============================================================================
--- maven/plugins/trunk/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/packaging/WarProjectPackagingTask.java (original)
+++ maven/plugins/trunk/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/packaging/WarProjectPackagingTask.java Mon Feb 11 13:30:37 2008
@@ -154,7 +154,7 @@
try
{
- copyFiles( id, context, context.getWebappSourceDirectory(), sources );
+ copyFiles( id, context, context.getWebappSourceDirectory(), sources, false );
}
catch ( IOException e )
{