cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kmen...@apache.org
Subject svn commit: r592253 - in /cayenne/main/branches/STABLE-2.0/cayenne: cayenne-java/src/cayenne/java/org/apache/cayenne/tools/CayenneTask.java cayenne-other/release-notes/RELEASE-NOTES-2.0-SNAPSHOT.txt
Date Tue, 06 Nov 2007 03:48:28 GMT
Author: kmenard
Date: Mon Nov  5 19:48:27 2007
New Revision: 592253

URL: http://svn.apache.org/viewvc?rev=592253&view=rev
Log:
Fixed WWW-263: cdbgen (DbGeneratorTask) must support classpath and classpathref.

Modified:
    cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/tools/CayenneTask.java
    cayenne/main/branches/STABLE-2.0/cayenne/cayenne-other/release-notes/RELEASE-NOTES-2.0-SNAPSHOT.txt

Modified: cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/tools/CayenneTask.java
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/tools/CayenneTask.java?rev=592253&r1=592252&r2=592253&view=diff
==============================================================================
--- cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/tools/CayenneTask.java
(original)
+++ cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/cayenne/java/org/apache/cayenne/tools/CayenneTask.java
Mon Nov  5 19:48:27 2007
@@ -21,15 +21,50 @@
 
 import org.apache.log4j.BasicConfigurator;
 import org.apache.tools.ant.Task;
+import org.apache.tools.ant.types.Path;
+import org.apache.tools.ant.types.Reference;
 import org.apache.cayenne.conf.Configuration;
 
 /**
  * A superclass of Cayenne Ant tasks. Performs some common setup
  * 
- * @author Andrei Adamchik
+ * @author Andrei Adamchik, Kevin Menard
  * @since 1.2
  */
 public abstract class CayenneTask extends Task {
+
+	protected Path classpath;
+	
+	/**
+     * Sets the classpath used by the task.
+     *
+     * @param path The classpath to set.
+     */
+    public void setClasspath(Path path) {
+        createClasspath().append(path);
+    }
+
+    /**
+     * Sets the classpath reference used by the task.
+     *
+     * @param reference The classpath reference to set.
+     */
+    public void setClasspathRef(Reference reference) {
+        createClasspath().setRefid(reference);
+    }
+
+    /**
+     * Convenience method for creating a classpath instance to be used for the task.
+     *
+     * @return The new classpath.
+     */
+    private Path createClasspath() {
+        if (null == classpath) {
+            classpath = new Path(getProject());
+        }
+
+        return classpath.createPath();
+    }
 
     /**
      * Sets up logging to be in line with the Ant logging system. It should be called by

Modified: cayenne/main/branches/STABLE-2.0/cayenne/cayenne-other/release-notes/RELEASE-NOTES-2.0-SNAPSHOT.txt
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-2.0/cayenne/cayenne-other/release-notes/RELEASE-NOTES-2.0-SNAPSHOT.txt?rev=592253&r1=592252&r2=592253&view=diff
==============================================================================
--- cayenne/main/branches/STABLE-2.0/cayenne/cayenne-other/release-notes/RELEASE-NOTES-2.0-SNAPSHOT.txt
(original)
+++ cayenne/main/branches/STABLE-2.0/cayenne/cayenne-other/release-notes/RELEASE-NOTES-2.0-SNAPSHOT.txt
Mon Nov  5 19:48:27 2007
@@ -8,8 +8,19 @@
 http://issues.apache.org/cayenne/
 
 ----------------------------------
-Release: 2.0.4
+Release: 2.0.5
 Date: 
+----------------------------------
+Changes:
+
+CAY-263 cdbgen (DbGeneratorTask) must support classpath and classpathref
+
+Bug fixes:
+
+
+----------------------------------
+Release: 2.0.4
+Date: 10/12/2007
 ----------------------------------
 CAY-698 "Null ObjectId" exception from DataContext.localObject()
 CAY-770 bug / memory leak in DispatchQueue and EventManager



Mime
View raw message