From 79944e317a4a650421f67b3d03cfa929b28febf2 Mon Sep 17 00:00:00 2001 From: Peter Donald Date: Wed, 6 Mar 2002 10:57:27 +0000 Subject: [PATCH] Suck manifest out of classpath git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271772 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/myrmidon/build/AntDocSubTask.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/proposal/myrmidon/src/make/org/apache/myrmidon/build/AntDocSubTask.java b/proposal/myrmidon/src/make/org/apache/myrmidon/build/AntDocSubTask.java index cdce80a50..c0f5adcae 100644 --- a/proposal/myrmidon/src/make/org/apache/myrmidon/build/AntDocSubTask.java +++ b/proposal/myrmidon/src/make/org/apache/myrmidon/build/AntDocSubTask.java @@ -19,21 +19,23 @@ import xdoclet.XDocletException; * @author Peter Donald * @version $Revision$ $Date$ */ -public class AntDocSubTask +public class AntDocSubTask extends TemplateSubTask { public final static String SUBTASK_NAME = "antdoc"; private static final String GENERATED_FILE_NAME = "{0}.xml"; - private static final String DEFAULT_TEMPLATE_FILE = + private static final String DEFAULT_TEMPLATE_FILE = "/org/apache/myrmidon/build/type.j"; private File m_docsDestDir; public AntDocSubTask() { - setTemplateFile( new File( DEFAULT_TEMPLATE_FILE ) ); setDestinationFile( GENERATED_FILE_NAME ); + final String templateFile = + getClass().getResource( DEFAULT_TEMPLATE_FILE ).getFile(); + setTemplateFile( new File( templateFile ) ); final TemplateSubTask.ExtentTypes extent = new TemplateSubTask.ExtentTypes(); extent.setValue( "hierarchy" ); @@ -41,7 +43,7 @@ public class AntDocSubTask } /** - * Specifies the directory that is the destination of generated generated + * Specifies the directory that is the destination of generated generated * xml documentation for types. */ public void setDocsDestDir( final File docsDestDir ) @@ -57,7 +59,7 @@ public class AntDocSubTask /** * Called to validate configuration parameters. */ - public void validateOptions() + public void validateOptions() throws XDocletException { super.validateOptions();