You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ol...@apache.org on 2012/05/28 17:53:24 UTC

svn commit: r1343302 - /tomcat/maven-plugin/trunk/tomcat7-maven-plugin/src/main/java/org/apache/tomcat/maven/plugin/tomcat7/run/AbstractExecWarMojo.java

Author: olamy
Date: Mon May 28 15:53:23 2012
New Revision: 1343302

URL: http://svn.apache.org/viewvc?rev=1343302&view=rev
Log:
cleanup a bit patch from previous commit

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=1343302&r1=1343301&r2=1343302&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 May 28 15:53:23 2012
@@ -51,7 +51,6 @@ import java.io.InputStream;
 import java.io.OutputStream;
 import java.io.PrintWriter;
 import java.util.ArrayList;
-import java.util.Date;
 import java.util.Enumeration;
 import java.util.Iterator;
 import java.util.List;
@@ -97,6 +96,7 @@ public abstract class AbstractExecWarMoj
      * Path under {@link #buildDirectory} where this mojo may do temporary work.
      *
      * @parameter default-value="tomcat7-maven-plugin-exec"
+     * @since 2.0
      */
     private String pluginWorkDirectory;
 
@@ -298,7 +298,8 @@ public abstract class AbstractExecWarMoj
 
             Properties properties = new Properties();
 
-            properties.put( Tomcat7Runner.ARCHIVE_GENERATION_TIMESTAMP_KEY, Long.toString( System.currentTimeMillis() ) );
+            properties.put( Tomcat7Runner.ARCHIVE_GENERATION_TIMESTAMP_KEY,
+                            Long.toString( System.currentTimeMillis() ) );
             properties.put( Tomcat7Runner.ENABLE_NAMING_KEY, Boolean.toString( enableNaming ) );
             properties.put( Tomcat7Runner.ACCESS_LOG_VALVE_FORMAT_KEY, accessLogValveFormat );
             properties.put( Tomcat7Runner.HTTP_PROTOCOL_KEY, connectorHttpProtocol );
@@ -322,10 +323,11 @@ public abstract class AbstractExecWarMoj
                     if ( warRunDependency.dependency != null )
                     {
                         Dependency dependency = warRunDependency.dependency;
-                        Artifact artifact =
-                            artifactFactory.createArtifactWithClassifier( dependency.getGroupId(), dependency.getArtifactId(),
-                                                            dependency.getVersion(), dependency.getType(),
-                                                            dependency.getClassifier() );
+                        Artifact artifact = artifactFactory.createArtifactWithClassifier( dependency.getGroupId(),
+                                                                                          dependency.getArtifactId(),
+                                                                                          dependency.getVersion(),
+                                                                                          dependency.getType(),
+                                                                                          dependency.getClassifier() );
 
                         artifactResolver.resolve( artifact, this.remoteRepos, this.local );
 
@@ -510,11 +512,16 @@ public abstract class AbstractExecWarMoj
      * @return File representing the resolved plugin work dir
      * @throws MojoExecutionException if the plugin work dir cannot be created
      */
-    protected File resolvePluginWorkDir() throws MojoExecutionException {
-        File workDir = new File(buildDirectory, pluginWorkDirectory);
-        if(!workDir.exists() && !workDir.mkdirs()){
-            throw new MojoExecutionException("Could not create plugin work directory at " + workDir.getAbsolutePath());
-        };
+    protected File resolvePluginWorkDir()
+        throws MojoExecutionException
+    {
+        File workDir = new File( buildDirectory, pluginWorkDirectory );
+        if ( !workDir.exists() && !workDir.mkdirs() )
+        {
+            throw new MojoExecutionException(
+                "Could not create plugin work directory at " + workDir.getAbsolutePath() );
+        }
+
         return workDir;
 
     }



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