bwalding 2003/06/17 19:48:09
Modified: src/java/org/apache/maven/cli CLIManager.java
src/java/org/apache/maven/jelly/tags/maven ReactorTag.java
src/java/org/apache/maven/project BaseObject.java
Project.java
src/java/org/apache/maven/plugin
DefaultPluginCacheManager.java
src/java/org/apache/maven/jelly JellyBuildListener.java
src/java/org/apache/maven MavenSession.java
AntProjectBuilder.java
src/java/org/apache/maven/util MD5Sum.java
src/java/org/apache/maven/verifier DependencyVerifier.java
Log:
A variety of cleanups that *SHOULD* have no effect (I've double checked that they
won't, but I'm not perfect)
Ranging from
o deprecating badly named methods (setter called isDebug)
o adding comments about weird behaviour that should be reviewed
o changing parameter names to not mirror class instance variables
o removing unused private variables
o removing unused imports (usually due to previous items).
Revision Changes Path
1.8 +5 -0 maven/src/java/org/apache/maven/cli/CLIManager.java
Index: CLIManager.java
===================================================================
RCS file: /home/cvs/maven/src/java/org/apache/maven/cli/CLIManager.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- CLIManager.java 11 Apr 2003 23:45:33 -0000 1.7
+++ CLIManager.java 18 Jun 2003 02:48:08 -0000 1.8
@@ -93,6 +93,11 @@
{
options = new Options();
+ /*
+ * XXX the usage here looks broken / confusing.
+ * If .create is static, then it can't be using the longopt / description
state
+ * Which then raises the question, are we misusing OptionBuilder?
+ */
options.addOption( OptionBuilder
.withLongOpt( "nobanner" )
.withDescription( "Suppress logo banner" )
1.30 +3 -3 maven/src/java/org/apache/maven/jelly/tags/maven/ReactorTag.java
Index: ReactorTag.java
===================================================================
RCS file:
/home/cvs/maven/src/java/org/apache/maven/jelly/tags/maven/ReactorTag.java,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- ReactorTag.java 12 Apr 2003 00:02:02 -0000 1.29
+++ ReactorTag.java 18 Jun 2003 02:48:08 -0000 1.30
@@ -127,7 +127,7 @@
/**
* Setter for the basedir property
- *
+ * XXX if the method it overrides is deprecated, is this also deprecated?
* @param basedir the base directory for execution of the project
*/
public void setBasedir( File basedir )
1.23 +4 -4 maven/src/java/org/apache/maven/project/BaseObject.java
Index: BaseObject.java
===================================================================
RCS file: /home/cvs/maven/src/java/org/apache/maven/project/BaseObject.java,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- BaseObject.java 11 Apr 2003 23:45:33 -0000 1.22
+++ BaseObject.java 18 Jun 2003 02:48:08 -0000 1.23
@@ -162,17 +162,17 @@
* list we have used to store the meta properties during
* mapping through betwixt.
*
- * @param name the name of the property to retrieve
+ * @param propertyName the name of the property to retrieve
* @return the property value
*/
- public String getProperty( String name )
+ public String getProperty( String propertyName )
{
if ( properties == null )
{
resolveProperties();
}
- return (String) properties.get( name );
+ return (String) properties.get( propertyName );
}
/**
1.82 +10 -10 maven/src/java/org/apache/maven/project/Project.java
Index: Project.java
===================================================================
RCS file: /home/cvs/maven/src/java/org/apache/maven/project/Project.java,v
retrieving revision 1.81
retrieving revision 1.82
diff -u -r1.81 -r1.82
--- Project.java 3 Jun 2003 05:17:58 -0000 1.81
+++ Project.java 18 Jun 2003 02:48:08 -0000 1.82
@@ -671,34 +671,34 @@
/**
* Set an individual dependency's classpath entry.
*
- * @param id Dependency id.
+ * @param depId Dependency id.
* @param path Classpath for the given dependency.
*/
- public void setDependencyPath( String id, String path )
+ public void setDependencyPath( String depId, String path )
{
- dependencyPaths.put( id, path );
+ dependencyPaths.put( depId, path );
}
/**
* Get an individual dependencies classpath entry.
*
- * @param id Dependency id.
+ * @param depId Dependency id.
* @return Classpath for the given dependency.
*/
- public String getDependencyPath( String id )
+ public String getDependencyPath( String depId )
{
- return (String) dependencyPaths.get( legacyToStandardId( id ) );
+ return (String) dependencyPaths.get( legacyToStandardId( depId ) );
}
/**
* Get an individual dependency by id.
*
- * @param id Dependency id.
+ * @param depId Dependency id.
* @return Dependency for the given id.
*/
- public Dependency getDependency( String id )
+ public Dependency getDependency( String depId )
{
- return (Dependency) dependencyMap.get( legacyToStandardId( id ) );
+ return (Dependency) dependencyMap.get( legacyToStandardId( depId ) );
}
/**
1.4 +1 -1
maven/src/java/org/apache/maven/plugin/DefaultPluginCacheManager.java
Index: DefaultPluginCacheManager.java
===================================================================
RCS file:
/home/cvs/maven/src/java/org/apache/maven/plugin/DefaultPluginCacheManager.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- DefaultPluginCacheManager.java 21 Feb 2003 07:03:33 -0000 1.3
+++ DefaultPluginCacheManager.java 18 Jun 2003 02:48:08 -0000 1.4
@@ -271,7 +271,7 @@
insideGoal = true;
String prereqs = attributes.getValue( "prereqs" );
- String description = attributes.getValue( "description" );
+ //Wasn't used: String description = attributes.getValue( "description"
);
if ( prereqs != null )
{
1.2 +12 -3 maven/src/java/org/apache/maven/jelly/JellyBuildListener.java
Index: JellyBuildListener.java
===================================================================
RCS file: /home/cvs/maven/src/java/org/apache/maven/jelly/JellyBuildListener.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- JellyBuildListener.java 2 Jan 2003 07:30:25 -0000 1.1
+++ JellyBuildListener.java 18 Jun 2003 02:48:08 -0000 1.2
@@ -89,10 +89,19 @@
return this.debug;
}
- public void isDebug( boolean debug )
+ /**
+ * @deprecated Use setDebug (deprecated for 1.0-RC1)
+ */
+ public void isDebug( boolean newDebug )
{
- this.debug = debug;
+ setDebug( newDebug );
}
+
+ public void setDebug( boolean debug )
+ {
+ this.debug = debug;
+ }
+
public void buildFinished( BuildEvent event )
{
1.12 +1 -10 maven/src/java/org/apache/maven/MavenSession.java
Index: MavenSession.java
===================================================================
RCS file: /home/cvs/maven/src/java/org/apache/maven/MavenSession.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- MavenSession.java 15 Apr 2003 00:38:07 -0000 1.11
+++ MavenSession.java 18 Jun 2003 02:48:08 -0000 1.12
@@ -64,10 +64,7 @@
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
-import java.util.HashMap;
-//import com.werken.classworlds.ClassRealm;
-//import com.werken.classworlds.ClassWorld;
/**
* This class should represent the single place to access everything that
@@ -118,11 +115,6 @@
private PluginManager pluginManager;
- //private ClassWorld classWorld;
-
- // A Table of POMs that have already been loaded.
- private HashMap poms;
-
// ------------------------------------------------------------
// I N S T A N C E M E M B E R S
// ------------------------------------------------------------
@@ -137,7 +129,6 @@
/** Default Constructor. */
public MavenSession()
{
- poms = new HashMap();
goalNames = new ArrayList();
pluginManager = new PluginManager( this );
//goalNames.add( BUILD_START_GOAL );
1.3 +1 -1 maven/src/java/org/apache/maven/AntProjectBuilder.java
Index: AntProjectBuilder.java
===================================================================
RCS file: /home/cvs/maven/src/java/org/apache/maven/AntProjectBuilder.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- AntProjectBuilder.java 2 Jan 2003 07:30:25 -0000 1.2
+++ AntProjectBuilder.java 18 Jun 2003 02:48:08 -0000 1.3
@@ -16,7 +16,7 @@
{
// Create the build listener.
JellyBuildListener buildListener = new JellyBuildListener(
project.getContext().getXMLOutput() );
- buildListener.isDebug( project.getContext().getDebugOn().booleanValue() );
+ buildListener.setDebug( project.getContext().getDebugOn().booleanValue() );
buildListener.setEmacsMode(
project.getContext().getEmacsModeOn().booleanValue() );
// Create our ant project.
1.10 +5 -1 maven/src/java/org/apache/maven/util/MD5Sum.java
Index: MD5Sum.java
===================================================================
RCS file: /home/cvs/maven/src/java/org/apache/maven/util/MD5Sum.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- MD5Sum.java 12 Apr 2003 00:02:06 -0000 1.9
+++ MD5Sum.java 18 Jun 2003 02:48:08 -0000 1.10
@@ -68,6 +68,10 @@
* The 128 bit MD5 hash is converted into a 32 character long String. Each
* character of the String is the hexadecimal representation of 4 bits of the
* digest.
+ *
+ * XXX The API here is a mess. It is combining a static utility class with a
+ * message digest API. Some methods which should be static are not, presumably
+ * so Jelly can easily access them.
*
* @author Remy Maucherat
* @author <a href="mailto:[EMAIL PROTECTED]">Jason van Zyl</a>
1.25 +2 -2 maven/src/java/org/apache/maven/verifier/DependencyVerifier.java
Index: DependencyVerifier.java
===================================================================
RCS file:
/home/cvs/maven/src/java/org/apache/maven/verifier/DependencyVerifier.java,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- DependencyVerifier.java 12 Apr 2003 00:02:05 -0000 1.24
+++ DependencyVerifier.java 18 Jun 2003 02:48:08 -0000 1.25
@@ -372,7 +372,7 @@
/**
* Verify each of the artifacts if an md5 checksum is available.
- *
+ * XXX As this is not used, it has probably never been tested.
* @throws ChecksumVerificationException If we encounter an artifact that
* is corrupted.
*/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]