Return-Path: Delivered-To: apmail-ant-dev-archive@www.apache.org Received: (qmail 62463 invoked from network); 25 Jan 2005 16:09:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 25 Jan 2005 16:09:55 -0000 Received: (qmail 7618 invoked by uid 500); 25 Jan 2005 16:09:51 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 7538 invoked by uid 500); 25 Jan 2005 16:09:50 -0000 Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list dev@ant.apache.org Received: (qmail 7517 invoked by uid 500); 25 Jan 2005 16:09:49 -0000 Received: (qmail 7507 invoked by uid 99); 25 Jan 2005 16:09:49 -0000 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from minotaur.apache.org (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.28) with SMTP; Tue, 25 Jan 2005 08:09:49 -0800 Received: (qmail 62364 invoked by uid 1539); 25 Jan 2005 16:09:48 -0000 Date: 25 Jan 2005 16:09:48 -0000 Message-ID: <20050125160948.62363.qmail@minotaur.apache.org> From: peterreilly@apache.org To: ant-cvs@apache.org Subject: cvs commit: ant/src/main/org/apache/tools/ant/taskdefs BUnzip2.java Chmod.java X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N peterreilly 2005/01/25 08:09:47 Modified: src/main/org/apache/tools/ant/taskdefs BUnzip2.java Chmod.java Log: javadoc Revision Changes Path 1.17 +8 -1 ant/src/main/org/apache/tools/ant/taskdefs/BUnzip2.java Index: BUnzip2.java =================================================================== RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/BUnzip2.java,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- BUnzip2.java 9 Mar 2004 16:48:04 -0000 1.16 +++ BUnzip2.java 25 Jan 2005 16:09:47 -0000 1.17 @@ -1,5 +1,5 @@ /* - * Copyright 2001-2002,2004 The Apache Software Foundation + * Copyright 2001-2002,2004-2005 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -39,10 +39,17 @@ private static final String DEFAULT_EXTENSION = ".bz2"; + /** + * Get the default extension. + * @return the string ".bz2" + */ protected String getDefaultExtension() { return DEFAULT_EXTENSION; } + /** + * Do the unbzipping. + */ protected void extract() { if (source.lastModified() > dest.lastModified()) { log("Expanding " + source.getAbsolutePath() + " to " 1.44 +36 -7 ant/src/main/org/apache/tools/ant/taskdefs/Chmod.java Index: Chmod.java =================================================================== RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/Chmod.java,v retrieving revision 1.43 retrieving revision 1.44 diff -u -r1.43 -r1.44 --- Chmod.java 9 Mar 2004 16:48:04 -0000 1.43 +++ Chmod.java 25 Jan 2005 16:09:47 -0000 1.44 @@ -1,5 +1,5 @@ /* - * Copyright 2000-2004 The Apache Software Foundation + * Copyright 2000-2005 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -60,7 +60,7 @@ /** * The file or single directory of which the permissions must be changed. - * @param src + * @param src the source file or directory. */ public void setFile(File src) { FileSet fs = new FileSet(); @@ -70,15 +70,15 @@ /** * The directory which holds the files whose permissions must be changed. - * @param src + * @param src the directory. */ public void setDir(File src) { defaultSet.setDir(src); } /** - * The new permissions. - * @param perm + * Set the new permissions. + * @param perm the new permissions. */ public void setPerm(String perm) { createArg().setValue(perm); @@ -87,6 +87,7 @@ /** * Add a name entry on the include list. + * @return a NameEntry to be configured. */ public PatternSet.NameEntry createInclude() { defaultSetDefined = true; @@ -95,6 +96,7 @@ /** * Add a name entry on the exclude list. + * @return a nameentry to be configured. */ public PatternSet.NameEntry createExclude() { defaultSetDefined = true; @@ -103,6 +105,7 @@ /** * Add a set of patterns. + * @return a patternset to be configured. */ public PatternSet createPatternSet() { defaultSetDefined = true; @@ -113,7 +116,7 @@ * Sets the set of include patterns. Patterns may be separated by a comma * or a space. * - * @param includes the string containing the include patterns + * @param includes the string containing the include patterns. */ public void setIncludes(String includes) { defaultSetDefined = true; @@ -124,7 +127,7 @@ * Sets the set of exclude patterns. Patterns may be separated by a comma * or a space. * - * @param excludes the string containing the exclude patterns + * @param excludes the string containing the exclude patterns. */ public void setExcludes(String excludes) { defaultSetDefined = true; @@ -143,6 +146,9 @@ defaultSet.setDefaultexcludes(useDefaultExcludes); } + /** + * Check the attributes and nested elements. + */ protected void checkConfiguration() { if (!havePerm) { throw new BuildException("Required attribute perm not set in chmod", @@ -155,6 +161,10 @@ super.checkConfiguration(); } + /** + * Carry out the chmoding. + * @throws BuildException on error. + */ public void execute() throws BuildException { /* * In Ant 1.1, means, change the permissions @@ -189,6 +199,10 @@ } /** + * Set the executable. + * This is not allowed for Chmod. + * @param e ignored. + * @throws BuildException always. * @ant.attribute ignore="true" */ public void setExecutable(String e) { @@ -197,6 +211,10 @@ } /** + * Set the command. + * This is not allowed for Chmod. + * @param cmdl ignored. + * @throws BuildException always. * @ant.attribute ignore="true" */ public void setCommand(Commandline cmdl) { @@ -205,6 +223,9 @@ } /** + * This is not allowed for Chmod. + * @param skip ignored. + * @throws BuildException always. * @ant.attribute ignore="true" */ public void setSkipEmptyFilesets(boolean skip) { @@ -213,6 +234,9 @@ } /** + * This is not allowed for Chmod. + * @param b ignored. + * @throws BuildException always. * @ant.attribute ignore="true" */ public void setAddsourcefile(boolean b) { @@ -220,6 +244,11 @@ + " doesn\'t support the addsourcefile attribute", getLocation()); } + /** + * Check if the os is valid. + * Always include unix. + * @return true if the os is valid. + */ protected boolean isValidOs() { return Os.isFamily("unix") && super.isValidOs(); } --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org