commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From je...@apache.org
Subject cvs commit: jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/task JellyTask.java
Date Wed, 09 Oct 2002 07:04:29 GMT
jefft       2002/10/09 00:04:29

  Modified:    jelly/src/java/org/apache/commons/jelly/task JellyTask.java
  Log:
  Use Ant's Project.resolveFile() method to resolve scripts. This prevents "no
  protocol" errors when a jelly-using Ant script is invoked from a directory
  other than where the script lives.
  
  Revision  Changes    Path
  1.9       +1 -1      jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/task/JellyTask.java
  
  Index: JellyTask.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/task/JellyTask.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- JellyTask.java	5 Oct 2002 13:21:13 -0000	1.8
  +++ JellyTask.java	9 Oct 2002 07:04:29 -0000	1.9
  @@ -193,7 +193,7 @@
        * @return the URL for the relative file name or absolute URL 
        */
       protected URL resolveURL(String name) throws MalformedURLException {
  -        File file = new File(name);
  +		File file = project.resolveFile(name);
           if (file.exists()) {
               return file.toURL();
           }
  
  
  

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message