maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r630807 - in /maven/plugins/trunk/maven-war-plugin/src: main/java/org/apache/maven/plugin/war/AbstractWarMojo.java test/java/org/apache/maven/plugin/war/AbstractWarMojoTest.java
Date Mon, 25 Feb 2008 10:58:57 GMT
Author: olamy
Date: Mon Feb 25 02:58:57 2008
New Revision: 630807

URL: http://svn.apache.org/viewvc?rev=630807&view=rev
Log:
maven-filtering needs a mavenSession now


Modified:
    maven/plugins/trunk/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/AbstractWarMojo.java
    maven/plugins/trunk/maven-war-plugin/src/test/java/org/apache/maven/plugin/war/AbstractWarMojoTest.java

Modified: maven/plugins/trunk/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/AbstractWarMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/AbstractWarMojo.java?rev=630807&r1=630806&r2=630807&view=diff
==============================================================================
--- maven/plugins/trunk/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/AbstractWarMojo.java
(original)
+++ maven/plugins/trunk/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/AbstractWarMojo.java
Mon Feb 25 02:58:57 2008
@@ -29,6 +29,7 @@
 import java.util.List;
 
 import org.apache.maven.archiver.MavenArchiveConfiguration;
+import org.apache.maven.execution.MavenSession;
 import org.apache.maven.model.Resource;
 import org.apache.maven.plugin.AbstractMojo;
 import org.apache.maven.plugin.MojoExecutionException;
@@ -260,6 +261,15 @@
      * @since 2.1-alpha-2
      */
     private List nonFilteredFileExtensions;
+    
+    /**
+     * @parameter expression="${session}"
+     * @readonly
+     * @required
+     * @since 2.1-alpha-2
+     */
+     private MavenSession session;
+    
 
     /**
      * The maven archive configuration to use.
@@ -395,7 +405,7 @@
         List filterWrappers = new ArrayList( );
         try
         {
-            List defaultFilterWrappers = mavenFileFilter.getDefaultFilterWrappers( project,
filters, true );
+            List defaultFilterWrappers = mavenFileFilter.getDefaultFilterWrappers( project,
filters, true, this.session );
 
             filterWrappers.addAll( defaultFilterWrappers );
             FileUtils.FilterWrapper filterWrapper = new FileUtils.FilterWrapper()

Modified: maven/plugins/trunk/maven-war-plugin/src/test/java/org/apache/maven/plugin/war/AbstractWarMojoTest.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-war-plugin/src/test/java/org/apache/maven/plugin/war/AbstractWarMojoTest.java?rev=630807&r1=630806&r2=630807&view=diff
==============================================================================
--- maven/plugins/trunk/maven-war-plugin/src/test/java/org/apache/maven/plugin/war/AbstractWarMojoTest.java
(original)
+++ maven/plugins/trunk/maven-war-plugin/src/test/java/org/apache/maven/plugin/war/AbstractWarMojoTest.java
Mon Feb 25 02:58:57 2008
@@ -19,6 +19,7 @@
  * under the License.
  */
 
+import org.apache.maven.execution.MavenSession;
 import org.apache.maven.plugin.testing.AbstractMojoTestCase;
 import org.apache.maven.plugin.testing.stubs.ArtifactStub;
 import org.apache.maven.plugin.war.stub.MavenProjectBasicStub;
@@ -66,6 +67,8 @@
         setVariableValueToObject( mojo, "filters", filters );
         setVariableValueToObject( mojo, "useCache", Boolean.FALSE );
         setVariableValueToObject( mojo, "mavenFileFilter", lookup( MavenFileFilter.class.getName()
) );
+        MavenSession mavenSession = new MavenSession( null, null, null, null, null, null,
null, System.getProperties(), null );
+        setVariableValueToObject( mojo, "session", mavenSession );
         mojo.setClassesDirectory( classesDir );
         mojo.setWarSourceDirectory( webAppSource );
         mojo.setWebappDirectory( webAppDir );



Mime
View raw message