ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-ant/proposal/myrmidon/src/make/org/apache/myrmidon/build AntlibDescriptorTask.java
Date Wed, 06 Mar 2002 10:59:51 GMT
donaldp     02/03/06 02:59:51

  Modified:    proposal/myrmidon/src/make/org/apache/myrmidon/build
                        AntlibDescriptorTask.java
  Log:
  Use URLs directly rather than go via a FIle.
  
  This allows temp[lates to be stored inside jar
  
  Revision  Changes    Path
  1.3       +3 -3      jakarta-ant/proposal/myrmidon/src/make/org/apache/myrmidon/build/AntlibDescriptorTask.java
  
  Index: AntlibDescriptorTask.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/make/org/apache/myrmidon/build/AntlibDescriptorTask.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AntlibDescriptorTask.java	6 Mar 2002 09:33:08 -0000	1.2
  +++ AntlibDescriptorTask.java	6 Mar 2002 10:59:51 -0000	1.3
  @@ -10,6 +10,7 @@
   import java.io.File;
   import java.util.Iterator;
   import java.util.Vector;
  +import java.net.URL;
   import org.apache.tools.ant.BuildException;
   import org.apache.tools.ant.taskdefs.UpToDate;
   import org.apache.tools.ant.types.FileSet;
  @@ -102,9 +103,8 @@
                                                    final String destinationFile )
       {
           final TemplateSubTask templateSubTask = new TemplateSubTask();
  -        final String templateFile =
  -            getClass().getResource( templateLocation ).getFile();
  -        templateSubTask.setTemplateFile( new File( templateFile ) );
  +        final URL resource = getClass().getResource( templateLocation );
  +        templateSubTask.setTemplateURL( resource );
           templateSubTask.setDestinationFile( destinationFile );
           return templateSubTask;
       }
  
  
  

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


Mime
View raw message