stevel 2002/06/20 00:37:22
Modified: src/main/org/apache/tools/ant/taskdefs Tag: ANT_15_BRANCH
Sequential.java SignJar.java Sleep.java
SQLExec.java Tar.java Taskdef.java Touch.java
Typedef.java Unpack.java Untar.java WaitFor.java
Log:
more javadoc updates.
I've realised that we now have a synchronisation problem; as soon as 1.5 goes
out the door, we should really migrate to xdoc based docs ASAP.
Revision Changes Path
No revision
No revision
1.7.2.2 +9 -1
jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Sequential.java
Index: Sequential.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Sequential.java,v
retrieving revision 1.7.2.1
retrieving revision 1.7.2.2
diff -u -r1.7.2.1 -r1.7.2.2
--- Sequential.java 12 Jun 2002 08:48:21 -0000 1.7.2.1
+++ Sequential.java 20 Jun 2002 07:37:21 -0000 1.7.2.2
@@ -63,8 +63,16 @@
/**
- * Implements a single threaded task execution.
+ * Sequential is a container task - it can contain other Ant tasks. The
nested
+ * tasks are simply executed in sequence. Sequential's primary use is to
support
+ * the sequential execution of a subset of tasks within the
+ [EMAIL PROTECTED] Parallel Parallel Task}
+
* <p>
+ * The sequential task has no attributes and does not support any nested
+ * elements apart from Ant tasks. Any valid Ant task may be embedded within
the
+ * sequential task.</p>
+
* @author Thomas Christen <a href="mailto:[EMAIL PROTECTED]">[EMAIL
PROTECTED]</a>
* @since Ant 1.4
* @ant.task category="control"
1.21.2.1 +57 -3
jakarta-ant/src/main/org/apache/tools/ant/taskdefs/SignJar.java
Index: SignJar.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/SignJar.java,v
retrieving revision 1.21
retrieving revision 1.21.2.1
diff -u -r1.21 -r1.21.2.1
--- SignJar.java 23 Apr 2002 08:15:51 -0000 1.21
+++ SignJar.java 20 Jun 2002 07:37:21 -0000 1.21.2.1
@@ -68,8 +68,15 @@
import org.apache.tools.ant.util.JavaEnvUtils;
/**
- * Sign a archive.
- *
+ * Signs jar or zip files with the javasign command line tool. The
+ * tool detailed dependency checking: files are only signed if they
+ * are not signed. The <tt>signjar</tt> attribute can point to the file to
+ * generate; if this file exists then
+ * its modification date is used as a cue as to whether to resign any JAR
file.
+ * <br>
+ * <strong>Note:</strong> Requires Java 1.2 or later. </p>
+
+ *
* @author Peter Donald
* <a href="mailto:[EMAIL PROTECTED]">[EMAIL PROTECTED]</a>
* @author Nick Fortescue
@@ -113,56 +120,97 @@
*/
protected boolean lazy;
+ /**
+ * the jar file to sign; required
+ */
public void setJar(final File jar) {
this.jar = jar;
}
+ /**
+ * the alias to sign under; required
+ */
public void setAlias(final String alias) {
this.alias = alias;
}
+ /**
+ * keystore location; required
+ */
public void setKeystore(final File keystore) {
this.keystore = keystore;
}
+ /**
+ * password for keystore integrity; required
+ */
public void setStorepass(final String storepass) {
this.storepass = storepass;
}
+ /**
+ * keystore type; optional
+ */
public void setStoretype(final String storetype) {
this.storetype = storetype;
}
+ /**
+ * password for private key (if different); optional
+ */
public void setKeypass(final String keypass) {
this.keypass = keypass;
}
+ /**
+ * name of .SF/.DSA file; optional
+ */
public void setSigfile(final File sigfile) {
this.sigfile = sigfile;
}
+ /**
+ * name of signed JAR file; optional
+ */
public void setSignedjar(final File signedjar) {
this.signedjar = signedjar;
}
+ /**
+ * Enable verbose output when signing
+ * ; optional: default false
+ */
public void setVerbose(final boolean verbose) {
this.verbose = verbose;
}
+ /**
+ * Flag to include the .SF file inside the signature;
+ * optional; default false
+ */
public void setInternalsf(final boolean internalsf) {
this.internalsf = internalsf;
}
+ /**
+ * flag to compute hash of entire manifest;
+ * optional, default false
+ */
public void setSectionsonly(final boolean sectionsonly) {
this.sectionsonly = sectionsonly;
}
+ /**
+ * flag to control whether the presence of a signature
+ * file means a JAR is signed;
+ * optional, default false
+ */
public void setLazy(final boolean lazy) {
this.lazy = lazy;
}
/**
- * Adds a set of files (nested fileset attribute).
+ * Adds a set of files to sign
* @since Ant 1.4
*/
public void addFileset(final FileSet set) {
@@ -170,6 +218,9 @@
}
+ /**
+ * sign the jar(s)
+ */
public void execute() throws BuildException {
if (null == jar && null == filesets) {
throw new BuildException("jar must be set through jar attribute "
@@ -193,6 +244,9 @@
}
}
+ /**
+ * sign one jar
+ */
private void doOneJar(File jarSource, File jarTarget)
throws BuildException {
if (JavaEnvUtils.isJavaVersion(JavaEnvUtils.JAVA_1_1)) {
1.10.2.1 +22 -10
jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Sleep.java
Index: Sleep.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Sleep.java,v
retrieving revision 1.10
retrieving revision 1.10.2.1
diff -u -r1.10 -r1.10.2.1
--- Sleep.java 15 Apr 2002 13:36:17 -0000 1.10
+++ Sleep.java 20 Jun 2002 07:37:21 -0000 1.10.2.1
@@ -58,8 +58,18 @@
import org.apache.tools.ant.BuildException;
/**
- * A task to sleep for a period of time
- *
+ * Sleep 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
+ * is positive, pending fundamental changes in physics and JVM
+ * execution tims</p>
+ * Note that sleep times are always hints to be interpred by the OS how it
feels
+ * 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
+ * measuring how long a sleep actually took.</p>
+*
* @author [EMAIL PROTECTED] steve loughran
* @since Ant 1.4
* @ant.task category="utility"
@@ -72,19 +82,21 @@
private boolean failOnError = true;
/**
- * Description of the Field
+ * sleep seconds
*/
private int seconds = 0;
+
/**
- * Description of the Field
+ * sleep hours
*/
private int hours = 0;
/**
- * Description of the Field
+ * sleep minutes
*/
private int minutes = 0;
+
/**
- * Description of the Field
+ * sleep milliseconds
*/
private int milliseconds = 0;
@@ -98,7 +110,7 @@
/**
- * Sets the Seconds attribute of the Sleep object
+ * adds some seconds to the Sleep
*
* @param seconds The new Seconds value
*/
@@ -108,7 +120,7 @@
/**
- * Sets the Hours attribute of the Sleep object
+ * hours to to add to the sleep time
*
* @param hours The new Hours value
*/
@@ -128,7 +140,7 @@
/**
- * Sets the Milliseconds attribute of the Sleep object
+ * minutes to add to the sleep time
*
* @param milliseconds The new Milliseconds value
*/
@@ -151,7 +163,7 @@
/**
- * Sets the FailOnError attribute of the MimeMail object
+ * flag controlling whether to break the build on an error.
*
* @param failOnError The new FailOnError value
*/
1.42.2.1 +64 -39
jakarta-ant/src/main/org/apache/tools/ant/taskdefs/SQLExec.java
Index: SQLExec.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/SQLExec.java,v
retrieving revision 1.42
retrieving revision 1.42.2.1
diff -u -r1.42 -r1.42.2.1
--- SQLExec.java 26 Apr 2002 00:24:05 -0000 1.42
+++ SQLExec.java 20 Jun 2002 07:37:21 -0000 1.42.2.1
@@ -92,9 +92,25 @@
import java.sql.ResultSetMetaData;
/**
- * Reads in a text file containing SQL statements seperated with semicolons
- * and executes it in a given db.
- * Comments may be created with REM -- or //.
+ * <p>Executes a series of SQL statements via JDBC to a database. Statements
can
+ * either be read in from a text file using the <i>src</i> attribute or from
+ * between the enclosing SQL tags.</p>
+ *
+ * <p>Multiple statements can be provided, separated by semicolons (or the
+ * defined <i>delimiter</i>). Individual lines within the statements can be
+ * commented using either --, // or REM at the start of the line.</p>
+ *
+ * <p>The <i>autocommit</i> attribute specifies whether auto-commit should
be
+ * turned on or off whilst executing the statements. If auto-commit is
turned
+ * on each statement will be executed and committed. If it is turned off the
+ * statements will all be executed as one transaction.</p>
+ *
+ * <p>The <i>onerror</i> attribute specifies how to proceed when an error
occurs
+ * during the execution of one of the statements.
+ * The possible values are: <b>continue</b> execution, only show the error;
+ * <b>stop</b> execution and commit transaction;
+ * and <b>abort</b> execution and transaction and fail task.</p>
+
*
* @author <a href="mailto:[EMAIL PROTECTED]">Jeff Martin</a>
* @author <A href="mailto:[EMAIL PROTECTED]">Michael McCallum</A>
@@ -106,6 +122,9 @@
*/
public class SQLExec extends JDBCTask {
+ /**
+ * delimiters we support, "normal" and "row"
+ */
public static class DelimiterType extends EnumeratedAttribute {
public static final String NORMAL = "normal";
public static final String ROW = "row";
@@ -125,19 +144,16 @@
*/
private Connection conn = null;
+ /**
+ * files to load
+ */
private Vector filesets = new Vector();
-
-
/**
* SQL statement
*/
private Statement statement = null;
-
-
-
-
/**
* SQL input file
*/
@@ -180,7 +196,6 @@
private File output = null;
-
/**
* Action to perform if an error is found
**/
@@ -196,19 +211,18 @@
*/
private boolean append = false;
-
-
-
/**
* Set the name of the sql file to be run.
+ * Required unless statements are enclosed in the build file
*/
public void setSrc(File srcFile) {
this.srcFile = srcFile;
}
/**
- * Set the sql command to execute
+ * Set an inline SQL command to execute.
+ * NB: Properties are not expanded in this text.
*/
public void addText(String sql) {
this.sqlCommand += sql;
@@ -223,7 +237,7 @@
/**
- * Set the sql command to execute
+ * Add a SQL transaction to execute
*/
public Transaction createTransaction() {
Transaction t = new Transaction();
@@ -231,11 +245,8 @@
return t;
}
-
-
-
/**
- * Set the file encoding to use on the sql files read in
+ * Set the file encoding to use on the SQL files read in
*
* @param encoding the encoding to use on the files
*/
@@ -243,11 +254,9 @@
this.encoding = encoding;
}
-
-
-
/**
- * Set the statement delimiter.
+ * Set the delimiter that separates SQL statements;
+ * optional, default ";"
*
* <p>For example, set this to "go" and delimitertype to "ROW" for
* Sybase ASE or MS SQL Server.</p>
@@ -257,7 +266,7 @@
}
/**
- * Set the Delimiter type for this sql task.
+ * Set the Delimiter type for this sql task; default "normal"
*
* <p>The delimiter type takes two values - normal and row. Normal
* means that any occurence of the delimiter terminate the SQL
@@ -269,28 +278,32 @@
}
/**
- * Set the print flag.
+ * Print result sets from the statements;
+ * optional, default false
*/
public void setPrint(boolean print) {
this.print = print;
}
/**
- * Set the showheaders flag.
+ * Print headers for result sets from the
+ * statements; optional, default true.
*/
public void setShowheaders(boolean showheaders) {
this.showheaders = showheaders;
}
/**
- * Set the output file.
+ * Set the output file;
+ * optional, defaults to the ant log
*/
public void setOutput(File output) {
this.output = output;
}
/**
- * Shall we append to an existing file?
+ * whether output should be appended to or overwrite
+ * an existing file. Defaults to false.
*
* @since Ant 1.5
*/
@@ -299,9 +312,9 @@
}
-
/**
- * Set the action to perform onerror
+ * Action to perform when statement fails: continue, stop, or abort
+ * optional; default "abort"
*/
public void setOnerror(OnError action) {
this.onError = action.getValue();
@@ -326,9 +339,9 @@
}
}
- if (srcFile != null && !srcFile.exists()) {
- throw new BuildException("Source file does not
exist!", location);
- }
+ if (srcFile != null && !srcFile.exists()) {
+ throw new BuildException("Source file does not exist!",
location);
+ }
// deal with the filesets
for (int i = 0; i < filesets.size(); i++) {
@@ -349,10 +362,10 @@
Transaction t = createTransaction();
t.setSrc(srcFile);
t.addText(sqlCommand);
- conn = getConnection();
- if (!isValidRdbms(conn)) {
- return;
- }
+ conn = getConnection();
+ if (!isValidRdbms(conn)) {
+ return;
+ }
try {
statement = conn.createStatement();
@@ -418,6 +431,9 @@
}
+ /**
+ * read in lines and execute them
+ */
protected void runStatements(Reader reader, PrintStream out)
throws SQLException, IOException {
String sql = "";
@@ -553,8 +569,8 @@
}
/**
- * Enumerated attribute with the values "continue", "stop" and "abort"
- * for the onerror attribute.
+ * The action a task should perform on an error,
+ * one of "continue", "stop" and "abort"
*/
public static class OnError extends EnumeratedAttribute {
public String[] getValues() {
@@ -572,14 +588,23 @@
private File tSrcFile = null;
private String tSqlCommand = "";
+ /**
+ *
+ */
public void setSrc(File src) {
this.tSrcFile = src;
}
+ /**
+ *
+ */
public void addText(String sql) {
this.tSqlCommand += sql;
}
+ /**
+ *
+ */
private void runTransaction(PrintStream out)
throws IOException, SQLException {
if (tSqlCommand.length() != 0) {
1.32.2.1 +74 -24
jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Tar.java
Index: Tar.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Tar.java,v
retrieving revision 1.32
retrieving revision 1.32.2.1
diff -u -r1.32 -r1.32.2.1
--- Tar.java 24 Apr 2002 03:09:06 -0000 1.32
+++ Tar.java 20 Jun 2002 07:37:21 -0000 1.32.2.1
@@ -78,7 +78,7 @@
/**
- * Creates a TAR archive.
+ * Creates a tar archive.
*
* @author Stefano Mazzocchi
* <a href="mailto:[EMAIL PROTECTED]">[EMAIL PROTECTED]</a>
@@ -133,6 +133,9 @@
private TarCompressionMethod compression = new TarCompressionMethod();
+ /**
+ * Add a new fileset with the option to specify permissions
+ */
public TarFileSet createTarFileSet() {
TarFileSet fileset = new TarFileSet();
filesets.addElement(fileset);
@@ -141,7 +144,7 @@
/**
- * This is the name/location of where to create the tar file.
+ * Set is the name/location of where to create the tar file.
* @deprecated for consistency with other tasks, please use setDestFile()
*/
public void setTarfile(File tarFile) {
@@ -149,7 +152,7 @@
}
/**
- * Sets the destfile attribute.
+ * Set is the name/location of where to create the tar file.
* @since Ant 1.5
* @param destFile The output of the tar
*/
@@ -165,14 +168,17 @@
}
/**
- * Set how to handle long files.
- *
+ * Set how to handle long files, those with a path>100 chars.
+ * Optional, default=warn.
+ * <p>
* Allowable values are
- * truncate - paths are truncated to the maximum length
- * fail - paths greater than the maximim cause a build exception
- * warn - paths greater than the maximum cause a warning and GNU is
used
- * gnu - GNU extensions are used for any paths greater than the
maximum.
- * omit - paths greater than the maximum are omitted from the archive
+ * <ul>
+ * <li> truncate - paths are truncated to the maximum length
+ * <li> fail - paths greater than the maximim cause a build exception
+ * <li> warn - paths greater than the maximum cause a warning and GNU
is used
+ * <li> gnu - GNU extensions are used for any paths greater than the
maximum.
+ * <li> omit - paths greater than the maximum are omitted from the
archive
+ * </ul>
* @deprecated setLongFile(String) is deprecated and is replaced with
* setLongFile(Tar.TarLongFileMode) to make Ant's
Introspection
* mechanism do the work and also to encapsulate operations
on
@@ -186,14 +192,17 @@
}
/**
- * Set how to handle long files.
- *
+ * Set how to handle long files, those with a path>100 chars.
+ * Optional, default=warn.
+ * <p>
* Allowable values are
- * truncate - paths are truncated to the maximum length
- * fail - paths greater than the maximim cause a build exception
- * warn - paths greater than the maximum cause a warning and GNU is
used
- * gnu - GNU extensions are used for any paths greater than the
maximum.
- * omit - paths greater than the maximum are omitted from the archive
+ * <ul>
+ * <li> truncate - paths are truncated to the maximum length
+ * <li> fail - paths greater than the maximim cause a build exception
+ * <li> warn - paths greater than the maximum cause a warning and GNU
is used
+ * <li> gnu - GNU extensions are used for any paths greater than the
maximum.
+ * <li> omit - paths greater than the maximum are omitted from the
archive
+ * </ul>
*/
public void setLongfile(TarLongFileMode mode) {
this.longFileMode = mode;
@@ -201,16 +210,20 @@
/**
* Set compression method.
- *
* Allowable values are
- * none - no compression
- * gzip - Gzip compression
- * bzip2 - Bzip2 compression
+ * <ul>
+ * <li> none - no compression
+ * <li> gzip - Gzip compression
+ * <li> bzip2 - Bzip2 compression
+ * </ul>
*/
public void setCompression(TarCompressionMethod mode) {
this.compression = mode;
}
-
+
+ /**
+ * do the business
+ */
public void execute() throws BuildException {
if (tarFile == null) {
throw new BuildException("tarfile attribute must be set!",
@@ -324,7 +337,10 @@
filesets = savedFileSets;
}
}
-
+
+ /**
+ * tar a file
+ */
protected void tarFile(File file, TarOutputStream tOut, String vPath,
TarFileSet tarFileSet)
throws IOException {
@@ -419,6 +435,9 @@
return sfs.restrict(files, baseDir, null, mm).length == 0;
}
+ /**
+ * This is a FileSet with the option to specify permissions
+ */
public static class TarFileSet extends FileSet {
private String[] files = null;
@@ -457,6 +476,11 @@
return files;
}
+ /**
+ * A 3 digit octal string, specify the user, group and
+ * other modes in the standard Unix fashion;
+ * optional, default=0644
+ */
public void setMode(String octalString) {
this.mode = 0100000 | Integer.parseInt(octalString, 8);
}
@@ -465,6 +489,11 @@
return mode;
}
+ /**
+ * The username for the tar entry
+ * This is not the same as the UID, which is
+ * not currently set by the task.
+ */
public void setUserName(String userName) {
this.userName = userName;
}
@@ -473,6 +502,11 @@
return userName;
}
+ /**
+ * The groupname for the tar entry; optional, default=""
+ * This is not the same as the GID, which is
+ * not currently set by the task.
+ */
public void setGroup(String groupName) {
this.groupName = groupName;
}
@@ -481,6 +515,11 @@
return groupName;
}
+ /**
+ * If the prefix attribute is set, all files in the fileset
+ * are prefixed with that path in the archive.
+ * optional.
+ */
public void setPrefix(String prefix) {
this.prefix = prefix;
}
@@ -489,6 +528,12 @@
return prefix;
}
+ /**
+ * If the fullpath attribute is set, the file in the fileset
+ * is written with that path in the archive. The prefix attribute,
+ * if specified, is ignored. It is an error to have more than one
file specified in
+ * such a fileset.
+ */
public void setFullpath(String fullpath) {
this.fullpath = fullpath;
}
@@ -497,6 +542,11 @@
return fullpath;
}
+ /**
+ * Flag to indicates whether leading `/'s should
+ * be preserved in the file names.
+ * Optional, default is <code>false</code>.
+ */
public void setPreserveLeadingSlashes(boolean b) {
this.preserveLeadingSlashes = b;
}
@@ -507,7 +557,7 @@
}
/**
- * Valid Modes for LongFile attribute to Tar Task
+ * Set of options for long file handling in the task.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Magesh Umasankar</a>
*/
1.22.2.1 +16 -2
jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Taskdef.java
Index: Taskdef.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Taskdef.java,v
retrieving revision 1.22
retrieving revision 1.22.2.1
diff -u -r1.22 -r1.22.2.1
--- Taskdef.java 12 Apr 2002 13:32:27 -0000 1.22
+++ Taskdef.java 20 Jun 2002 07:37:21 -0000 1.22.2.1
@@ -57,13 +57,27 @@
import org.apache.tools.ant.BuildException;
/**
- * Define a new task.
- *
+ * 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
+ * this task uniquely, and the full name of the class (including the
packages) that
+ * implements this task.</p>
+ * <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>
+ * <pre>
+ * taskname=fully.qualified.java.classname
+ * </pre>
* @author <a href="[EMAIL PROTECTED]">Stefan Bodewig</a>
* @since Ant 1.1
* @ant.task category="internal"
*/
public class Taskdef extends Definer {
+
+ /**
+ * subclassed handler for definitions; called by parent during
+ * execution.
+ */
protected void addDefinition(String name, Class c) throws BuildException
{
project.addTaskDefinition(name, c);
}
1.24.2.1 +9 -5
jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Touch.java
Index: Touch.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Touch.java,v
retrieving revision 1.24
retrieving revision 1.24.2.1
diff -u -r1.24 -r1.24.2.1
--- Touch.java 23 Apr 2002 08:35:05 -0000 1.24
+++ Touch.java 20 Jun 2002 07:37:21 -0000 1.24.2.1
@@ -70,7 +70,7 @@
import java.util.Vector;
/**
- * Touch a file and/or fileset(s) -- corresponds to the Unix touch command.
+ * Touch a file and/or fileset(s); corresponds to the Unix touch command.
*
* <p>If the file to touch doesn't exist, an empty one is
* created. </p>
@@ -88,7 +88,7 @@
*/
public class Touch extends Task {
- private File file; // required
+ private File file;
private long millis = -1;
private String dateTime;
private Vector filesets = new Vector();
@@ -107,21 +107,25 @@
}
/**
- * Milliseconds since 01/01/1970 00:00 am.
+ * the new modification time of the file
+ * in milliseconds since midnight Jan 1 1970.
+ * Optional, default=now
*/
public void setMillis(long millis) {
this.millis = millis;
}
/**
- * Date in the format MM/DD/YYYY HH:MM AM_PM.
+ * the new modification time of the file
+ * in the format MM/DD/YYYY HH:MM AM <i>or</i> PM;
+ * Optional, default=now
*/
public void setDatetime(String dateTime) {
this.dateTime = dateTime;
}
/**
- * Adds a set of files (nested fileset attribute).
+ * Add a set of files to touch
*/
public void addFileset(FileSet set) {
filesets.addElement(set);
1.7.2.1 +20 -1
jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Typedef.java
Index: Typedef.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Typedef.java,v
retrieving revision 1.7
retrieving revision 1.7.2.1
diff -u -r1.7 -r1.7.2.1
--- Typedef.java 12 Apr 2002 13:32:27 -0000 1.7
+++ Typedef.java 20 Jun 2002 07:37:21 -0000 1.7.2.1
@@ -57,13 +57,32 @@
import org.apache.tools.ant.BuildException;
/**
- * Define a new data type.
*
+ * Adds a data type definition to the current project.
+ * Two attributes are
+ * needed, the name that identifies this data type uniquely, and the full
+ * name of the class (including the packages) that implements this
+ * type.
+ * <p>You can also define a group of data types 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 data type in the
+ * format:</p>
+ * <pre>
+ * typename=fully.qualified.java.classname
+ * </pre>
+ * <p>Typedef should be used to add your own types to the system. Data
+ * types are things likepaths or filesets that can be defined at
+ * the project level and referenced via their ID attribute.</p>
+ * <p>Custom data types usually need custom tasks to put them to good
use.</p>
+
* @author <a href="[EMAIL PROTECTED]">Stefan Bodewig</a>
* @since Ant 1.4
* @ant.task category="internal"
*/
public class Typedef extends Definer {
+ /**
+ * implement abstract callback of parent class
+ */
protected void addDefinition(String name, Class c) throws BuildException
{
project.addDataTypeDefinition(name, c);
}
1.11.2.2 +4 -2
jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Unpack.java
Index: Unpack.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Unpack.java,v
retrieving revision 1.11.2.1
retrieving revision 1.11.2.2
diff -u -r1.11.2.1 -r1.11.2.2
--- Unpack.java 19 Jun 2002 00:03:16 -0000 1.11.2.1
+++ Unpack.java 20 Jun 2002 07:37:21 -0000 1.11.2.2
@@ -77,6 +77,7 @@
* setSrc(File) to make Ant's Introspection
* mechanism do the work and also to encapsulate operations
on
* the type in its own class.
+ * @ant.attribute ignore="true"
*/
public void setSrc(String src) {
log("DEPRECATED - The setSrc(String) method has been deprecated."
@@ -89,6 +90,7 @@
* setDest(File) to make Ant's Introspection
* mechanism do the work and also to encapsulate operations
on
* the type in its own class.
+ * @ant.attribute ignore="true"
*/
public void setDest(String dest) {
log("DEPRECATED - The setDest(String) method has been deprecated."
@@ -97,7 +99,7 @@
}
/**
- * The file to expand.
+ * The file to expand; required.
* @param src file to expand
*/
public void setSrc(File src) {
@@ -105,7 +107,7 @@
}
/**
- * The destination file or directory.
+ * The destination file or directory; optional.
* @param dest destination file or directory
*/
public void setDest(File dest) {
1.26.2.1 +16 -4
jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Untar.java
Index: Untar.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Untar.java,v
retrieving revision 1.26
retrieving revision 1.26.2.1
diff -u -r1.26 -r1.26.2.1
--- Untar.java 24 Apr 2002 03:09:06 -0000 1.26
+++ Untar.java 20 Jun 2002 07:37:22 -0000 1.26.2.1
@@ -72,6 +72,16 @@
/**
* Untar a file.
+ * <p>For JDK 1.1 "last modified time" field is set to current
time instead of being
+ * carried from the archive file.</p>
+ * <p>PatternSets are used to select files to extract
+ * <I>from</I> the archive. If no patternset is used, all files are
extracted.
+ * </p>
+ * <p>FileSet>s may be used used to select archived files
+ * to perform unarchival upon.
+ * </p>
+ * <p>File permissions will not be restored on extracted files.</p>
+ * <p>The untar task recognizes the long pathname entries used by GNU tar.<p>
*
* @author <a href="mailto:[EMAIL PROTECTED]">Stefan Bodewig</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Magesh Umasankar</a>
@@ -87,12 +97,14 @@
private UntarCompressionMethod compression = new
UntarCompressionMethod();
/**
- * Set compression method.
+ * Set decompression algorithm to use; default=none.
*
* Allowable values are
- * none - no compression
- * gzip - Gzip compression
- * bzip2 - Bzip2 compression
+ * <ul>
+ * <li>none - no compression
+ * <li>gzip - Gzip compression
+ * <li>bzip2 - Bzip2 compression
+ * </ul>
*
* @param method compression method
*/
1.11.2.1 +6 -1
jakarta-ant/src/main/org/apache/tools/ant/taskdefs/WaitFor.java
Index: WaitFor.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/WaitFor.java,v
retrieving revision 1.11
retrieving revision 1.11.2.1
diff -u -r1.11 -r1.11.2.1
--- WaitFor.java 15 Apr 2002 14:56:29 -0000 1.11
+++ WaitFor.java 20 Jun 2002 07:37:22 -0000 1.11.2.1
@@ -124,7 +124,7 @@
}
/**
- * Set the timeout property.
+ * Name the property to set after a timeout.
*/
public void setTimeoutProperty(String p) {
timeoutProperty = p;
@@ -172,6 +172,11 @@
}
}
+ /**
+ * The enumeration of units:
+ * millisecond, second, minute, hour, day, week
+ * @todo: we use timestamps in many places, why not factor this out
+ */
public static class Unit extends EnumeratedAttribute {
private static final String MILLISECOND = "millisecond";
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>