From 610d15a15b039662b1dd9020448a62b1023799a0 Mon Sep 17 00:00:00 2001 From: Peter Donald Date: Wed, 6 Mar 2002 10:59:51 +0000 Subject: [PATCH] Use URLs directly rather than go via a FIle. This allows temp[lates to be stored inside jar git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271774 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/myrmidon/build/AntlibDescriptorTask.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/proposal/myrmidon/src/make/org/apache/myrmidon/build/AntlibDescriptorTask.java b/proposal/myrmidon/src/make/org/apache/myrmidon/build/AntlibDescriptorTask.java index 88f593764..1b2e038d9 100644 --- a/proposal/myrmidon/src/make/org/apache/myrmidon/build/AntlibDescriptorTask.java +++ b/proposal/myrmidon/src/make/org/apache/myrmidon/build/AntlibDescriptorTask.java @@ -10,6 +10,7 @@ package org.apache.myrmidon.build; 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 @@ public class AntlibDescriptorTask 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; }