You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by rf...@apache.org on 2015/06/23 00:01:11 UTC
svn commit: r1686951 - in /maven/plugins/trunk/maven-dependency-plugin/src:
main/java/org/apache/maven/plugin/dependency/fromDependencies/BuildClasspathMojo.java
test/java/org/apache/maven/plugin/dependency/fromDependencies/TestBuildClasspathMojo.java
Author: rfscholte
Date: Mon Jun 22 22:01:11 2015
New Revision: 1686951
URL: http://svn.apache.org/r1686951
Log:
[MDEP-495] Remove deprecated parameter
removed cpFile from 'build-classpath' goal
removed all getters and unused fields
Modified:
maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/fromDependencies/BuildClasspathMojo.java
maven/plugins/trunk/maven-dependency-plugin/src/test/java/org/apache/maven/plugin/dependency/fromDependencies/TestBuildClasspathMojo.java
Modified: maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/fromDependencies/BuildClasspathMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/fromDependencies/BuildClasspathMojo.java?rev=1686951&r1=1686950&r2=1686951&view=diff
==============================================================================
--- maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/fromDependencies/BuildClasspathMojo.java (original)
+++ maven/plugins/trunk/maven-dependency-plugin/src/main/java/org/apache/maven/plugin/dependency/fromDependencies/BuildClasspathMojo.java Mon Jun 22 22:01:11 2015
@@ -81,17 +81,6 @@ public class BuildClasspathMojo
private String prefix;
/**
- * The file to write the classpath string. If undefined, it just prints the classpath as [INFO].
- * This parameter is deprecated. Use outputFile instead.
- *
- * @since 2.0
- * @deprecated use outputFile instead
- */
- @Deprecated
- @Parameter( property = "mdep.cpFile" )
- private File cpFile;
-
- /**
* A property to set to the content of the classpath string.
*/
@Parameter( property = "mdep.outputProperty" )
@@ -145,7 +134,7 @@ public class BuildClasspathMojo
* @since 2.0
*/
@Parameter( defaultValue = "false" )
- boolean attach;
+ private boolean attach;
/**
* Write out the classpath in a format compatible with filtering (classpath=xxxxx)
@@ -153,7 +142,7 @@ public class BuildClasspathMojo
* @since 2.0
*/
@Parameter( property = "mdep.outputFilterFile", defaultValue = "false" )
- boolean outputFilterFile;
+ private boolean outputFilterFile;
/**
* Either append the artifact's baseVersion or uniqueVersion to the filename.
@@ -161,7 +150,7 @@ public class BuildClasspathMojo
* @since 2.6
*/
@Parameter( property = "mdep.useBaseVersion", defaultValue = "true" )
- protected boolean useBaseVersion = true;
+ private boolean useBaseVersion = true;
/**
* Maven ProjectHelper
@@ -170,22 +159,6 @@ public class BuildClasspathMojo
private MavenProjectHelper projectHelper;
/**
- * <i>not used in this goal</i>
- */
- @Parameter
- protected boolean useJvmChmod = true;
-
- /**
- * <i>not used in this goal</i>
- */
- @Parameter
- protected boolean ignorePermissions;
-
- boolean isFileSepSet = true;
-
- boolean isPathSepSet = true;
-
- /**
* Main entry into mojo. Gets the list of dependencies and iterates through calling copyArtifact.
*
* @throws MojoExecutionException with a message if an error occurs.
@@ -196,16 +169,9 @@ public class BuildClasspathMojo
protected void doExecute()
throws MojoExecutionException
{
-
- if ( cpFile != null )
- {
- getLog().warn( "The parameter cpFile is deprecated. Use outputFile instead." );
- this.outputFile = cpFile;
- }
-
// initialize the separators.
- isFileSepSet = StringUtils.isNotEmpty( fileSeparator );
- isPathSepSet = StringUtils.isNotEmpty( pathSeparator );
+ boolean isFileSepSet = StringUtils.isNotEmpty( fileSeparator );
+ boolean isPathSepSet = StringUtils.isNotEmpty( pathSeparator );
//don't allow them to have absolute paths when they attach.
if ( attach && StringUtils.isEmpty( localRepoProperty ) )
@@ -451,29 +417,13 @@ public class BuildClasspathMojo
}
/**
- * @return the outputFile
- */
- public File getCpFile()
- {
- return this.outputFile;
- }
-
- /**
* @param theCpFile the outputFile to set
*/
- public void setCpFile( File theCpFile )
- {
- this.outputFile = theCpFile;
- }
-
- /**
- * @return the outputProperty
- */
- public String getOutputProperty()
+ public void setOutputFile( File outputFile )
{
- return this.outputProperty;
+ this.outputFile = outputFile;
}
-
+
/**
* @param theOutputProperty the outputProperty to set
*/
@@ -483,14 +433,6 @@ public class BuildClasspathMojo
}
/**
- * @return the fileSeparator
- */
- public String getFileSeparator()
- {
- return this.fileSeparator;
- }
-
- /**
* @param theFileSeparator the fileSeparator to set
*/
public void setFileSeparator( String theFileSeparator )
@@ -499,14 +441,6 @@ public class BuildClasspathMojo
}
/**
- * @return the pathSeparator
- */
- public String getPathSeparator()
- {
- return this.pathSeparator;
- }
-
- /**
* @param thePathSeparator the pathSeparator to set
*/
public void setPathSeparator( String thePathSeparator )
@@ -515,14 +449,6 @@ public class BuildClasspathMojo
}
/**
- * @return the prefix
- */
- public String getPrefix()
- {
- return this.prefix;
- }
-
- /**
* @param thePrefix the prefix to set
*/
public void setPrefix( String thePrefix )
@@ -531,14 +457,6 @@ public class BuildClasspathMojo
}
/**
- * @return the regenerateFile
- */
- public boolean isRegenerateFile()
- {
- return this.regenerateFile;
- }
-
- /**
* @param theRegenerateFile the regenerateFile to set
*/
public void setRegenerateFile( boolean theRegenerateFile )
@@ -562,33 +480,8 @@ public class BuildClasspathMojo
this.stripVersion = theStripVersion;
}
- public String getLocalRepoProperty()
- {
- return localRepoProperty;
- }
-
public void setLocalRepoProperty( String localRepoProperty )
{
this.localRepoProperty = localRepoProperty;
}
-
- public boolean isFileSepSet()
- {
- return isFileSepSet;
- }
-
- public void setFileSepSet( boolean isFileSepSet )
- {
- this.isFileSepSet = isFileSepSet;
- }
-
- public boolean isPathSepSet()
- {
- return isPathSepSet;
- }
-
- public void setPathSepSet( boolean isPathSepSet )
- {
- this.isPathSepSet = isPathSepSet;
- }
}
Modified: maven/plugins/trunk/maven-dependency-plugin/src/test/java/org/apache/maven/plugin/dependency/fromDependencies/TestBuildClasspathMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-dependency-plugin/src/test/java/org/apache/maven/plugin/dependency/fromDependencies/TestBuildClasspathMojo.java?rev=1686951&r1=1686950&r2=1686951&view=diff
==============================================================================
--- maven/plugins/trunk/maven-dependency-plugin/src/test/java/org/apache/maven/plugin/dependency/fromDependencies/TestBuildClasspathMojo.java (original)
+++ maven/plugins/trunk/maven-dependency-plugin/src/test/java/org/apache/maven/plugin/dependency/fromDependencies/TestBuildClasspathMojo.java Mon Jun 22 22:01:11 2015
@@ -77,7 +77,7 @@ public class TestBuildClasspathMojo
// expected to catch this.
}
- mojo.setCpFile( new File( testDir, "buildClasspath.txt" ) );
+ mojo.setOutputFile( new File( testDir, "buildClasspath.txt" ) );
mojo.execute();
file = mojo.readClasspathFile();