git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@1586262 13f79535-47bb-0310-9956-ffa450edef68master
@@ -43,15 +43,15 @@ public class AntTypeDefinition { | |||||
/** | /** | ||||
* Set the restrict attribute. | * Set the restrict attribute. | ||||
* @param restrict the value to set. | * @param restrict the value to set. | ||||
*/ | |||||
public void setRestrict(boolean restrict) { | |||||
*/ | |||||
public void setRestrict(boolean restrict) { | |||||
this.restrict = restrict; | this.restrict = restrict; | ||||
} | |||||
} | |||||
/** | /** | ||||
* Get the restrict attribute. | * Get the restrict attribute. | ||||
* @return the restrict attribute. | |||||
*/ | |||||
* @return the restrict attribute. | |||||
*/ | |||||
public boolean isRestrict() { | public boolean isRestrict() { | ||||
return restrict; | return restrict; | ||||
} | } | ||||
@@ -236,12 +236,12 @@ public class AntTypeDefinition { | |||||
/** | /** | ||||
* Checks if the attributes are correct. | * Checks if the attributes are correct. | ||||
* <dl> | |||||
* <ul> | |||||
* <li>if the class can be created.</li> | * <li>if the class can be created.</li> | ||||
* <li>if an adapter class can be created</li> | * <li>if an adapter class can be created</li> | ||||
* <li>if the type is assignable from adapter</li> | * <li>if the type is assignable from adapter</li> | ||||
* <li>if the type can be used with the adapter class</li> | * <li>if the type can be used with the adapter class</li> | ||||
* </dl> | |||||
* </ul> | |||||
* @param project the current project. | * @param project the current project. | ||||
*/ | */ | ||||
public void checkClass(Project project) { | public void checkClass(Project project) { | ||||
@@ -298,7 +298,8 @@ public class AntTypeDefinition { | |||||
/** | /** | ||||
* Inner implementation of the {@link #createAndSet(Project, Class)} logic, with no | * Inner implementation of the {@link #createAndSet(Project, Class)} logic, with no | ||||
* exception catching | |||||
* exception catching. | |||||
* @param <T> return type of the method | |||||
* @param newclass class to create | * @param newclass class to create | ||||
* @param project the project to use | * @param project the project to use | ||||
* @return a newly constructed and bound instance. | * @return a newly constructed and bound instance. | ||||
@@ -65,7 +65,7 @@ public interface ArgumentProcessor { | |||||
/** | /** | ||||
* Print the usage of the supported arguments | * Print the usage of the supported arguments | ||||
* | * | ||||
* @see org.apache.tools.ant.Main.printUsage() | |||||
* @see org.apache.tools.ant.Main#printUsage() | |||||
*/ | */ | ||||
void printUsage(PrintStream writer); | void printUsage(PrintStream writer); | ||||
@@ -119,12 +119,12 @@ import org.apache.tools.ant.util.VectorSet; | |||||
* | * | ||||
* System.out.println("FILES:"); | * System.out.println("FILES:"); | ||||
* String[] files = ds.getIncludedFiles(); | * String[] files = ds.getIncludedFiles(); | ||||
* for (int i = 0; i < files.length; i++) { | |||||
* for (int i = 0; i < files.length; i++) { | |||||
* System.out.println(files[i]); | * System.out.println(files[i]); | ||||
* } | * } | ||||
* </pre> | * </pre> | ||||
* This will scan a directory called test for .class files, but excludes all | * This will scan a directory called test for .class files, but excludes all | ||||
* files in all proper subdirectories of a directory called "modules" | |||||
* files in all proper subdirectories of a directory called "modules". | |||||
* | * | ||||
*/ | */ | ||||
public class DirectoryScanner | public class DirectoryScanner | ||||
@@ -1736,7 +1736,9 @@ public class DirectoryScanner | |||||
* but would have been followed had followsymlinks been true or | * but would have been followed had followsymlinks been true or | ||||
* maxLevelsOfSymlinks been bigger. | * maxLevelsOfSymlinks been bigger. | ||||
* | * | ||||
* @return sorted array of not followed symlinks | |||||
* @since Ant 1.8.0 | * @since Ant 1.8.0 | ||||
* @see #notFollowedSymlinks | |||||
*/ | */ | ||||
public synchronized String[] getNotFollowedSymlinks() { | public synchronized String[] getNotFollowedSymlinks() { | ||||
String[] links; | String[] links; | ||||
@@ -37,7 +37,7 @@ public interface Executor { | |||||
* Get the appropriate subproject Executor instance. | * Get the appropriate subproject Executor instance. | ||||
* | * | ||||
* This allows the top executor to control what type of executor is used to execute | * This allows the top executor to control what type of executor is used to execute | ||||
* subprojects via <ant>/<antcall>/<subant> and task that extend these. | |||||
* subprojects via <ant>/<antcall>/<subant> and task that extend these. | |||||
* All bundled Executors return a SingleCheckExecutor (running a merged set of | * All bundled Executors return a SingleCheckExecutor (running a merged set of | ||||
* depended targets for all targets called) to run sub-builds. | * depended targets for all targets called) to run sub-builds. | ||||
* | * | ||||
@@ -648,8 +648,8 @@ public final class IntrospectionHelper { | |||||
* Indicates whether the introspected class is a dynamic one, | * Indicates whether the introspected class is a dynamic one, | ||||
* supporting arbitrary nested elements and/or attributes. | * supporting arbitrary nested elements and/or attributes. | ||||
* | * | ||||
* @return <code>true<code> if the introspected class is dynamic; | |||||
* <code>false<code> otherwise. | |||||
* @return <div><code>true</code> if the introspected class is dynamic; | |||||
* <code>false</code> otherwise.</div> | |||||
* @since Ant 1.6.3 | * @since Ant 1.6.3 | ||||
* | * | ||||
* @see DynamicElement | * @see DynamicElement | ||||
@@ -664,8 +664,8 @@ public final class IntrospectionHelper { | |||||
* Indicates whether the introspected class is a task container, | * Indicates whether the introspected class is a task container, | ||||
* supporting arbitrary nested tasks/types. | * supporting arbitrary nested tasks/types. | ||||
* | * | ||||
* @return <code>true<code> if the introspected class is a container; | |||||
* <code>false<code> otherwise. | |||||
* @return <code>true</code> if the introspected class is a container; | |||||
* <code>false</code> otherwise. | |||||
* @since Ant 1.6.3 | * @since Ant 1.6.3 | ||||
* | * | ||||
* @see TaskContainer | * @see TaskContainer | ||||
@@ -984,13 +984,13 @@ public final class IntrospectionHelper { | |||||
* Returns a read-only list of extension points supported | * Returns a read-only list of extension points supported | ||||
* by the introspected class. | * by the introspected class. | ||||
* <p> | * <p> | ||||
* A task/type or nested element with void methods named <code>add()<code> | |||||
* A task/type or nested element with void methods named <code>add()</code> | |||||
* or <code>addConfigured()</code>, taking a single class or interface | * or <code>addConfigured()</code>, taking a single class or interface | ||||
* argument, supports extensions point. This method returns the list of | * argument, supports extensions point. This method returns the list of | ||||
* all these <em>void add[Configured](type)</em> methods. | * all these <em>void add[Configured](type)</em> methods. | ||||
* | * | ||||
* @return a list of void, single argument add() or addConfigured() | * @return a list of void, single argument add() or addConfigured() | ||||
* <code>Method<code>s of all supported extension points. | |||||
* <code>Method</code>s of all supported extension points. | |||||
* These methods are sorted such that if the argument type of a | * These methods are sorted such that if the argument type of a | ||||
* method derives from another type also an argument of a method | * method derives from another type also an argument of a method | ||||
* of this list, the method with the most derived argument will | * of this list, the method with the most derived argument will | ||||
@@ -48,7 +48,7 @@ public class ProjectHelper { | |||||
* */ | * */ | ||||
public static final String ANT_ATTRIBUTE_URI = "ant:attribute"; | public static final String ANT_ATTRIBUTE_URI = "ant:attribute"; | ||||
/** The URI for defined types/tasks - the format is antlib:<package> */ | |||||
/** The URI for defined types/tasks - the format is antlib:<package> */ | |||||
public static final String ANTLIB_URI = "antlib:"; | public static final String ANTLIB_URI = "antlib:"; | ||||
/** Polymorphic attribute */ | /** Polymorphic attribute */ | ||||
@@ -296,7 +296,7 @@ public class ProjectHelper { | |||||
} | } | ||||
/** | /** | ||||
* JDK1.1 compatible access to the context class loader. Cut & paste from JAXP. | |||||
* JDK1.1 compatible access to the context class loader. Cut & paste from JAXP. | |||||
* | * | ||||
* @deprecated since 1.6.x. | * @deprecated since 1.6.x. | ||||
* Use LoaderUtils.getContextClassLoader() | * Use LoaderUtils.getContextClassLoader() | ||||
@@ -1125,7 +1125,7 @@ public class PropertyHelper implements GetProperty { | |||||
/** | /** | ||||
* Get all Delegate interfaces (excluding Delegate itself) from the specified Delegate. | * Get all Delegate interfaces (excluding Delegate itself) from the specified Delegate. | ||||
* @param d the Delegate to inspect. | * @param d the Delegate to inspect. | ||||
* @return Set<Class> | |||||
* @return Set<Class> | |||||
* @since Ant 1.8.0 | * @since Ant 1.8.0 | ||||
*/ | */ | ||||
protected static Set<Class<? extends Delegate>> getDelegateInterfaces(Delegate d) { | protected static Set<Class<? extends Delegate>> getDelegateInterfaces(Delegate d) { | ||||
@@ -23,8 +23,8 @@ import org.apache.tools.ant.Task; | |||||
* Tasks extending this class may contain multiple actions. | * Tasks extending this class may contain multiple actions. | ||||
* The method that is invoked for execution depends upon the | * The method that is invoked for execution depends upon the | ||||
* value of the action attribute of the task. | * value of the action attribute of the task. | ||||
* <br/> | |||||
* Example:<br/> | |||||
* <br> | |||||
* Example:<br> | |||||
* <mytask action="list"/> will invoke the method | * <mytask action="list"/> will invoke the method | ||||
* with the signature public void list() in mytask's class. | * with the signature public void list() in mytask's class. | ||||
* If the action attribute is not defined in the task or is empty, | * If the action attribute is not defined in the task or is empty, | ||||
@@ -27,15 +27,16 @@ import org.apache.tools.ant.types.Parameter; | |||||
/** | /** | ||||
* Concats a file before and/or after the file. | * Concats a file before and/or after the file. | ||||
* | * | ||||
* <p>Example:<pre> | |||||
* <copy todir="build"> | |||||
* <fileset dir="src" includes="*.java"/> | |||||
* <filterchain> | |||||
* <concatfilter prepend="apache-license-java.txt"/> | |||||
* </filterchain> | |||||
* </copy> | |||||
* <p>Example:</p><pre> | |||||
* <copy todir="build"> | |||||
* <fileset dir="src" includes="*.java"/> | |||||
* <filterchain> | |||||
* <concatfilter prepend="apache-license-java.txt"/> | |||||
* </filterchain> | |||||
* </copy> | |||||
* </pre> | * </pre> | ||||
* Copies all java sources from <i>src</i> to <i>build</i> and adds the | |||||
* | |||||
* <p>Copies all java sources from <i>src</i> to <i>build</i> and adds the | |||||
* content of <i>apache-license-java.txt</i> add the beginning of each | * content of <i>apache-license-java.txt</i> add the beginning of each | ||||
* file.</p> | * file.</p> | ||||
* | * | ||||
@@ -365,7 +365,7 @@ public class TokenFilter extends BaseFilterReader | |||||
/** | /** | ||||
* Filter a string 'line' replacing from with to | * Filter a string 'line' replacing from with to | ||||
* (C&P from the Replace task) | |||||
* (Copy&Paste from the Replace task) | |||||
* @param line the string to be filtered | * @param line the string to be filtered | ||||
* @return the filtered line | * @return the filtered line | ||||
*/ | */ | ||||
@@ -684,7 +684,7 @@ public class TokenFilter extends BaseFilterReader | |||||
* xml does not do "c" like interpretation of strings. | * xml does not do "c" like interpretation of strings. | ||||
* i.e. \n\r\t etc. | * i.e. \n\r\t etc. | ||||
* this method processes \n, \r, \t, \f, \\ | * this method processes \n, \r, \t, \f, \\ | ||||
* also subs \s -> " \n\r\t\f" | |||||
* also subs \s with " \n\r\t\f" | |||||
* a trailing '\' will be ignored | * a trailing '\' will be ignored | ||||
* | * | ||||
* @param input raw string with possible embedded '\'s | * @param input raw string with possible embedded '\'s | ||||
@@ -696,12 +696,12 @@ public class TokenFilter extends BaseFilterReader | |||||
/** | /** | ||||
* convert regex option flag characters to regex options | * convert regex option flag characters to regex options | ||||
* <dl> | |||||
* <ul> | |||||
* <li>g - Regexp.REPLACE_ALL</li> | * <li>g - Regexp.REPLACE_ALL</li> | ||||
* <li>i - Regexp.MATCH_CASE_INSENSITIVE</li> | * <li>i - Regexp.MATCH_CASE_INSENSITIVE</li> | ||||
* <li>m - Regexp.MATCH_MULTILINE</li> | * <li>m - Regexp.MATCH_MULTILINE</li> | ||||
* <li>s - Regexp.MATCH_SINGLELINE</li> | * <li>s - Regexp.MATCH_SINGLELINE</li> | ||||
* </dl> | |||||
* </ul> | |||||
* @param flags the string containing the flags | * @param flags the string containing the flags | ||||
* @return the Regexp option bits | * @return the Regexp option bits | ||||
*/ | */ | ||||
@@ -29,72 +29,76 @@ import org.apache.tools.ant.Project; | |||||
* Uses ANSI Color Code Sequences to colorize messages | * Uses ANSI Color Code Sequences to colorize messages | ||||
* sent to the console. | * sent to the console. | ||||
* | * | ||||
* If used with the -logfile option, the output file | |||||
* <p>If used with the -logfile option, the output file | |||||
* will contain all the necessary escape codes to | * will contain all the necessary escape codes to | ||||
* display the text in colorized mode when displayed | * display the text in colorized mode when displayed | ||||
* in the console using applications like cat, more, | * in the console using applications like cat, more, | ||||
* etc. | |||||
* etc.</p> | |||||
* | * | ||||
* This is designed to work on terminals that support ANSI | |||||
* <p>This is designed to work on terminals that support ANSI | |||||
* color codes. It works on XTerm, ETerm, Mindterm, etc. | * color codes. It works on XTerm, ETerm, Mindterm, etc. | ||||
* It also works on Win9x (with ANSI.SYS loaded.) | |||||
* It also works on Win9x (with ANSI.SYS loaded.)</p> | |||||
* | * | ||||
* NOTE: | |||||
* <p>NOTE: | |||||
* It doesn't work on WinNT's COMMAND.COM even with | * It doesn't work on WinNT's COMMAND.COM even with | ||||
* ANSI.SYS loaded. | |||||
* ANSI.SYS loaded.</p> | |||||
* | * | ||||
* The default colors used for differentiating | |||||
* <p>The default colors used for differentiating | |||||
* the message levels can be changed by editing the | * the message levels can be changed by editing the | ||||
* /org/apache/tools/ant/listener/defaults.properties | * /org/apache/tools/ant/listener/defaults.properties | ||||
* file. | * file. | ||||
* This file contains 5 key/value pairs: | |||||
* This file contains 5 key/value pairs:</p> | |||||
* <pre> | |||||
* AnsiColorLogger.ERROR_COLOR=2;31 | * AnsiColorLogger.ERROR_COLOR=2;31 | ||||
* AnsiColorLogger.WARNING_COLOR=2;35 | * AnsiColorLogger.WARNING_COLOR=2;35 | ||||
* AnsiColorLogger.INFO_COLOR=2;36 | * AnsiColorLogger.INFO_COLOR=2;36 | ||||
* AnsiColorLogger.VERBOSE_COLOR=2;32 | * AnsiColorLogger.VERBOSE_COLOR=2;32 | ||||
* AnsiColorLogger.DEBUG_COLOR=2;34 | * AnsiColorLogger.DEBUG_COLOR=2;34 | ||||
* </pre> | |||||
* | * | ||||
* Another option is to pass a system variable named | |||||
* <p>Another option is to pass a system variable named | |||||
* ant.logger.defaults, with value set to the path of | * ant.logger.defaults, with value set to the path of | ||||
* the file that contains user defined Ansi Color | * the file that contains user defined Ansi Color | ||||
* Codes, to the <B>java</B> command using -D option. | |||||
* Codes, to the <B>java</B> command using -D option.</p> | |||||
* | * | ||||
* To change these colors use the following chart: | * To change these colors use the following chart: | ||||
* | * | ||||
* <B>ANSI COLOR LOGGER CONFIGURATION</B> | |||||
* <h2>ANSI COLOR LOGGER CONFIGURATION</h2> | |||||
* | * | ||||
* Format for AnsiColorLogger.*= | * Format for AnsiColorLogger.*= | ||||
* Attribute;Foreground;Background | * Attribute;Foreground;Background | ||||
* | * | ||||
* Attribute is one of the following: | |||||
* 0 -> Reset All Attributes (return to normal mode) | |||||
* 1 -> Bright (Usually turns on BOLD) | |||||
* 2 -> Dim | |||||
* 3 -> Underline | |||||
* 5 -> link | |||||
* 7 -> Reverse | |||||
* 8 -> Hidden | |||||
* | |||||
* Foreground is one of the following: | |||||
* 30 -> Black | |||||
* 31 -> Red | |||||
* 32 -> Green | |||||
* 33 -> Yellow | |||||
* 34 -> Blue | |||||
* 35 -> Magenta | |||||
* 36 -> Cyan | |||||
* 37 -> White | |||||
* | |||||
* Background is one of the following: | |||||
* 40 -> Black | |||||
* 41 -> Red | |||||
* 42 -> Green | |||||
* 43 -> Yellow | |||||
* 44 -> Blue | |||||
* 45 -> Magenta | |||||
* 46 -> Cyan | |||||
* 47 -> White | |||||
* Attribute is one of the following: <pre> | |||||
* 0 -> Reset All Attributes (return to normal mode) | |||||
* 1 -> Bright (Usually turns on BOLD) | |||||
* 2 -> Dim | |||||
* 3 -> Underline | |||||
* 5 -> link | |||||
* 7 -> Reverse | |||||
* 8 -> Hidden | |||||
* </pre> | |||||
* | |||||
* Foreground is one of the following:<pre> | |||||
* 30 -> Black | |||||
* 31 -> Red | |||||
* 32 -> Green | |||||
* 33 -> Yellow | |||||
* 34 -> Blue | |||||
* 35 -> Magenta | |||||
* 36 -> Cyan | |||||
* 37 -> White | |||||
* </pre> | |||||
* | * | ||||
* Background is one of the following:<pre> | |||||
* 40 -> Black | |||||
* 41 -> Red | |||||
* 42 -> Green | |||||
* 43 -> Yellow | |||||
* 44 -> Blue | |||||
* 45 -> Magenta | |||||
* 46 -> Cyan | |||||
* 47 -> White | |||||
* </pre> | |||||
*/ | */ | ||||
public class AnsiColorLogger extends DefaultLogger { | public class AnsiColorLogger extends DefaultLogger { | ||||
// private static final int ATTR_NORMAL = 0; | // private static final int ATTR_NORMAL = 0; | ||||
@@ -24,21 +24,22 @@ import java.io.IOException; | |||||
import java.io.PrintStream; | import java.io.PrintStream; | ||||
import java.lang.reflect.Method; | import java.lang.reflect.Method; | ||||
import java.util.Enumeration; | import java.util.Enumeration; | ||||
import java.util.HashSet; | |||||
import java.util.Hashtable; | import java.util.Hashtable; | ||||
import java.util.Iterator; | import java.util.Iterator; | ||||
import java.util.Vector; | |||||
import java.util.Set; | import java.util.Set; | ||||
import java.util.HashSet; | |||||
import java.util.Vector; | |||||
import org.apache.tools.ant.BuildException; | import org.apache.tools.ant.BuildException; | ||||
import org.apache.tools.ant.BuildListener; | import org.apache.tools.ant.BuildListener; | ||||
import org.apache.tools.ant.DefaultLogger; | import org.apache.tools.ant.DefaultLogger; | ||||
import org.apache.tools.ant.MagicNames; | |||||
import org.apache.tools.ant.Main; | |||||
import org.apache.tools.ant.Project; | import org.apache.tools.ant.Project; | ||||
import org.apache.tools.ant.ProjectComponent; | import org.apache.tools.ant.ProjectComponent; | ||||
import org.apache.tools.ant.ProjectHelper; | import org.apache.tools.ant.ProjectHelper; | ||||
import org.apache.tools.ant.Target; | import org.apache.tools.ant.Target; | ||||
import org.apache.tools.ant.Task; | import org.apache.tools.ant.Task; | ||||
import org.apache.tools.ant.MagicNames; | |||||
import org.apache.tools.ant.Main; | |||||
import org.apache.tools.ant.types.PropertySet; | import org.apache.tools.ant.types.PropertySet; | ||||
import org.apache.tools.ant.util.FileUtils; | import org.apache.tools.ant.util.FileUtils; | ||||
import org.apache.tools.ant.util.VectorSet; | import org.apache.tools.ant.util.VectorSet; | ||||
@@ -51,8 +52,8 @@ import org.apache.tools.ant.util.VectorSet; | |||||
* <ant antfile="build.xml" target="bar" > | * <ant antfile="build.xml" target="bar" > | ||||
* <property name="property1" value="aaaaa" /> | * <property name="property1" value="aaaaa" /> | ||||
* <property name="foo" value="baz" /> | * <property name="foo" value="baz" /> | ||||
* </ant></span> | |||||
* </target></span> | |||||
* </ant> | |||||
* </target> | |||||
* | * | ||||
* <target name="bar" depends="init"> | * <target name="bar" depends="init"> | ||||
* <echo message="prop is ${property1} ${foo}" /> | * <echo message="prop is ${property1} ${foo}" /> | ||||
@@ -48,7 +48,7 @@ public class Apt | |||||
/** An warning message when ignoring compiler attribute. */ | /** An warning message when ignoring compiler attribute. */ | ||||
public static final String ERROR_IGNORING_COMPILER_OPTION | public static final String ERROR_IGNORING_COMPILER_OPTION | ||||
= "Ignoring compiler attribute for the APT task, as it is fixed"; | = "Ignoring compiler attribute for the APT task, as it is fixed"; | ||||
/** A warning message if used with java < 1.5. */ | |||||
/** A warning message if used with java < 1.5. */ | |||||
public static final String ERROR_WRONG_JAVA_VERSION | public static final String ERROR_WRONG_JAVA_VERSION | ||||
= "Apt task requires Java 1.5+"; | = "Apt task requires Java 1.5+"; | ||||
@@ -20,10 +20,10 @@ package org.apache.tools.ant.taskdefs; | |||||
/** | /** | ||||
* Adds a component definition to the current project. | * Adds a component definition to the current project. | ||||
* used in the current project. Two attributes are needed, the name that identifies | |||||
* this component uniquely, and the full name of the class ( | |||||
* including the packages) that | |||||
* <p>Used in the current project two attributes are needed, the name that identifies | |||||
* this component uniquely, and the full name of the class (including the packages) that | |||||
* implements this component.</p> | * implements this component.</p> | ||||
* | |||||
* @since Ant 1.8 | * @since Ant 1.8 | ||||
* @ant.task category="internal" | * @ant.task category="internal" | ||||
*/ | */ | ||||
@@ -31,10 +31,9 @@ public class Componentdef extends Definer { | |||||
/** | /** | ||||
* Default constructor. | * Default constructor. | ||||
* Creates a new ComponentDef instance. | |||||
* Creates a new Componentdef instance. | |||||
* Sets the restrict attribute to true. | * Sets the restrict attribute to true. | ||||
*/ | */ | ||||
public Componentdef() { | public Componentdef() { | ||||
setRestrict(true); | setRestrict(true); | ||||
} | } | ||||
@@ -813,7 +813,7 @@ public class Concat extends Task implements ResourceCollection { | |||||
/** | /** | ||||
* Implement ResourceCollection. | * Implement ResourceCollection. | ||||
* @return Iterator<Resource>. | |||||
* @return Iterator<Resource>. | |||||
*/ | */ | ||||
public Iterator<Resource> iterator() { | public Iterator<Resource> iterator() { | ||||
validate(); | validate(); | ||||
@@ -50,7 +50,7 @@ import org.apache.tools.ant.util.SourceFileScanner; | |||||
import org.apache.tools.ant.util.FlatFileNameMapper; | import org.apache.tools.ant.util.FlatFileNameMapper; | ||||
/** | /** | ||||
* Copies a file or directory to a new file | |||||
* <p>Copies a file or directory to a new file | |||||
* or directory. Files are only copied if the source file is newer | * or directory. Files are only copied if the source file is newer | ||||
* than the destination file, or when the destination file does not | * than the destination file, or when the destination file does not | ||||
* exist. It is possible to explicitly overwrite existing files.</p> | * exist. It is possible to explicitly overwrite existing files.</p> | ||||
@@ -155,11 +155,11 @@ public abstract class Definer extends DefBase { | |||||
/** | /** | ||||
* What to do if there is an error in loading the class. | * What to do if there is an error in loading the class. | ||||
* <dl> | |||||
* <ul> | |||||
* <li>error - throw build exception</li> | * <li>error - throw build exception</li> | ||||
* <li>report - output at warning level</li> | * <li>report - output at warning level</li> | ||||
* <li>ignore - output at debug level</li> | * <li>ignore - output at debug level</li> | ||||
* </dl> | |||||
* </ul> | |||||
* | * | ||||
* @param onError an <code>OnError</code> value | * @param onError an <code>OnError</code> value | ||||
*/ | */ | ||||
@@ -37,7 +37,7 @@ import org.apache.tools.ant.taskdefs.condition.ConditionBase; | |||||
* | * | ||||
* If both attributes are set, then the test fails only if both tests | * If both attributes are set, then the test fails only if both tests | ||||
* are true. i.e. | * are true. i.e. | ||||
* <pre>fail := defined(ifProperty) && !defined(unlessProperty)</pre> | |||||
* <pre>fail := defined(ifProperty) && !defined(unlessProperty)</pre> | |||||
* | * | ||||
* A single nested<code><condition></code> element can be specified | * A single nested<code><condition></code> element can be specified | ||||
* instead of using <code>if</code>/<code>unless</code> (a combined | * instead of using <code>if</code>/<code>unless</code> (a combined | ||||
@@ -41,8 +41,9 @@ import org.apache.tools.ant.types.Reference; | |||||
* <p> | * <p> | ||||
* The following example class prints the contents of the first column of each row in TableName. | * The following example class prints the contents of the first column of each row in TableName. | ||||
*</p> | *</p> | ||||
*<code><pre> | |||||
*<pre> | |||||
package examples; | package examples; | ||||
import java.sql.Connection; | import java.sql.Connection; | ||||
import java.sql.ResultSet; | import java.sql.ResultSet; | ||||
import java.sql.SQLException; | import java.sql.SQLException; | ||||
@@ -84,16 +85,11 @@ public class SQLExampleTask extends JDBCTask { | |||||
} | } | ||||
} | } | ||||
</pre></code> | |||||
</pre> | |||||
* | |||||
* @since Ant 1.5 | * @since Ant 1.5 | ||||
* | * | ||||
*/ | */ | ||||
public abstract class JDBCTask extends Task { | public abstract class JDBCTask extends Task { | ||||
private static final int HASH_TABLE_SIZE = 3; | private static final int HASH_TABLE_SIZE = 3; | ||||
@@ -172,7 +172,7 @@ public class Javac extends MatchingTask { | |||||
* Keyword list to be appended to the -g command-line switch. | * Keyword list to be appended to the -g command-line switch. | ||||
* | * | ||||
* This will be ignored by all implementations except modern | * This will be ignored by all implementations except modern | ||||
* and classic(ver >= 1.2). Legal values are none or a | |||||
* and classic(ver >= 1.2). Legal values are none or a | |||||
* comma-separated list of the following keywords: lines, vars, | * comma-separated list of the following keywords: lines, vars, | ||||
* and source. If debuglevel is not specified, by default, :none | * and source. If debuglevel is not specified, by default, :none | ||||
* will be appended to -g. If debug is not turned on, this attribute | * will be appended to -g. If debug is not turned on, this attribute | ||||
@@ -29,7 +29,6 @@ import java.io.FilenameFilter; | |||||
import java.io.IOException; | import java.io.IOException; | ||||
import java.io.InputStream; | import java.io.InputStream; | ||||
import java.io.InputStreamReader; | import java.io.InputStreamReader; | ||||
import java.io.OutputStream; | |||||
import java.io.OutputStreamWriter; | import java.io.OutputStreamWriter; | ||||
import java.net.MalformedURLException; | import java.net.MalformedURLException; | ||||
import java.net.URL; | import java.net.URL; | ||||
@@ -40,6 +39,7 @@ import java.util.Iterator; | |||||
import java.util.Locale; | import java.util.Locale; | ||||
import java.util.StringTokenizer; | import java.util.StringTokenizer; | ||||
import java.util.Vector; | import java.util.Vector; | ||||
import org.apache.tools.ant.BuildException; | import org.apache.tools.ant.BuildException; | ||||
import org.apache.tools.ant.DirectoryScanner; | import org.apache.tools.ant.DirectoryScanner; | ||||
import org.apache.tools.ant.MagicNames; | import org.apache.tools.ant.MagicNames; | ||||
@@ -57,8 +57,8 @@ import org.apache.tools.ant.types.Resource; | |||||
import org.apache.tools.ant.types.ResourceCollection; | import org.apache.tools.ant.types.ResourceCollection; | ||||
import org.apache.tools.ant.types.resources.FileProvider; | import org.apache.tools.ant.types.resources.FileProvider; | ||||
import org.apache.tools.ant.util.FileUtils; | import org.apache.tools.ant.util.FileUtils; | ||||
import org.apache.tools.ant.util.StringUtils; | |||||
import org.apache.tools.ant.util.JavaEnvUtils; | import org.apache.tools.ant.util.JavaEnvUtils; | ||||
import org.apache.tools.ant.util.StringUtils; | |||||
/** | /** | ||||
* Generates Javadoc documentation for a collection | * Generates Javadoc documentation for a collection | ||||
@@ -918,7 +918,7 @@ public class Javadoc extends Task { | |||||
} | } | ||||
/** | /** | ||||
* Generate the "use" page for each package. | |||||
* Generate the "use" page for each package. | |||||
* | * | ||||
* @param b true if the use page should be generated. | * @param b true if the use page should be generated. | ||||
*/ | */ | ||||
@@ -32,11 +32,11 @@ import java.util.LinkedList; | |||||
import java.util.ListIterator; | import java.util.ListIterator; | ||||
/** | /** | ||||
* This task takes file and turns them into a URL, which it then assigns | |||||
* to a property. Use when for setting up RMI codebases. | |||||
* <p/> | |||||
* nested filesets are supported; if present, these are turned into the | |||||
* url with the given separator between them (default = " "). | |||||
* <p>This task takes file and turns them into a URL, which it then assigns | |||||
* to a property. Use when for setting up RMI codebases.</p> | |||||
* | |||||
* <p>nested filesets are supported; if present, these are turned into the | |||||
* url with the given separator between them (default = " ").</p> | |||||
* | * | ||||
* @ant.task category="core" name="makeurl" | * @ant.task category="core" name="makeurl" | ||||
*/ | */ | ||||
@@ -107,7 +107,7 @@ public class Patch extends Task { | |||||
* | * | ||||
* <p>patch's <i>-p</i> option. | * <p>patch's <i>-p</i> option. | ||||
* @param num number of lines to strip | * @param num number of lines to strip | ||||
* @exception BuildException if num is < 0, or other errors | |||||
* @exception BuildException if num is < 0, or other errors | |||||
*/ | */ | ||||
public void setStrip(int num) throws BuildException { | public void setStrip(int num) throws BuildException { | ||||
if (num < 0) { | if (num < 0) { | ||||
@@ -22,27 +22,25 @@ import java.io.FileInputStream; | |||||
import java.io.IOException; | import java.io.IOException; | ||||
import java.io.InputStream; | import java.io.InputStream; | ||||
import java.net.URL; | import java.net.URL; | ||||
import java.util.Enumeration; | |||||
import java.util.HashMap; | import java.util.HashMap; | ||||
import java.util.Iterator; | import java.util.Iterator; | ||||
import java.util.Map; | import java.util.Map; | ||||
import java.util.Properties; | import java.util.Properties; | ||||
import java.util.Vector; | |||||
import org.apache.tools.ant.AntClassLoader; | import org.apache.tools.ant.AntClassLoader; | ||||
import org.apache.tools.ant.BuildException; | import org.apache.tools.ant.BuildException; | ||||
import org.apache.tools.ant.Project; | import org.apache.tools.ant.Project; | ||||
import org.apache.tools.ant.PropertyHelper; | import org.apache.tools.ant.PropertyHelper; | ||||
import org.apache.tools.ant.Task; | import org.apache.tools.ant.Task; | ||||
import org.apache.tools.ant.property.ResolvePropertyMap; | |||||
import org.apache.tools.ant.types.Path; | import org.apache.tools.ant.types.Path; | ||||
import org.apache.tools.ant.types.Reference; | import org.apache.tools.ant.types.Reference; | ||||
import org.apache.tools.ant.util.FileUtils; | import org.apache.tools.ant.util.FileUtils; | ||||
import org.apache.tools.ant.property.ResolvePropertyMap; | |||||
/** | /** | ||||
* Sets a property by name, or set of properties (from file or | |||||
* <p>Sets a property by name, or set of properties (from file or | |||||
* resource) in the project. </p> | * resource) in the project. </p> | ||||
* Properties are immutable: whoever sets a property first freezes it for the | |||||
* <p>Properties are immutable: whoever sets a property first freezes it for the | |||||
* rest of the build; they are most definitely not variable. | * rest of the build; they are most definitely not variable. | ||||
* <p>There are seven ways to set properties:</p> | * <p>There are seven ways to set properties:</p> | ||||
* <ul> | * <ul> | ||||
@@ -370,7 +370,7 @@ public class Redirector { | |||||
/** | /** | ||||
* This <code>Redirector</code>'s subordinate | * This <code>Redirector</code>'s subordinate | ||||
* <code>PropertyOutputStream</code>s will not set their respective | * <code>PropertyOutputStream</code>s will not set their respective | ||||
* properties <code>while (appendProperties && append)</code>. | |||||
* properties <code>while (appendProperties && append)</code>. | |||||
* | * | ||||
* @param appendProperties | * @param appendProperties | ||||
* whether to append properties. | * whether to append properties. | ||||
@@ -214,7 +214,7 @@ public class Replace extends MatchingTask { | |||||
} | } | ||||
/** | /** | ||||
* The replacement string; required if <code>property<code> | |||||
* The replacement string; required if <code>property</code> | |||||
* is not set. | * is not set. | ||||
* @param value <code>String</code> value to replace. | * @param value <code>String</code> value to replace. | ||||
*/ | */ | ||||
@@ -67,12 +67,12 @@ public class Retry extends Task implements TaskContainer { | |||||
/** | /** | ||||
* set the delay between retries (in milliseconds) | * set the delay between retries (in milliseconds) | ||||
* @param n the time between retries. | |||||
* @param retryDelay the time between retries. | |||||
* @since Ant 1.8.3 | * @since Ant 1.8.3 | ||||
*/ | */ | ||||
public void setRetryDelay(int retryDelay) { | public void setRetryDelay(int retryDelay) { | ||||
if (retryDelay < 0) { | if (retryDelay < 0) { | ||||
throw new BuildException("delay must be a non-negative number"); | |||||
throw new BuildException("retryDelay must be a non-negative number"); | |||||
} | } | ||||
this.retryDelay = retryDelay; | this.retryDelay = retryDelay; | ||||
} | } | ||||
@@ -37,13 +37,15 @@ import org.apache.tools.ant.util.StringUtils; | |||||
import org.apache.tools.ant.util.facade.FacadeTaskHelper; | import org.apache.tools.ant.util.facade.FacadeTaskHelper; | ||||
/** | /** | ||||
* Runs the rmic compiler against classes.</p> | |||||
* <p>Runs the rmic compiler against classes.</p> | |||||
* | |||||
* <p>Rmic can be run on a single class (as specified with the classname | * <p>Rmic can be run on a single class (as specified with the classname | ||||
* attribute) or a number of classes at once (all classes below base that | * attribute) or a number of classes at once (all classes below base that | ||||
* are neither _Stub nor _Skel classes). If you want to rmic a single | * are neither _Stub nor _Skel classes). If you want to rmic a single | ||||
* class and this class is a class nested into another class, you have to | * class and this class is a class nested into another class, you have to | ||||
* specify the classname in the form <code>Outer$$Inner</code> instead of | * specify the classname in the form <code>Outer$$Inner</code> instead of | ||||
* <code>Outer.Inner</code>.</p> | * <code>Outer.Inner</code>.</p> | ||||
* | |||||
* <p>It is possible to refine the set of files that are being rmiced. This can | * <p>It is possible to refine the set of files that are being rmiced. This can | ||||
* be done with the <i>includes</i>, <i>includesfile</i>, <i>excludes</i>, | * be done with the <i>includes</i>, <i>includesfile</i>, <i>excludes</i>, | ||||
* <i>excludesfile</i> and <i>defaultexcludes</i> | * <i>excludesfile</i> and <i>defaultexcludes</i> | ||||
@@ -53,16 +55,19 @@ import org.apache.tools.ant.util.facade.FacadeTaskHelper; | |||||
* the files you want to have excluded. This is also done with patterns. And | * the files you want to have excluded. This is also done with patterns. And | ||||
* finally with the <i>defaultexcludes</i> attribute, you can specify whether | * finally with the <i>defaultexcludes</i> attribute, you can specify whether | ||||
* you want to use default exclusions or not. See the section on | * you want to use default exclusions or not. See the section on | ||||
* directory based tasks</a>, on how the | |||||
* directory based tasks, on how the | |||||
* inclusion/exclusion of files works, and how to write patterns.</p> | * inclusion/exclusion of files works, and how to write patterns.</p> | ||||
* | |||||
* <p>This task forms an implicit FileSet and | * <p>This task forms an implicit FileSet and | ||||
* supports all attributes of <code><fileset></code> | * supports all attributes of <code><fileset></code> | ||||
* (<code>dir</code> becomes <code>base</code>) as well as the nested | * (<code>dir</code> becomes <code>base</code>) as well as the nested | ||||
* <code><include></code>, <code><exclude></code> and | * <code><include></code>, <code><exclude></code> and | ||||
* <code><patternset></code> elements.</p> | * <code><patternset></code> elements.</p> | ||||
* | |||||
* <p>It is possible to use different compilers. This can be selected | * <p>It is possible to use different compilers. This can be selected | ||||
* with the "build.rmic" property or the <code>compiler</code> | * with the "build.rmic" property or the <code>compiler</code> | ||||
* attribute. <a name="compilervalues">There are three choices</a>:</p> | * attribute. <a name="compilervalues">There are three choices</a>:</p> | ||||
* | |||||
* <ul> | * <ul> | ||||
* <li>sun (the standard compiler of the JDK)</li> | * <li>sun (the standard compiler of the JDK)</li> | ||||
* <li>kaffe (the standard compiler of | * <li>kaffe (the standard compiler of | ||||
@@ -542,7 +542,7 @@ public class SQLExec extends JDBCTask { | |||||
* will be quoted, not even if they contain the column | * will be quoted, not even if they contain the column | ||||
* separator.</p> | * separator.</p> | ||||
* | * | ||||
* <p><b>Note:<b> BLOB values will never be quoted.</p> | |||||
* <p><b>Note:</b> BLOB values will never be quoted.</p> | |||||
* | * | ||||
* <p>Defaults to "not set"</p> | * <p>Defaults to "not set"</p> | ||||
* | * | ||||
@@ -511,13 +511,13 @@ public class SignJar extends AbstractJarSignerTask { | |||||
} | } | ||||
/** | /** | ||||
* Compare a jar file with its corresponding signed jar. The logic for this | |||||
* <p>Compare a jar file with its corresponding signed jar. The logic for this | |||||
* is complex, and best explained in the source itself. Essentially if | * is complex, and best explained in the source itself. Essentially if | ||||
* either file doesnt exist, or the destfile has an out of date timestamp, | * either file doesnt exist, or the destfile has an out of date timestamp, | ||||
* then the return value is false. | |||||
* <p/> | |||||
* If we are signing ourself, the check {@link #isSigned(File)} is used to | |||||
* trigger the process. | |||||
* then the return value is false.</p> | |||||
* | |||||
* <p>If we are signing ourself, the check {@link #isSigned(File)} is used to | |||||
* trigger the process.</p> | |||||
* | * | ||||
* @param jarFile the unsigned jar file | * @param jarFile the unsigned jar file | ||||
* @param signedjarFile the result signed jar file | * @param signedjarFile the result signed jar file | ||||
@@ -24,13 +24,14 @@ import org.apache.tools.ant.Task; | |||||
/** | /** | ||||
* Sleep, or pause, for a period of time. | * Sleep, or pause, for a period of time. | ||||
* | * | ||||
* A task for sleeping a short period of time, useful when a | |||||
* build or deployment process requires an interval between tasks. | |||||
*<p> | |||||
* A negative value can be supplied to any of attributes provided the total sleep time | |||||
* <p>A task for sleeping a short period of time, useful when a | |||||
* build or deployment process requires an interval between tasks.</p> | |||||
* | |||||
* <p>A negative value can be supplied to any of attributes provided the total sleep time | |||||
* is positive, pending fundamental changes in physics and JVM | * is positive, pending fundamental changes in physics and JVM | ||||
* execution times</p> | * execution times</p> | ||||
* Note that sleep times are always hints to be interpreted by the OS how it feels | |||||
* | |||||
* <p>Note that sleep times are always hints to be interpreted by the OS how it feels | |||||
* small times may either be ignored or rounded up to a minimum timeslice. Note | * small times may either be ignored or rounded up to a minimum timeslice. Note | ||||
* also that the system clocks often have a fairly low granularity too, which complicates | * also that the system clocks often have a fairly low granularity too, which complicates | ||||
* measuring how long a sleep actually took.</p> | * measuring how long a sleep actually took.</p> | ||||
@@ -38,7 +39,6 @@ import org.apache.tools.ant.Task; | |||||
* @since Ant 1.4 | * @since Ant 1.4 | ||||
* @ant.task category="utility" | * @ant.task category="utility" | ||||
*/ | */ | ||||
public class Sleep extends Task { | public class Sleep extends Task { | ||||
/** | /** | ||||
* failure flag | * failure flag | ||||
@@ -611,7 +611,7 @@ public class Tar extends MatchingTask { | |||||
} | } | ||||
/** | /** | ||||
* Checks whether the archive is out-of-date with respect to the | |||||
* <p>Checks whether the archive is out-of-date with respect to the | |||||
* given files, ensures that the archive won't contain itself.</p> | * given files, ensures that the archive won't contain itself.</p> | ||||
* | * | ||||
* @param basedir base directory for file names | * @param basedir base directory for file names | ||||
@@ -22,14 +22,13 @@ import org.apache.tools.ant.Task; | |||||
import org.apache.tools.ant.TaskAdapter; | import org.apache.tools.ant.TaskAdapter; | ||||
/** | /** | ||||
* Adds a task definition to the current project, such that this new task can be | |||||
* <p>Adds a task definition to the current project, such that this new task can be | |||||
* used in the current project. Two attributes are needed, the name that identifies | * used in the current project. Two attributes are needed, the name that identifies | ||||
* this task uniquely, and the full name of the class (including the packages) that | * this task uniquely, and the full name of the class (including the packages) that | ||||
* implements this task.</p> | * implements this task.</p> | ||||
* <p>You can also define a group of tasks at once using the file or | * <p>You can also define a group of tasks at once using the file or | ||||
* resource attributes. These attributes point to files in the format of | |||||
* Java property files. Each line defines a single task in the | |||||
* format:</p> | |||||
* resource attributes. These attributes point to files in the format of | |||||
* Java property files. Each line defines a single task in the format:</p> | |||||
* <pre> | * <pre> | ||||
* taskname=fully.qualified.java.classname | * taskname=fully.qualified.java.classname | ||||
* </pre> | * </pre> | ||||
@@ -28,13 +28,15 @@ import org.apache.tools.zip.ZipOutputStream; | |||||
/** | /** | ||||
* An extension of <jar> to create a WAR archive. | |||||
* <p>An extension of <jar> to create a WAR archive. | |||||
* Contains special treatment for files that should end up in the | * Contains special treatment for files that should end up in the | ||||
* <code>WEB-INF/lib</code>, <code>WEB-INF/classes</code> or | * <code>WEB-INF/lib</code>, <code>WEB-INF/classes</code> or | ||||
* <code>WEB-INF</code> directories of the Web Application Archive.</p> | * <code>WEB-INF</code> directories of the Web Application Archive.</p> | ||||
* | |||||
* <p>(The War task is a shortcut for specifying the particular layout of a WAR file. | * <p>(The War task is a shortcut for specifying the particular layout of a WAR file. | ||||
* The same thing can be accomplished by using the <i>prefix</i> and <i>fullpath</i> | * The same thing can be accomplished by using the <i>prefix</i> and <i>fullpath</i> | ||||
* attributes of zipfilesets in a Zip or Jar task.)</p> | * attributes of zipfilesets in a Zip or Jar task.)</p> | ||||
* | |||||
* <p>The extended zipfileset element from the zip task | * <p>The extended zipfileset element from the zip task | ||||
* (with attributes <i>prefix</i>, <i>fullpath</i>, and <i>src</i>) | * (with attributes <i>prefix</i>, <i>fullpath</i>, and <i>src</i>) | ||||
* is available in the War task.</p> | * is available in the War task.</p> | ||||
@@ -69,13 +71,14 @@ public class War extends Jar { | |||||
} | } | ||||
/** | /** | ||||
* <i>Deprecated<i> name of the file to create | |||||
* <i>Deprecated</i> name of the file to create | |||||
* -use <tt>destfile</tt> instead. | * -use <tt>destfile</tt> instead. | ||||
* @param warFile the destination file | * @param warFile the destination file | ||||
* @deprecated since 1.5.x. | * @deprecated since 1.5.x. | ||||
* Use setDestFile(File) instead | * Use setDestFile(File) instead | ||||
* @ant.attribute ignore="true" | * @ant.attribute ignore="true" | ||||
*/ | */ | ||||
@Deprecated | |||||
public void setWarfile(File warFile) { | public void setWarfile(File warFile) { | ||||
setDestFile(warFile); | setDestFile(warFile); | ||||
} | } | ||||
@@ -31,25 +31,25 @@ import java.util.Vector; | |||||
/** | /** | ||||
* The implementation of the apt compiler for JDK 1.5 | |||||
* <p/> | |||||
* As usual, the low level entry points for Java tools are neither documented or | |||||
* <p>The implementation of the apt compiler for JDK 1.5.</p> | |||||
* | |||||
* <p>As usual, the low level entry points for Java tools are neither documented or | |||||
* stable; this entry point may change from that of 1.5.0_01-b08 without any | * stable; this entry point may change from that of 1.5.0_01-b08 without any | ||||
* warning at all. The IDE decompile of the tool entry points is as follows: | |||||
* warning at all. The IDE decompile of the tool entry points is as follows:</p> | |||||
* <pre> | * <pre> | ||||
* public class Main { | * public class Main { | ||||
* public Main() ; | * public Main() ; | ||||
* <p/> | |||||
* public static transient void main(String... strings) ; | |||||
* <p/> | |||||
* | |||||
* public static transient void main(String... strings); | |||||
* | |||||
* public static transient int process(String... strings); | * public static transient int process(String... strings); | ||||
* <p/> | |||||
* | |||||
* public static transient int process(PrintWriter printWriter, | * public static transient int process(PrintWriter printWriter, | ||||
* String... strings) ; | |||||
* String... strings); | |||||
* public static transient int process( | * public static transient int process( | ||||
* AnnotationProcessorFactory annotationProcessorFactory, | * AnnotationProcessorFactory annotationProcessorFactory, | ||||
* String... strings) ; | |||||
* <p/> | |||||
* String... strings); | |||||
* | |||||
* public static transient int process( | * public static transient int process( | ||||
* AnnotationProcessorFactory annotationProcessorFactory, | * AnnotationProcessorFactory annotationProcessorFactory, | ||||
* PrintWriter printWriter, | * PrintWriter printWriter, | ||||
@@ -65,8 +65,6 @@ import java.util.Vector; | |||||
* exposed to end-users, because it was too brittle during beta testing; classpath | * exposed to end-users, because it was too brittle during beta testing; classpath | ||||
* problems being the core issue. | * problems being the core issue. | ||||
* | * | ||||
* | |||||
* | |||||
* @since Ant 1.7 | * @since Ant 1.7 | ||||
*/ | */ | ||||
public class AptCompilerAdapter extends DefaultCompilerAdapter { | public class AptCompilerAdapter extends DefaultCompilerAdapter { | ||||
@@ -30,24 +30,24 @@ import java.net.URL; | |||||
import java.net.UnknownHostException; | import java.net.UnknownHostException; | ||||
/** | /** | ||||
* Test for a host being reachable using ICMP "ping" packets & echo operations. | |||||
* <p>Test for a host being reachable using ICMP "ping" packets & echo operations. | |||||
* Ping packets are very reliable for assessing reachability in a LAN or WAN, | * Ping packets are very reliable for assessing reachability in a LAN or WAN, | ||||
* but they do not get through any well-configured firewall. Echo (port 7) may. | |||||
* <p/> | |||||
* This condition turns unknown host exceptions into false conditions. This is | |||||
* but they do not get through any well-configured firewall. Echo (port 7) may.</p> | |||||
* | |||||
* <p>This condition turns unknown host exceptions into false conditions. This is | |||||
* because on a laptop, DNS is one of the first services lost when the network | * because on a laptop, DNS is one of the first services lost when the network | ||||
* goes; you are implicitly offline. | |||||
* <p/> | |||||
* If a URL is supplied instead of a host, the hostname is extracted and used in | |||||
* the test--all other parts of the URL are discarded. | |||||
* <p/> | |||||
* The test may not work through firewalls; that is, something may be reachable | |||||
* goes; you are implicitly offline.</p> | |||||
* | |||||
* <p>If a URL is supplied instead of a host, the hostname is extracted and used in | |||||
* the test--all other parts of the URL are discarded.</p> | |||||
* | |||||
* <p>The test may not work through firewalls; that is, something may be reachable | |||||
* using a protocol such as HTTP, while the lower level ICMP packets get dropped | * using a protocol such as HTTP, while the lower level ICMP packets get dropped | ||||
* on the floor. Similarly, a host may be detected as reachable with ICMP, but not | * on the floor. Similarly, a host may be detected as reachable with ICMP, but not | ||||
* reachable on other ports (i.e. port 80), because of firewalls. | |||||
* <p/> | |||||
* Requires Java 5+ to work properly. On Java 1.4, if a hostname | |||||
* can be resolved, the destination is assumed to be reachable. | |||||
* reachable on other ports (i.e. port 80), because of firewalls.</p> | |||||
* | |||||
* <p>Requires Java 5+ to work properly. On Java 1.4, if a hostname | |||||
* can be resolved, the destination is assumed to be reachable.</p> | |||||
* | * | ||||
* @since Ant 1.7 | * @since Ant 1.7 | ||||
*/ | */ | ||||
@@ -126,8 +126,8 @@ public class Os implements Condition { | |||||
/** | /** | ||||
* Sets the desired OS family type | * Sets the desired OS family type | ||||
* | * | ||||
* @param f The OS family type desired<br /> | |||||
* Possible values:<br /> | |||||
* @param f The OS family type desired<br> | |||||
* Possible values:<br> | |||||
* <ul> | * <ul> | ||||
* <li>dos</li> | * <li>dos</li> | ||||
* <li>mac</li> | * <li>mac</li> | ||||
@@ -133,7 +133,7 @@ public class ChangeLogTask extends AbstractCvsTask { | |||||
/** | /** | ||||
* Set a lookup list of user names & addresses | |||||
* Set a lookup list of user names & addresses | |||||
* | * | ||||
* @param usersFile The file containing the users info. | * @param usersFile The file containing the users info. | ||||
*/ | */ | ||||
@@ -35,12 +35,12 @@ public class EmailAddress { | |||||
/** | /** | ||||
* Creates a new email address based on the given string | * Creates a new email address based on the given string | ||||
* | * | ||||
* @param email the email address (with or without <>) | |||||
* @param email the email address (with or without <>) | |||||
* Acceptable forms include: | * Acceptable forms include: | ||||
* address | * address | ||||
* <address> | |||||
* name <address> | |||||
* <address> name | |||||
* <address> | |||||
* name <address> | |||||
* <address> name | |||||
* (name) address | * (name) address | ||||
* address (name) | * address (name) | ||||
*/ | */ | ||||
@@ -142,7 +142,7 @@ public class EmailAddress { | |||||
/** | /** | ||||
* Sets the personal / display name of the address | |||||
* Sets the personal / display name of the address. | |||||
* | * | ||||
* @param name the display name | * @param name the display name | ||||
*/ | */ | ||||
@@ -152,9 +152,9 @@ public class EmailAddress { | |||||
/** | /** | ||||
* Sets the email address | |||||
* Sets the email address. | |||||
* | * | ||||
* @param address the actual email address (without <>) | |||||
* @param address the actual email address (without <>) | |||||
*/ | */ | ||||
public void setAddress(String address) { | public void setAddress(String address) { | ||||
this.address = address; | this.address = address; | ||||
@@ -43,69 +43,85 @@ import org.apache.tools.ant.types.EnumeratedAttribute; | |||||
import org.apache.tools.ant.util.FileUtils; | import org.apache.tools.ant.util.FileUtils; | ||||
/** | /** | ||||
*Modifies settings in a property file. | |||||
* Modifies settings in a property file. | |||||
* | * | ||||
* <p> | |||||
*The following is an example of its usage: | |||||
* <ul><target name="setState"><br> | |||||
* <ul><property<br> | |||||
* <ul>name="header"<br> | |||||
* value="##Generated file - do not modify!"/><br> | |||||
* <propertyfile file="apropfile.properties" comment="${header}"><br> | |||||
* <entry key="product.version.major" type="int" value="5"/><br> | |||||
* <entry key="product.version.minor" type="int" value="0"/><br> | |||||
* <entry key="product.build.major" type="int" value="0" /><br> | |||||
* <entry key="product.build.minor" type="int" operation="+" /><br> | |||||
* <entry key="product.build.date" type="date" value="now" /><br> | |||||
* <entry key="intSet" type="int" operation="=" value="681"/><br> | |||||
* <entry key="intDec" type="int" operation="-"/><br> | |||||
* <entry key="StringEquals" type="string" value="testValue"/><br> | |||||
* </propertyfile><br></ul> | |||||
* </target></ul><p> | |||||
* <p>The following is an example of its usage:</p> | |||||
* <pre> | |||||
* <target name="setState"> | |||||
* <property | |||||
* name="header" | |||||
* value="##Generated file - do not modify!"/> | |||||
* <propertyfile file="apropfile.properties" comment="${header}"> | |||||
* <entry key="product.version.major" type="int" value="5"/> | |||||
* <entry key="product.version.minor" type="int" value="0"/> | |||||
* <entry key="product.build.major" type="int" value="0" /> | |||||
* <entry key="product.build.minor" type="int" operation="+" /> | |||||
* <entry key="product.build.date" type="date" value="now" /> | |||||
* <entry key="intSet" type="int" operation="=" value="681"/> | |||||
* <entry key="intDec" type="int" operation="-"/> | |||||
* <entry key="StringEquals" type="string" value="testValue"/> | |||||
* </propertyfile> | |||||
* </target> | |||||
* </pre> | |||||
* | * | ||||
*The <propertyfile> task must have:<br> | |||||
* <ul><li>file</li></ul> | |||||
*Other parameters are:<br> | |||||
* <ul><li>comment, key, operation, type and value (the final four being | |||||
* eliminated shortly)</li></ul> | |||||
* The <propertyfile> task must have: | |||||
* <ul> | |||||
* <li>file</li> | |||||
* </ul> | |||||
* Other parameters are: | |||||
* <ul> | |||||
* <li>comment</li> | |||||
* <li>key</li> | |||||
* <li>operation</li> | |||||
* <li>type</li> | |||||
* <li>value (the final four being eliminated shortly)</li> | |||||
* </ul> | |||||
* | * | ||||
*The <entry> task must have:<br> | |||||
* <ul><li>key</li></ul> | |||||
*Other parameters are:<br> | |||||
* <ul><li>operation</li> | |||||
* <li>type</li> | |||||
* <li>value</li> | |||||
* <li>default</li> | |||||
* <li>unit</li> | |||||
* </ul> | |||||
* The <entry> task must have: | |||||
* <ul> | |||||
* <li>key</li> | |||||
* </ul> | |||||
* Other parameters are: | |||||
* <ul> | |||||
* <li>operation</li> | |||||
* <li>type</li> | |||||
* <li>value</li> | |||||
* <li>default</li> | |||||
* <li>unit</li> | |||||
* </ul> | |||||
* | * | ||||
*If type is unspecified, it defaults to string | |||||
* If type is unspecified, it defaults to string. | |||||
* | * | ||||
*Parameter values:<br> | |||||
* <ul><li>operation:</li> | |||||
* <ul><li>"=" (set -- default)</li> | |||||
* <li>"-" (dec)</li> | |||||
* <li>"+" (inc)</li> | |||||
* | |||||
* <li>type:</li> | |||||
* <ul><li>"int"</li> | |||||
* <li>"date"</li> | |||||
* <li>"string"</li></ul></ul> | |||||
* | |||||
* <li>value:</li> | |||||
* <ul><li>holds the default value, if the property | |||||
* Parameter values: | |||||
* <ul> | |||||
* <li>operation:</li> | |||||
* <ul> | |||||
* <li>"=" (set -- default)</li> | |||||
* <li>"-" (dec)</li> | |||||
* <li>"+" (inc)</li> | |||||
* </ul> | |||||
* <li>type:</li> | |||||
* <ul> | |||||
* <li>"int"</li> | |||||
* <li>"date"</li> | |||||
* <li>"string"</li> | |||||
* </ul> | |||||
* <li>value:</li> | |||||
* <ul> | |||||
* <li>holds the default value, if the property | |||||
* was not found in property file</li> | * was not found in property file</li> | ||||
* <li>"now" In case of type "date", the | |||||
* <li>"now" In case of type "date", the | |||||
* value "now" will be replaced by the current | * value "now" will be replaced by the current | ||||
* date/time and used even if a valid date was | * date/time and used even if a valid date was | ||||
* found in the property file.</li></ul> | |||||
* | |||||
* found in the property file.</li> | |||||
* </ul> | |||||
* </ul> | |||||
* | * | ||||
*String property types can only use the "=" operation. | |||||
*Int property types can only use the "=", "-" or "+" operations.<p> | |||||
* <p>String property types can only use the "=" operation. | |||||
* Int property types can only use the "=", "-" or "+" operations.<p> | |||||
* | * | ||||
*The message property is used for the property file header, with "\\" being | |||||
*a newline delimiter character. | |||||
* The message property is used for the property file header, with "\\" being | |||||
* a newline delimiter character. | |||||
* | * | ||||
*/ | */ | ||||
public class PropertyFile extends Task { | public class PropertyFile extends Task { | ||||
@@ -212,11 +212,13 @@ public class ReplaceRegExp extends Task { | |||||
* on one line at a time. This is useful if you | * on one line at a time. This is useful if you | ||||
* want to only replace the first occurrence of a regular expression on | * want to only replace the first occurrence of a regular expression on | ||||
* each line, which is not easy to do when processing the file as a whole. | * each line, which is not easy to do when processing the file as a whole. | ||||
* Defaults to <i>false</i>.</td> | |||||
* Defaults to <i>false</i>. | |||||
* | |||||
* @param byline the byline attribute as a string | * @param byline the byline attribute as a string | ||||
* @deprecated since 1.6.x. | * @deprecated since 1.6.x. | ||||
* Use setByLine(boolean). | * Use setByLine(boolean). | ||||
*/ | */ | ||||
@Deprecated | |||||
public void setByLine(String byline) { | public void setByLine(String byline) { | ||||
Boolean res = Boolean.valueOf(byline); | Boolean res = Boolean.valueOf(byline); | ||||
@@ -231,14 +233,14 @@ public class ReplaceRegExp extends Task { | |||||
* on one line at a time. This is useful if you | * on one line at a time. This is useful if you | ||||
* want to only replace the first occurrence of a regular expression on | * want to only replace the first occurrence of a regular expression on | ||||
* each line, which is not easy to do when processing the file as a whole. | * each line, which is not easy to do when processing the file as a whole. | ||||
* Defaults to <i>false</i>.</td> | |||||
* Defaults to <i>false</i>. | |||||
* | |||||
* @param byline the byline attribute | * @param byline the byline attribute | ||||
*/ | */ | ||||
public void setByLine(boolean byline) { | public void setByLine(boolean byline) { | ||||
this.byline = byline; | this.byline = byline; | ||||
} | } | ||||
/** | /** | ||||
* Specifies the encoding Ant expects the files to be in - | * Specifies the encoding Ant expects the files to be in - | ||||
* defaults to the platforms default encoding. | * defaults to the platforms default encoding. | ||||
@@ -120,7 +120,7 @@ public class XMLValidateTask extends Task { | |||||
/** | /** | ||||
* Specify how parser error are to be handled. | * Specify how parser error are to be handled. | ||||
* <p> | * <p> | ||||
* If set to <code>true</true> (default), log a warn message for each SAX warn event. | |||||
* If set to <code>true</code> (default), log a warn message for each SAX warn event. | |||||
* @param bool if set to <code>false</code> do not send warnings | * @param bool if set to <code>false</code> do not send warnings | ||||
*/ | */ | ||||
public void setWarn(boolean bool) { | public void setWarn(boolean bool) { | ||||
@@ -38,42 +38,42 @@ import org.apache.tools.ant.types.Commandline; | |||||
* <td>viewpath</td> | * <td>viewpath</td> | ||||
* <td>Path to the ClearCase view file or directory that the command will operate on</td> | * <td>Path to the ClearCase view file or directory that the command will operate on</td> | ||||
* <td>No</td> | * <td>No</td> | ||||
* <tr> | |||||
* </tr> | |||||
* <tr> | * <tr> | ||||
* <td>comment</td> | * <td>comment</td> | ||||
* <td>Specify a comment. Only one of comment or cfile may be used.</td> | * <td>Specify a comment. Only one of comment or cfile may be used.</td> | ||||
* <td>No</td> | * <td>No</td> | ||||
* <tr> | |||||
* </tr> | |||||
* <tr> | * <tr> | ||||
* <td>commentfile</td> | * <td>commentfile</td> | ||||
* <td>Specify a file containing a comment. Only one of comment or cfile may be used.</td> | * <td>Specify a file containing a comment. Only one of comment or cfile may be used.</td> | ||||
* <td>No</td> | * <td>No</td> | ||||
* <tr> | |||||
* </tr> | |||||
* <tr> | * <tr> | ||||
* <td>nowarn</td> | * <td>nowarn</td> | ||||
* <td>Suppress warning messages</td> | * <td>Suppress warning messages</td> | ||||
* <td>No</td> | * <td>No</td> | ||||
* <tr> | |||||
* </tr> | |||||
* <tr> | * <tr> | ||||
* <td>preservetime</td> | * <td>preservetime</td> | ||||
* <td>Preserve the modification time</td> | * <td>Preserve the modification time</td> | ||||
* <td>No</td> | * <td>No</td> | ||||
* <tr> | |||||
* </tr> | |||||
* <tr> | * <tr> | ||||
* <td>keepcopy</td> | * <td>keepcopy</td> | ||||
* <td>Keeps a copy of the file with a .keep extension</td> | * <td>Keeps a copy of the file with a .keep extension</td> | ||||
* <td>No</td> | * <td>No</td> | ||||
* <tr> | |||||
* </tr> | |||||
* <tr> | * <tr> | ||||
* <td>identical</td> | * <td>identical</td> | ||||
* <td>Allows the file to be checked in even if it is identical to the original</td> | * <td>Allows the file to be checked in even if it is identical to the original</td> | ||||
* <td>No</td> | * <td>No</td> | ||||
* <tr> | |||||
* </tr> | |||||
* <tr> | * <tr> | ||||
* <td>failonerr</td> | * <td>failonerr</td> | ||||
* <td>Throw an exception if the command fails. Default is true</td> | * <td>Throw an exception if the command fails. Default is true</td> | ||||
* <td>No</td> | * <td>No</td> | ||||
* <tr> | |||||
* </tr> | |||||
* </table> | * </table> | ||||
* | * | ||||
*/ | */ | ||||