Build fiel changes git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271150 13f79535-47bb-0310-9956-ffa450edef68master
@@ -23,11 +23,9 @@ | |||||
</patternset> | </patternset> | ||||
<patternset id="toohard"> | <patternset id="toohard"> | ||||
<exclude name="org/apache/tools/ant/taskdefs/Ant.java"/> | |||||
<exclude name="org/apache/tools/ant/taskdefs/AntStructure.java"/> | <exclude name="org/apache/tools/ant/taskdefs/AntStructure.java"/> | ||||
<exclude name="org/apache/tools/ant/taskdefs/Recorder.java"/> | <exclude name="org/apache/tools/ant/taskdefs/Recorder.java"/> | ||||
<exclude name="org/apache/tools/ant/taskdefs/RecorderEntry.java"/> | <exclude name="org/apache/tools/ant/taskdefs/RecorderEntry.java"/> | ||||
<exclude name="org/apache/tools/ant/taskdefs/CallTarget.java"/> | |||||
<exclude name="org/apache/tools/ant/taskdefs/optional/sound/*.java"/> | <exclude name="org/apache/tools/ant/taskdefs/optional/sound/*.java"/> | ||||
<exclude name="org/apache/tools/ant/taskdefs/optional/Native2Ascii.java"/> | <exclude name="org/apache/tools/ant/taskdefs/optional/Native2Ascii.java"/> | ||||
<exclude name="org/apache/tools/ant/taskdefs/optional/Javah.java"/> | <exclude name="org/apache/tools/ant/taskdefs/optional/Javah.java"/> | ||||
@@ -37,9 +35,12 @@ | |||||
<exclude name="org/apache/tools/ant/taskdefs/Parallel.java"/> | <exclude name="org/apache/tools/ant/taskdefs/Parallel.java"/> | ||||
<exclude name="org/apache/tools/ant/taskdefs/Sequential.java"/> | <exclude name="org/apache/tools/ant/taskdefs/Sequential.java"/> | ||||
<exclude name="org/apache/tools/ant/taskdefs/optional/ejb/**/*.java"/> | <exclude name="org/apache/tools/ant/taskdefs/optional/ejb/**/*.java"/> | ||||
<exclude name="org/apache/tools/ant/taskdefs/optional/jdepend/*.java"/> | |||||
</patternset> | </patternset> | ||||
<patternset id="converted"> | <patternset id="converted"> | ||||
<exclude name="org/apache/tools/ant/taskdefs/Ant.java"/> | |||||
<exclude name="org/apache/tools/ant/taskdefs/CallTarget.java"/> | |||||
</patternset> | </patternset> | ||||
<fileset id="ant1src" dir="../../src/main"> | <fileset id="ant1src" dir="../../src/main"> | ||||
@@ -162,7 +162,7 @@ | |||||
classname="com.puppycrawl.tools.checkstyle.CheckStyleTask"> | classname="com.puppycrawl.tools.checkstyle.CheckStyleTask"> | ||||
<classpath refid="checkstyle.path"/> | <classpath refid="checkstyle.path"/> | ||||
</taskdef> | </taskdef> | ||||
<mkdir dir="${bin.dir}/checkstyle"/> | |||||
<mkdir dir="${bin.dir}/check"/> | |||||
<checkstyle maxlinelen="80" | <checkstyle maxlinelen="80" | ||||
memberpattern="[a-z].*" | memberpattern="[a-z].*" | ||||
parampattern="[a-z].*" | parampattern="[a-z].*" | ||||
@@ -76,7 +76,6 @@ import org.apache.ant.common.util.AntException; | |||||
import org.apache.ant.common.util.ConfigException; | import org.apache.ant.common.util.ConfigException; | ||||
import org.apache.ant.common.util.ExecutionException; | import org.apache.ant.common.util.ExecutionException; | ||||
import org.apache.ant.common.util.FileUtils; | import org.apache.ant.common.util.FileUtils; | ||||
import org.apache.ant.common.util.Location; | |||||
import org.apache.ant.common.util.MessageLevel; | import org.apache.ant.common.util.MessageLevel; | ||||
import org.apache.ant.init.InitConfig; | import org.apache.ant.init.InitConfig; | ||||
@@ -56,9 +56,9 @@ import java.util.ArrayList; | |||||
import java.util.HashMap; | import java.util.HashMap; | ||||
import java.util.List; | import java.util.List; | ||||
import java.util.Map; | import java.util.Map; | ||||
import org.apache.ant.common.antlib.AbstractComponent; | |||||
import org.apache.ant.common.antlib.AbstractTask; | import org.apache.ant.common.antlib.AbstractTask; | ||||
import org.apache.ant.common.antlib.AntContext; | import org.apache.ant.common.antlib.AntContext; | ||||
import org.apache.ant.common.antlib.AbstractComponent; | |||||
import org.apache.ant.common.service.DataService; | import org.apache.ant.common.service.DataService; | ||||
import org.apache.ant.common.util.ExecutionException; | import org.apache.ant.common.util.ExecutionException; | ||||
@@ -80,7 +80,7 @@ public abstract class AntBase extends AbstractTask { | |||||
/** The property name */ | /** The property name */ | ||||
private String name; | private String name; | ||||
/** The property value*/ | |||||
/** The property value */ | |||||
private String value; | private String value; | ||||
@@ -103,7 +103,7 @@ public abstract class AntBase extends AbstractTask { | |||||
} | } | ||||
/** | /** | ||||
* Gets the name of the Property | |||||
* Gets the name of the Property | |||||
* | * | ||||
* @return the name value | * @return the name value | ||||
*/ | */ | ||||
@@ -119,13 +119,20 @@ public abstract class AntBase extends AbstractTask { | |||||
public String getValue() { | public String getValue() { | ||||
return value; | return value; | ||||
} | } | ||||
/** | |||||
* Validate this data type instance | |||||
* | |||||
* @exception ExecutionException if either attribute has not been set | |||||
*/ | |||||
public void validateComponent() throws ExecutionException { | public void validateComponent() throws ExecutionException { | ||||
if (name == null) { | if (name == null) { | ||||
throw new ExecutionException("\"name\" attribute of <property> must be supplied"); | |||||
throw new ExecutionException("\"name\" attribute of " | |||||
+ "<property> must be supplied"); | |||||
} | } | ||||
if (value == null) { | if (value == null) { | ||||
throw new ExecutionException("\"value\" attribute of <property> must be supplied"); | |||||
throw new ExecutionException("\"value\" attribute of " | |||||
+ "<property> must be supplied"); | |||||
} | } | ||||
} | } | ||||
} | } | ||||
@@ -178,9 +185,15 @@ public abstract class AntBase extends AbstractTask { | |||||
return toId; | return toId; | ||||
} | } | ||||
/** | |||||
* Validate this data type instance | |||||
* | |||||
* @exception ExecutionException if the refid attribute has not been set | |||||
*/ | |||||
public void validateComponent() throws ExecutionException { | public void validateComponent() throws ExecutionException { | ||||
if (refId == null) { | if (refId == null) { | ||||
throw new ExecutionException("\"refid\" attribute of <reference> must be supplied"); | |||||
throw new ExecutionException("\"refid\" attribute of " | |||||
+ "<reference> must be supplied"); | |||||
} | } | ||||
} | } | ||||
} | } | ||||
@@ -188,10 +201,16 @@ public abstract class AntBase extends AbstractTask { | |||||
/** The name of the target to be evaluated in the sub-build */ | /** The name of the target to be evaluated in the sub-build */ | ||||
private String targetName; | private String targetName; | ||||
/** flag which indicates if all current properties should be passed to the subbuild */ | |||||
/** | |||||
* flag which indicates if all current properties should be passed to | |||||
* the subbuild | |||||
*/ | |||||
private boolean inheritAll = true; | private boolean inheritAll = true; | ||||
/** flag which indicates if all current references should be passed to the subbuild */ | |||||
/** | |||||
* flag which indicates if all current references should be passed to | |||||
* the subbuild | |||||
*/ | |||||
private boolean inheritRefs = false; | private boolean inheritRefs = false; | ||||
/** The properties which will be passed to the sub-build */ | /** The properties which will be passed to the sub-build */ | ||||
@@ -203,7 +222,7 @@ public abstract class AntBase extends AbstractTask { | |||||
/** | /** | ||||
* Sets the target to be executed in the subbuild | * Sets the target to be executed in the subbuild | ||||
* | * | ||||
* @param targetName the name of the target to build | |||||
* @param targetName the name of the target to build | |||||
*/ | */ | ||||
public void setTarget(String targetName) { | public void setTarget(String targetName) { | ||||
this.targetName = targetName; | this.targetName = targetName; | ||||
@@ -221,7 +240,8 @@ public abstract class AntBase extends AbstractTask { | |||||
/** | /** | ||||
* Indicate if all references are to be passed to the subbuild | * Indicate if all references are to be passed to the subbuild | ||||
* | * | ||||
* @param inheritRefs true if the sub-build should be given all the current references | |||||
* @param inheritRefs true if the sub-build should be given all the | |||||
* current references | |||||
*/ | */ | ||||
public void setInheritRefs(boolean inheritRefs) { | public void setInheritRefs(boolean inheritRefs) { | ||||
this.inheritRefs = inheritRefs; | this.inheritRefs = inheritRefs; | ||||
@@ -251,7 +271,8 @@ public abstract class AntBase extends AbstractTask { | |||||
* Add a reference to be passed | * Add a reference to be passed | ||||
* | * | ||||
* @param reference the descriptor of the reference to be passed | * @param reference the descriptor of the reference to be passed | ||||
* @exception ExecutionException if the reference does not reference a valid object | |||||
* @exception ExecutionException if the reference does not reference a | |||||
* valid object | |||||
*/ | */ | ||||
public void addReference(Reference reference) throws ExecutionException { | public void addReference(Reference reference) throws ExecutionException { | ||||
String refId = reference.getRefId(); | String refId = reference.getRefId(); | ||||
@@ -80,7 +80,6 @@ public abstract class AbstractComponent implements ExecutionComponent { | |||||
* Validate the component. This is called after the element has been | * Validate the component. This is called after the element has been | ||||
* configured from its build model. The element may perform validation | * configured from its build model. The element may perform validation | ||||
* of its configuration | * of its configuration | ||||
* | * | ||||
* @exception ExecutionException if validation fails | * @exception ExecutionException if validation fails | ||||
*/ | */ | ||||
@@ -100,9 +99,11 @@ public abstract class AbstractComponent implements ExecutionComponent { | |||||
/** | /** | ||||
* Short cut to get a core service instance | * Short cut to get a core service instance | ||||
* | * | ||||
* @param serviceClass the required interface of which an instance is required | |||||
* @param serviceClass the required interface of which an instance is | |||||
* required | |||||
* @return the core's instance of the requested service | * @return the core's instance of the requested service | ||||
* @exception ExecutionException if the core does not support the requested service | |||||
* @exception ExecutionException if the core does not support the | |||||
* requested service | |||||
*/ | */ | ||||
protected Object getCoreService(Class serviceClass) | protected Object getCoreService(Class serviceClass) | ||||
throws ExecutionException { | throws ExecutionException { | ||||
@@ -146,7 +146,8 @@ public abstract class AntException extends Exception { | |||||
* Sets the file location where the error occured. | * Sets the file location where the error occured. | ||||
* | * | ||||
* @param newLocation the new location value | * @param newLocation the new location value | ||||
* @param override true if the location should override any currently set location | |||||
* @param override true if the location should override any currently | |||||
* set location | |||||
*/ | */ | ||||
public void setLocation(Location newLocation, boolean override) { | public void setLocation(Location newLocation, boolean override) { | ||||
if (override || location == Location.UNKNOWN_LOCATION) { | if (override || location == Location.UNKNOWN_LOCATION) { | ||||