From depot-cvs-return-445-apmail-incubator-depot-cvs-archive=incubator.apache.org@incubator.apache.org Fri May 21 06:30:00 2004 Return-Path: Delivered-To: apmail-incubator-depot-cvs-archive@www.apache.org Received: (qmail 83808 invoked from network); 21 May 2004 06:30:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 21 May 2004 06:30:00 -0000 Received: (qmail 21763 invoked by uid 500); 21 May 2004 06:30:35 -0000 Delivered-To: apmail-incubator-depot-cvs-archive@incubator.apache.org Received: (qmail 21718 invoked by uid 500); 21 May 2004 06:30:35 -0000 Mailing-List: contact depot-cvs-help@incubator.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: depot-dev@incubator.apache.org Delivered-To: mailing list depot-cvs@incubator.apache.org Received: (qmail 21700 invoked by uid 98); 21 May 2004 06:30:35 -0000 Received: from nickchalko@apache.org by hermes.apache.org by uid 82 with qmail-scanner-1.20 (clamuko: 0.70. Clear:RC:0(209.237.227.194):. Processed in 0.032243 secs); 21 May 2004 06:30:35 -0000 X-Qmail-Scanner-Mail-From: nickchalko@apache.org via hermes.apache.org X-Qmail-Scanner: 1.20 (Clear:RC:0(209.237.227.194):. Processed in 0.032243 secs) Received: from unknown (HELO minotaur.apache.org) (209.237.227.194) by hermes.apache.org with SMTP; 21 May 2004 06:30:35 -0000 Received: (qmail 83794 invoked by uid 65534); 21 May 2004 06:29:59 -0000 Date: 21 May 2004 06:29:59 -0000 Message-ID: <20040521062959.83790.qmail@minotaur.apache.org> From: nickchalko@apache.org To: depot-cvs@incubator.apache.org Subject: svn commit: rev 20180 - incubator/depot/trunk/update/src/java/org/apache/depot/update/ant X-Spam-Rating: hermes.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Author: nickchalko Date: Thu May 20 23:29:58 2004 New Revision: 20180 Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/ant/AntUtils.java Log: Restored missing method. Modified: incubator/depot/trunk/update/src/java/org/apache/depot/update/ant/AntUtils.java ============================================================================== --- incubator/depot/trunk/update/src/java/org/apache/depot/update/ant/AntUtils.java (original) +++ incubator/depot/trunk/update/src/java/org/apache/depot/update/ant/AntUtils.java Thu May 20 23:29:58 2004 @@ -17,10 +17,6 @@ */ package org.apache.depot.update.ant; import java.io.File; -import java.util.List; - -import org.apache.depot.update.query.ResourceResult; -import org.apache.depot.update.resource.Resource; import org.apache.tools.ant.BuildException; import org.apache.tools.ant.Project; /** @@ -34,37 +30,6 @@ private AntUtils() { } /** - * find a property and then create and validate it - * - * @param p - * the ant Project - * @param dirProperty - * the property that has the dir path - * @return the dir, created if possille, null if not - */ - public static File findAndCreateDirFromProperty(Project p, - String dirProperty) { - String antletsDirName = p.getProperty(dirProperty); - File antletsDir = null; - if (null == antletsDirName) { - p.log(dirProperty + " not defined.", Project.MSG_DEBUG); - } else { - antletsDir = new File(antletsDirName); - if (!antletsDir.exists()) { - p.log("Unable to create dir " + antletsDir.getAbsolutePath(), - Project.MSG_WARN); - antletsDir = null; - } else if (!antletsDir.isDirectory()) { - throw new BuildException("Property ${" + dirProperty + "} -> [" - + antletsDir.getAbsolutePath() - + "] not a workable directory."); - } else { - p.log(dirProperty + " =" + antletsDir, Project.MSG_DEBUG); - } - } - return antletsDir; - } - /** * validate and create a dir if needed. Ignore if dir is null * * @param dir @@ -116,5 +81,36 @@ throw new BuildException("The property depot.home must be set"); } return depotHome; + } + /** + * find a property and then create and validate it + * + * @param p + * the ant Project + * @param dirProperty + * the property that has the dir path + * @return the dir, created if possille, null if not + */ + public static File findAndCreateDirFromProperty(Project p, + String dirProperty) { + String antletsDirName = p.getProperty(dirProperty); + File antletsDir = null; + if (null == antletsDirName) { + p.log(dirProperty + " not defined.", Project.MSG_DEBUG); + } else { + antletsDir = new File(antletsDirName); + if (!antletsDir.exists()) { + p.log("Unable to create dir " + antletsDir.getAbsolutePath(), + Project.MSG_WARN); + antletsDir = null; + } else if (!antletsDir.isDirectory()) { + throw new BuildException("Property ${" + dirProperty + "} -> [" + + antletsDir.getAbsolutePath() + + "] not a workable directory."); + } else { + p.log(dirProperty + " =" + antletsDir, Project.MSG_DEBUG); + } + } + return antletsDir; } }