Return-Path: Delivered-To: apmail-jakarta-ant-dev-archive@apache.org Received: (qmail 64996 invoked from network); 6 Mar 2002 09:33:30 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 6 Mar 2002 09:33:30 -0000 Received: (qmail 14465 invoked by uid 97); 6 Mar 2002 09:33:24 -0000 Delivered-To: qmlist-jakarta-archive-ant-dev@jakarta.apache.org Received: (qmail 14358 invoked by uid 97); 6 Mar 2002 09:33:23 -0000 Mailing-List: contact ant-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list ant-dev@jakarta.apache.org Received: (qmail 14241 invoked by uid 97); 6 Mar 2002 09:33:22 -0000 Date: 6 Mar 2002 09:33:08 -0000 Message-ID: <20020306093308.61199.qmail@icarus.apache.org> From: donaldp@apache.org To: jakarta-ant-cvs@apache.org Subject: cvs commit: jakarta-ant/proposal/myrmidon build.xml antlib.xml X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N donaldp 02/03/06 01:33:08 Modified: proposal/myrmidon/src/make/org/apache/myrmidon/build AntlibDescriptorTask.java proposal/myrmidon build.xml antlib.xml Added: proposal/myrmidon/src/make/org/apache/myrmidon/build AntDocSubTask.java Log: Start to integrate antdocs generation into build process. Revision Changes Path 1.2 +14 -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.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- AntlibDescriptorTask.java 1 Mar 2002 01:44:04 -0000 1.1 +++ AntlibDescriptorTask.java 6 Mar 2002 09:33:08 -0000 1.2 @@ -25,13 +25,14 @@ public class AntlibDescriptorTask extends DocletTask { + private static final String DESCRIPTOR_TEMPLATE = "/org/apache/myrmidon/build/ant-descriptor.j"; + private static final String ROLES_TEMPLATE = "/org/apache/myrmidon/build/ant-roles.j"; + + private TemplateSubTask m_antDocs; private String m_libName; private String m_descriptorFileName; private String m_rolesFileName; - private static final String DESCRIPTOR_TEMPLATE = "/ant-descriptor.template"; - private static final String ROLES_TEMPLATE = "/ant-roles.template"; - /** * Specifies the Antlib name, which is used to name the generated files. */ @@ -56,6 +57,11 @@ m_rolesFileName = rolesFileName; } + public void addAntdoc( final AntDocSubTask antDocs ) + { + m_antDocs = antDocs; + } + public void execute() throws BuildException { // Add the base directories of all the filesets to the sourcepath @@ -75,6 +81,11 @@ final TemplateSubTask rolesTemplate = makeTemplateSubTask( ROLES_TEMPLATE, getRolesFileName() ); addTemplate( rolesTemplate ); + + if( null != m_antDocs ) + { + addTemplate( m_antDocs ); + } if( !upToDate() ) { 1.1 jakarta-ant/proposal/myrmidon/src/make/org/apache/myrmidon/build/AntDocSubTask.java Index: AntDocSubTask.java =================================================================== /* * Copyright (C) The Apache Software Foundation. All rights reserved. * * This software is published under the terms of the Apache Software License * version 1.1, a copy of which has been included with this distribution in * the LICENSE.txt file. */ package org.apache.myrmidon.build; import com.sun.javadoc.ClassDoc; import java.io.File; import java.net.URL; import xdoclet.TemplateSubTask; import xdoclet.XDocletException; /** * Generates the XML Documentation for Ant types (including tasks and DataTypes). * * @author Peter Donald * @version $Revision: 1.1 $ $Date: 2002/03/06 09:33:08 $ */ 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 = "/org/apache/myrmidon/build/type.j"; private File m_docsDestDir; public AntDocSubTask() { setTemplateFile( new File( DEFAULT_TEMPLATE_FILE ) ); setDestinationFile( GENERATED_FILE_NAME ); final TemplateSubTask.ExtentTypes extent = new TemplateSubTask.ExtentTypes(); extent.setValue( "hierarchy" ); setExtent( extent ); } /** * Specifies the directory that is the destination of generated generated * xml documentation for types. */ public void setDocsDestDir( final File docsDestDir ) { m_docsDestDir = docsDestDir; } public String getSubTaskName() { return SUBTASK_NAME; } /** * Called to validate configuration parameters. */ public void validateOptions() throws XDocletException { super.validateOptions(); if( null == m_docsDestDir ) { throw new XDocletException( "'docsDestDir' attribute is missing ." ); } } protected boolean matchesGenerationRules( final ClassDoc clazz ) throws XDocletException { if( !super.matchesGenerationRules( clazz ) ) { return false; } else if( clazz.isAbstract() ) { return false; } else { return true; } } } 1.66 +18 -4 jakarta-ant/proposal/myrmidon/build.xml Index: build.xml =================================================================== RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/build.xml,v retrieving revision 1.65 retrieving revision 1.66 diff -u -r1.65 -r1.66 --- build.xml 1 Mar 2002 02:13:35 -0000 1.65 +++ build.xml 6 Mar 2002 09:33:08 -0000 1.66 @@ -185,12 +185,15 @@ + - - + + + + @@ -320,6 +323,15 @@ + + + + + + + + + @@ -357,12 +369,13 @@ + - - + + @@ -373,6 +386,7 @@ + 1.6 +3 -0 jakarta-ant/proposal/myrmidon/antlib.xml Index: antlib.xml =================================================================== RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/antlib.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- antlib.xml 1 Mar 2002 02:13:35 -0000 1.5 +++ antlib.xml 6 Mar 2002 09:33:08 -0000 1.6 @@ -18,6 +18,7 @@ + @@ -36,6 +37,7 @@ + @@ -59,6 +61,7 @@ + -- To unsubscribe, e-mail: For additional commands, e-mail: