You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by di...@apache.org on 2004/01/08 01:26:10 UTC
cvs commit: maven/src/java/org/apache/maven/project Build.java BaseObject.java ArtifactType.java
dion 2004/01/07 16:26:10
Modified: src/java/org/apache/maven/project Tag: MAVEN-1_0-BRANCH
Build.java BaseObject.java ArtifactType.java
Log:
Code cleanup
Revision Changes Path
No revision
No revision
1.24.4.3 +15 -11 maven/src/java/org/apache/maven/project/Build.java
Index: Build.java
===================================================================
RCS file: /home/cvs/maven/src/java/org/apache/maven/project/Build.java,v
retrieving revision 1.24.4.2
retrieving revision 1.24.4.3
diff -u -r1.24.4.2 -r1.24.4.3
--- Build.java 31 Dec 2003 01:36:32 -0000 1.24.4.2
+++ Build.java 8 Jan 2004 00:26:10 -0000 1.24.4.3
@@ -299,10 +299,14 @@
return resources;
}
+ /**
+ * @return a string for debug purposes
+ * @see java.lang.Object#toString()
+ */
public String toString()
{
- return "[ sourceDirectory = " + getSourceDirectory() +
- ", unitTestSourceDirectory = " + getUnitTestSourceDirectory() + " ]";
+ return "[ sourceDirectory = " + getSourceDirectory()
+ + ", unitTestSourceDirectory = " + getUnitTestSourceDirectory() + " ]";
}
/**
@@ -312,7 +316,7 @@
*/
public void resolveDirectories( File basedir ) throws IOException
{
- for ( Iterator i = resources.iterator(); i.hasNext(); )
+ for ( Iterator i = resources.iterator(); i.hasNext();)
{
Resource r = ( Resource ) i.next();
r.resolveDirectory( basedir );
@@ -320,7 +324,7 @@
if ( unitTest != null )
{
- for ( Iterator i = unitTest.getResources().iterator(); i.hasNext(); )
+ for ( Iterator i = unitTest.getResources().iterator(); i.hasNext();)
{
Resource r = ( Resource ) i.next();
r.resolveDirectory( basedir );
@@ -328,7 +332,7 @@
}
if ( sourceDirectory != null && sourceDirectory.length() > 0 )
- {
+ {
sourceDirectory = MavenUtils.makeAbsolutePath( basedir, sourceDirectory );
}
@@ -353,23 +357,23 @@
* Setup inheritence from a parent project build element.
* @param parent the parent build element
*/
- void mergeParent(Build parent)
+ void mergeParent(Build parent)
{
if (sourceDirectory == null)
{
sourceDirectory = parent.sourceDirectory;
}
-
+
if (unitTestSourceDirectory == null)
{
unitTestSourceDirectory = parent.unitTestSourceDirectory;
}
-
+
if (integrationUnitTestSourceDirectory == null)
{
integrationUnitTestSourceDirectory = parent.integrationUnitTestSourceDirectory;
}
-
+
if (aspectSourceDirectory == null)
{
aspectSourceDirectory = parent.aspectSourceDirectory;
@@ -382,7 +386,7 @@
Project.mergeLists(parent.resources, resources);
Project.mergeLists(parent.sourceModifications, sourceModifications);
-
+
if (unitTest == null)
{
unitTest = parent.unitTest;
1.28.4.1 +3 -3 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.28
retrieving revision 1.28.4.1
diff -u -r1.28 -r1.28.4.1
--- BaseObject.java 5 Sep 2003 15:28:41 -0000 1.28
+++ BaseObject.java 8 Jan 2004 00:26:10 -0000 1.28.4.1
@@ -222,7 +222,7 @@
{
properties = new HashMap();
- for ( Iterator i = combinedProperties.iterator(); i.hasNext(); )
+ for ( Iterator i = combinedProperties.iterator(); i.hasNext();)
{
String combinedProperty = (String) i.next();
String[] s = StringUtils.split( combinedProperty, ":" );
@@ -308,7 +308,7 @@
protected boolean isValid( String value )
{
if ( value != null
- && value.trim().equals("") == false )
+ && !value.trim().equals("") )
{
return true;
}
1.5.4.1 +8 -8 maven/src/java/org/apache/maven/project/ArtifactType.java
Index: ArtifactType.java
===================================================================
RCS file: /home/cvs/maven/src/java/org/apache/maven/project/ArtifactType.java,v
retrieving revision 1.5
retrieving revision 1.5.4.1
diff -u -r1.5 -r1.5.4.1
--- ArtifactType.java 21 Sep 2003 21:22:52 -0000 1.5
+++ ArtifactType.java 8 Jan 2004 00:26:10 -0000 1.5.4.1
@@ -59,7 +59,7 @@
/**
* Provides mapping between artifact types and an extension associated
* with these types.
- *
+ *
* @author <a href="mailto:vmassol@apache.org">Vincent Massol</a>
* @version $Id$
*/
@@ -79,7 +79,7 @@
* Reusable AspectJ aspect mapping.
*/
public static final ArtifactType ASPECT = new ArtifactType("aspect", "jar");
-
+
/**
* Artifact type.
*/
@@ -89,7 +89,7 @@
* Artifact file extension.
*/
private String extension;
-
+
/**
* @param type the artifact type
* @param extension the artifact extension
@@ -110,7 +110,7 @@
/**
* @return the artifact extension
- */
+ */
public String getExtension()
{
return this.extension;
@@ -118,17 +118,17 @@
/**
* Factory to return the correct {@link ArtifactType} object.
- *
+ *
* @param type the artifact type
* @return the artifact mapping
- */
+ */
public static ArtifactType findType(String type)
{
ArtifactType result;
if (type == null)
{
- result = null;
+ result = null;
}
else if (type.equalsIgnoreCase("ejb"))
{
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org