You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@depot.apache.org by ni...@apache.org on 2004/05/21 06:29:59 UTC

svn commit: rev 20180 - incubator/depot/trunk/update/src/java/org/apache/depot/update/ant

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;
 	}
 }