geirm 01/03/22 17:01:15
Modified: src/java/org/apache/velocity/anakia AnakiaTask.java
Log:
Changed setTemplatePath() at the suggestion of Sam Ruby to make it work
transparently on other platforms, and invoked from other directories,
respecting ant's 'base' path.
Main motivation is to make work better with Gump for automated testbed
monitoring.
Revision Changes Path
1.28 +14 -5
jakarta-velocity/src/java/org/apache/velocity/anakia/AnakiaTask.java
Index: AnakiaTask.java
===================================================================
RCS file:
/home/cvs/jakarta-velocity/src/java/org/apache/velocity/anakia/AnakiaTask.java,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- AnakiaTask.java 2001/03/20 00:47:43 1.27
+++ AnakiaTask.java 2001/03/23 01:01:14 1.28
@@ -93,7 +93,7 @@
* <a href="http://jakarta.apache.org/velocity/anakia.html">Website</a>.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Jon S. Stevens</a>
- * @version $Id: AnakiaTask.java,v 1.27 2001/03/20 00:47:43 jon Exp $
+ * @version $Id: AnakiaTask.java,v 1.28 2001/03/23 01:01:14 geirm Exp $
*/
public class AnakiaTask extends MatchingTask
{
@@ -199,11 +199,20 @@
* a Velocity.properties file, therefore using Velocity's defaults
* only.
*/
- public void setTemplatePath(String templatePath)
- {
- this.templatePath = templatePath;
- }
+ public void setTemplatePath(File templatePath)
+ {
+ try
+ {
+ this.templatePath = templatePath.getCanonicalPath();
+ }
+ catch (java.io.IOException ioe)
+ {
+ throw new BuildException(ioe);
+ }
+ }
+
+
/**
* Allow people to set the path to the velocity.properties file
* This file is found relative to the path where the JVM was run.