Author: olamy
Date: Mon Oct 17 19:58:19 2011
New Revision: 1185342

URL: http://svn.apache.org/viewvc?rev=1185342&view=rev
Log:
 [MTOMCAT-102] do not alterate the artifact installed locally when adding a 
context.xml file.
Modified:
    
tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractExecWarMojo.java

Modified: 
tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractExecWarMojo.java
URL: 
http://svn.apache.org/viewvc/tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractExecWarMojo.java?rev=1185342&r1=1185341&r2=1185342&view=diff
==============================================================================
--- 
tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractExecWarMojo.java
 (original)
+++ 
tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractExecWarMojo.java
 Mon Oct 17 19:58:19 2011
@@ -22,6 +22,7 @@ import org.apache.commons.compress.archi
 import org.apache.commons.compress.archivers.ArchiveOutputStream;
 import org.apache.commons.compress.archivers.ArchiveStreamFactory;
 import org.apache.commons.compress.archivers.jar.JarArchiveEntry;
+import org.apache.commons.io.FileUtils;
 import org.apache.commons.io.IOUtils;
 import org.apache.commons.lang.StringUtils;
 import org.apache.maven.artifact.Artifact;
@@ -302,7 +303,8 @@ public abstract class AbstractExecWarMoj
                                                             
dependency.getType() );
 
                         artifactResolver.resolve( artifact, this.remoteRepos, 
this.local );
-                        File warFile = artifact.getFile();
+                        File warFile = new File( buildDirectory, 
artifact.getFile().getName() );
+                        FileUtils.copyFile( artifact.getFile(), warFile );
                         if ( warRunDependency.contextXml != null )
                         {
                             addContextXmlToWar( warRunDependency.contextXml, 
warFile );



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to