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-myrmidon/tools/xdoclet xdoclet-20021804.jar xjavadoc-20021804.jar xdoclet.jar
Date Thu, 02 May 2002 09:54:01 GMT
donaldp     02/05/02 02:54:01

  Modified:    buildtools/src/java/org/apache/myrmidon/build
                        AntDocSubTask.java AntlibDescriptorTask.java
  Added:       tools/xdoclet xdoclet-20021804.jar xjavadoc-20021804.jar
  Removed:     tools/xdoclet xdoclet.jar
  Log:
  Update to latest and greatest xdoclet.
  
  Revision  Changes    Path
  1.2       +3 -3      jakarta-ant-myrmidon/buildtools/src/java/org/apache/myrmidon/build/AntDocSubTask.java
  
  Index: AntDocSubTask.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/buildtools/src/java/org/apache/myrmidon/build/AntDocSubTask.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AntDocSubTask.java	14 Apr 2002 11:16:17 -0000	1.1
  +++ AntDocSubTask.java	2 May 2002 09:54:01 -0000	1.2
  @@ -7,17 +7,17 @@
    */
   package org.apache.myrmidon.build;
   
  -import com.sun.javadoc.ClassDoc;
   import java.io.File;
   import java.net.URL;
   import xdoclet.TemplateSubTask;
   import xdoclet.XDocletException;
  +import xjavadoc.XClass;
   
   /**
    * Generates the XML Documentation for Ant types (including tasks and DataTypes).
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.1 $ $Date: 2002/04/14 11:16:17 $
  + * @version $Revision: 1.2 $ $Date: 2002/05/02 09:54:01 $
    */
   public class AntDocSubTask
       extends TemplateSubTask
  @@ -69,7 +69,7 @@
           }
       }
   
  -    protected boolean matchesGenerationRules( final ClassDoc clazz )
  +    protected boolean matchesGenerationRules( final XClass clazz )
           throws XDocletException
       {
           if( !super.matchesGenerationRules( clazz ) )
  
  
  
  1.2       +9 -48     jakarta-ant-myrmidon/buildtools/src/java/org/apache/myrmidon/build/AntlibDescriptorTask.java
  
  Index: AntlibDescriptorTask.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/buildtools/src/java/org/apache/myrmidon/build/AntlibDescriptorTask.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AntlibDescriptorTask.java	14 Apr 2002 11:16:17 -0000	1.1
  +++ AntlibDescriptorTask.java	2 May 2002 09:54:01 -0000	1.2
  @@ -7,13 +7,8 @@
    */
   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;
  +import java.util.List;
   import xdoclet.DocletTask;
   import xdoclet.TemplateSubTask;
   
  @@ -63,36 +58,25 @@
           m_antDocs = antDocs;
       }
   
  -    public void execute() throws BuildException
  +    protected List getSubTasks()
       {
  -        // Add the base directories of all the filesets to the sourcepath
  -        final Vector filesets = getFilesets();
  -        for( int i = 0; i < filesets.size(); i++ )
  +        final List subtasks = super.getSubTasks();
  +
  +        if( null != m_antDocs )
           {
  -            final FileSet fileSet = (FileSet)filesets.elementAt(i );
  -            final File basedir = fileSet.getDir( project );
  -            createSourcepath().setLocation( basedir );
  +            subtasks.add( m_antDocs );
           }
   
           // Add template subtasks.
           final TemplateSubTask descriptorTemplate =
               makeTemplateSubTask( DESCRIPTOR_TEMPLATE, getDescriptorFileName() );
  -        addTemplate( descriptorTemplate );
  +        subtasks.add( descriptorTemplate );
   
           final TemplateSubTask rolesTemplate =
               makeTemplateSubTask( ROLES_TEMPLATE, getRolesFileName() );
  -        addTemplate( rolesTemplate );
  -
  -        if( null != m_antDocs )
  -        {
  -            addTemplate( m_antDocs );
  -        }
  +        subtasks.add( rolesTemplate );
   
  -        if( !upToDate() )
  -        {
  -            log( "Generating Antlib descriptors for: " + m_libName );
  -            super.execute();
  -        }
  +        return subtasks;
       }
   
       /**
  @@ -110,33 +94,11 @@
       }
   
       /**
  -     * Checks if the descriptor file is up-to-date.
  -     */
  -    private boolean upToDate()
  -    {
  -        // Use the UpToDate task to check if descriptors are up-to-date.
  -        final UpToDate uptodateTask = (UpToDate)project.createTask( "uptodate" );
  -
  -        final File destFile = new File( getDestDir(), getDescriptorFileName() );
  -        uptodateTask.setTargetFile( destFile );
  -
  -        final Iterator filesets = getFilesets().iterator();
  -        while( filesets.hasNext() )
  -        {
  -            final FileSet fileSet = (FileSet)filesets.next();
  -            uptodateTask.addSrcfiles( fileSet );
  -        }
  -
  -        return uptodateTask.eval();
  -    }
  -
  -    /**
        * Return the filename for the antlib type descriptor. If not specified,
        * the default filename is returned.
        */
       private String getDescriptorFileName()
       {
  -
           if( m_descriptorFileName == null )
           {
               return m_libName + "-ant-descriptor.xml";
  @@ -162,5 +124,4 @@
               return m_rolesFileName;
           }
       }
  -
   }
  
  
  
  1.1                  jakarta-ant-myrmidon/tools/xdoclet/xdoclet-20021804.jar
  
  	<<Binary file>>
  
  
  1.1                  jakarta-ant-myrmidon/tools/xdoclet/xjavadoc-20021804.jar
  
  	<<Binary file>>
  
  

--
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