PR: MNG-829
Submitted by: Johnny R. Ruiz III
Reviewed by: Brett Porter
use File for basedir aligned parameters in various plugins
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk/maven-plugins@312877 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/src/main/java/org/apache/maven/plugin/rar/RarMojo.java b/src/main/java/org/apache/maven/plugin/rar/RarMojo.java
index 1d8c7fe..007abd8 100644
--- a/src/main/java/org/apache/maven/plugin/rar/RarMojo.java
+++ b/src/main/java/org/apache/maven/plugin/rar/RarMojo.java
@@ -52,14 +52,14 @@
* @parameter expression="${basedir}/src/main/rar"
* @required
*/
- private String rarSourceDirectory;
+ private File rarSourceDirectory;
/**
* The location of the ra.xml file to be used within the rar file.
*
* @parameter expression="${basedir}/src/main/rar/META-INF/ra.xml"
*/
- private String raXmlFile;
+ private File raXmlFile;
/**
* Specify if the generated jar file of this project should be
@@ -74,7 +74,7 @@
*
* @parameter expression="${basedir}/src/main/rar/META-INF/MANIFEST.MF"
*/
- private String manifestFile;
+ private File manifestFile;
/**
* Directory that resources are copied to during the build.
@@ -181,7 +181,7 @@
// Copy source files
try
{
- File rarSourceDir = new File( rarSourceDirectory );
+ File rarSourceDir = rarSourceDirectory;
if ( rarSourceDir.exists() )
{
getLog().info( "Copy rar resources to " + getBuildDir().getAbsolutePath() );
@@ -241,7 +241,7 @@
private void includeCustomManifestFile()
{
- File customManifestFile = new File( manifestFile );
+ File customManifestFile = manifestFile;
if ( !customManifestFile.exists() )
{
getLog().info( "Could not find manifest file: " + manifestFile +" - Generating one");
@@ -256,10 +256,10 @@
private void includeCustomRaXmlFile()
throws IOException
{
- if (raXmlFile == null || raXmlFile.trim().length() == 0) {
+ if (raXmlFile == null) {
}
- File raXml = new File(raXmlFile );
+ File raXml = raXmlFile;
if (raXml.exists()) {
getLog().info( "Using ra.xml "+ raXmlFile);
File metaInfDir = new File(getBuildDir(), "META-INF");