velocity-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ge...@apache.org
Subject cvs commit: jakarta-velocity/src/java/org/apache/velocity/texen/ant TexenTask.java
Date Fri, 23 Mar 2001 03:46:00 GMT
geirm       01/03/22 19:46:00

  Modified:    src/java/org/apache/velocity/texen/ant TexenTask.java
  Log:
  More generalization.
  
  (Helps with the gumpization...)
  
  Revision  Changes    Path
  1.19      +19 -6     jakarta-velocity/src/java/org/apache/velocity/texen/ant/TexenTask.java
  
  Index: TexenTask.java
  ===================================================================
  RCS file: /home/cvs/jakarta-velocity/src/java/org/apache/velocity/texen/ant/TexenTask.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- TexenTask.java	2001/03/23 01:02:23	1.18
  +++ TexenTask.java	2001/03/23 03:46:00	1.19
  @@ -77,7 +77,7 @@
    * An ant task for generating output by using Velocity
    *
    * @author <a href="mailto:jvanzyl@periapt.com">Jason van Zyl</a>
  - * @version $Id: TexenTask.java,v 1.18 2001/03/23 01:02:23 geirm Exp $
  + * @version $Id: TexenTask.java,v 1.19 2001/03/23 03:46:00 geirm Exp $
    */
   
   public class TexenTask extends Task
  @@ -187,11 +187,18 @@
        * Set the output directory. It will be
        * created if it doesn't exist.
        */
  -    public void setOutputDirectory(String outputDirectory)
  +    public void setOutputDirectory(File outputDirectory)
       {
  -        this.outputDirectory = outputDirectory;
  +        try
  +        {
  +            this.outputDirectory = outputDirectory.getCanonicalPath();
  +        }
  +        catch (java.io.IOException ioe)
  +        {
  +            throw new BuildException(ioe);
  +        }
       }
  -    
  +      
       /**
        * Get the output directory.
        */
  @@ -223,7 +230,7 @@
        * fed into the initial context be the
        * generating process starts.
        */
  -    public void setContextProperties(String file)
  +    public void setContextProperties( File file )
       {
           contextProperties = new Properties();
           
  @@ -372,7 +379,13 @@
                            */
                           if (property.endsWith("file.contents"))
                           {
  -                            value = StringUtils.fileContentsToString(value);
  +                            /*
  +                             *  we need to turn the license file from relative to
  +                             *  absolute, and let Ant help :)
  +                             */
  +
  +                            value = StringUtils.fileContentsToString(   
  +                                      project.resolveFile(value).getCanonicalPath() );
                               
                               property = property.substring(
                                   0, property.indexOf("file.contents") - 1);
  
  
  

Mime
View raw message