Return-Path: Delivered-To: apmail-cocoon-cvs-archive@www.apache.org Received: (qmail 79773 invoked from network); 13 Jan 2005 06:21:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 13 Jan 2005 06:21:54 -0000 Received: (qmail 80581 invoked by uid 500); 13 Jan 2005 06:21:53 -0000 Delivered-To: apmail-cocoon-cvs-archive@cocoon.apache.org Received: (qmail 80523 invoked by uid 500); 13 Jan 2005 06:21:53 -0000 Mailing-List: contact cvs-help@cocoon.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@cocoon.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list cvs@cocoon.apache.org Received: (qmail 80510 invoked by uid 99); 13 Jan 2005 06:21:53 -0000 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from minotaur.apache.org (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.28) with SMTP; Wed, 12 Jan 2005 22:21:53 -0800 Received: (qmail 79693 invoked by uid 65534); 13 Jan 2005 06:21:52 -0000 Date: 13 Jan 2005 06:21:52 -0000 Message-ID: <20050113062152.79689.qmail@minotaur.apache.org> From: crossley@apache.org To: cvs@cocoon.apache.org Subject: svn commit: r125046 - /cocoon/trunk/tools/src/anttasks/SitemapTask.java MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Author: crossley Date: Wed Jan 12 22:21:50 2005 New Revision: 125046 URL: http://svn.apache.org/viewcvs?view=rev&rev=125046 Log: Merge changes from 2_1_X branch. Record the list of sitemap-components. Modified: cocoon/trunk/tools/src/anttasks/SitemapTask.java Modified: cocoon/trunk/tools/src/anttasks/SitemapTask.java Url: http://svn.apache.org/viewcvs/cocoon/trunk/tools/src/anttasks/SitemapTask.java?view=diff&rev=125046&p1=cocoon/trunk/tools/src/anttasks/SitemapTask.java&r1=125045&p2=cocoon/trunk/tools/src/anttasks/SitemapTask.java&r2=125046 ============================================================================== --- cocoon/trunk/tools/src/anttasks/SitemapTask.java (original) +++ cocoon/trunk/tools/src/anttasks/SitemapTask.java Wed Jan 12 22:21:50 2005 @@ -15,6 +15,7 @@ */ import java.io.File; +import java.io.FileWriter; import java.io.IOException; import java.net.MalformedURLException; import java.util.ArrayList; @@ -212,6 +213,7 @@ private List collectInfo() { log("Collecting sitemap components info"); final List components = new ArrayList(); + final List allComponentNames = new ArrayList(); final Iterator it = super.allClasses.iterator(); @@ -220,6 +222,17 @@ final DocletTag tag = javaClass.getTagByName( NAME_TAG ); + if ( javaClass.isA(ACTION) + || javaClass.isA(GENERATOR) + || javaClass.isA(MATCHER) + || javaClass.isA(PIPELINE) + || javaClass.isA(READER) + || javaClass.isA(SELECTOR) + || javaClass.isA(SERIALIZER) + || javaClass.isA(TRANSFORMER)) { + allComponentNames.add(javaClass.getFullyQualifiedName()); + } + if ( null != tag ) { final SitemapComponent comp = new SitemapComponent( javaClass ); @@ -227,6 +240,28 @@ components.add(comp); } } + + // Generate a list of all sitemap components + final String fileSeparator = System.getProperty("file.separator", "/"); + final String matchString = "blocks" + fileSeparator; + final String outputFname = "build" + fileSeparator + "all-sitemap-components" + + (directory.endsWith(matchString) ? "-blocks" : "") + ".txt"; + log("Listing all sitemap components to " + outputFname); + try { + File outputFile = new File(outputFname); + FileWriter out = new FileWriter(outputFile); + final String lineSeparator = System.getProperty("line.separator", "\n"); + final Iterator iter = allComponentNames.iterator(); + while ( iter.hasNext() ) { + out.write((String)iter.next()); + out.write(lineSeparator); + } + out.close(); + } + catch (IOException ioe) { + log("IOException: " + ioe); + } + return components; } @@ -417,7 +452,6 @@ Document doc = parent.getOwnerDocument(); Node node; - // first check: deprecated? if ( SitemapTask.this.deprecated || this.getTagValue("deprecated", null) != null ) { indent(parent, 3); @@ -746,7 +780,6 @@ throw new BuildException(e); } } - } // Class Constants