Author: epunzalan
Date: Sun Mar 19 18:41:00 2006
New Revision: 387118

URL: http://svn.apache.org/viewcvs?rev=387118&view=rev
Log:
PR: MWAR-20
Submitted by: Maria Odea Ching

Fixed the bug that causes webXML tag to not work during aggregated build.

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

Modified: 
maven/plugins/trunk/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/AbstractWarMojo.java
URL: 
http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-war-plugin/src/main/java/org/apache/maven/plugin/war/AbstractWarMojo.java?rev=387118&r1=387117&r2=387118&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
 Sun Mar 19 18:41:00 2006
@@ -79,7 +79,7 @@
      *
      * @parameter expression="${maven.war.webxml}"
      */
-    private String webXml;
+    private File webXml;
 
     /**
      * The path to the context.xml file to use.
@@ -185,12 +185,12 @@
         this.warSourceDirectory = warSourceDirectory;
     }
 
-    public String getWebXml()
+    public File getWebXml()
     {
         return webXml;
     }
 
-    public void setWebXml( String webXml )
+    public void setWebXml( File webXml )
     {
         this.webXml = webXml;
     }
@@ -307,10 +307,10 @@
      *
      * @param sourceDirectory the source directory
      * @param webappDirectory the target directory
-     * @param webXml          the path to a custom web.xml
+     * @param webXml          the abstract path to the web.xml
      * @throws java.io.IOException if an error occured while copying resources
      */
-    public void copyResources( File sourceDirectory, File webappDirectory, 
String webXml, String containerConfigXML )
+    public void copyResources( File sourceDirectory, File webappDirectory, 
File webXml, String containerConfigXML )
         throws IOException
     {
         if ( !sourceDirectory.equals( webappDirectory ) )
@@ -326,11 +326,11 @@
                 }
             }
 
-            if ( StringUtils.isNotEmpty( webXml ) )
+            if ( webXml != null )
             {
                 //rename to web.xml
                 File webinfDir = new File( webappDirectory, WEB_INF );
-                FileUtils.copyFileIfModified( new File( webXml ), new File( 
webinfDir, "/web.xml" ) );
+                FileUtils.copyFile( webXml, new File( webinfDir, "/web.xml" ) 
);
             }
 
             if ( StringUtils.isNotEmpty( containerConfigXML ) )


Reply via email to