Author: olamy
Date: Mon May 28 19:41:03 2012
New Revision: 1343375
URL: http://svn.apache.org/viewvc?rev=1343375&view=rev
Log:
use File rather than String
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=1343375&r1=1343374&r2=1343375&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 19:41:03 2012
@@ -95,10 +95,10 @@ public abstract class AbstractExecWarMoj
/**
* Path under {@link #buildDirectory} where this mojo may do temporary
work.
*
- * @parameter default-value="tomcat7-maven-plugin-exec"
+ * @parameter
default-value="${project.build.directory}/tomcat7-maven-plugin-exec"
* @since 2.0
*/
- private String pluginWorkDirectory;
+ private File pluginWorkDirectory;
/**
* @parameter default-value="src/main/tomcatconf"
expression="${maven.tomcat.exec.war.tomcatConf}"
@@ -515,14 +515,18 @@ public abstract class AbstractExecWarMoj
protected File resolvePluginWorkDir()
throws MojoExecutionException
{
- File workDir = new File( buildDirectory, pluginWorkDirectory );
- if ( !workDir.exists() && !workDir.mkdirs() )
+ if ( pluginWorkDirectory.exists() )
+ {
+ return pluginWorkDirectory;
+ }
+
+ if ( !pluginWorkDirectory.exists() && !pluginWorkDirectory.mkdirs() )
{
throw new MojoExecutionException(
- "Could not create plugin work directory at " +
workDir.getAbsolutePath() );
+ "Could not create plugin work directory at " +
pluginWorkDirectory.getAbsolutePath() );
}
- return workDir;
+ return pluginWorkDirectory;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]