cziegeler    2004/03/10 01:08:26

  Modified:    tools/src/anttasks ManifestToolTask.java XConfToolTask.java
               tools/src blocks-build.xsl check-jars.xsl
               tools/src/loader Loader.java
  Log:
  Add license to tools/src (and add changes from 2.1.x branch)
  
  Revision  Changes    Path
  1.3       +8 -7      cocoon-2.2/tools/src/anttasks/ManifestToolTask.java
  
  Index: ManifestToolTask.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.2/tools/src/anttasks/ManifestToolTask.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ManifestToolTask.java     8 Mar 2004 14:04:19 -0000       1.2
  +++ ManifestToolTask.java     10 Mar 2004 09:08:25 -0000      1.3
  @@ -13,11 +13,13 @@
    * See the License for the specific language governing permissions and
    * limitations under the License.
    */
  -import java.io.*;
  -import java.util.*;
  -import org.apache.tools.ant.*;
  -import org.apache.tools.ant.taskdefs.*;
  -import org.apache.tools.ant.types.*;
  +
  +import java.io.File;
  +import java.io.FileWriter;
  +import java.io.IOException;
  +
  +import org.apache.tools.ant.BuildException;
  +import org.apache.tools.ant.Task;
   
   /**
    * Creates Manifest file with the all the JARs and modification dates
  @@ -89,7 +91,6 @@
                       w.write("\n");
                   }
               }
  -
           }
           w.close();
       }
  
  
  
  1.11      +118 -64   cocoon-2.2/tools/src/anttasks/XConfToolTask.java
  
  Index: XConfToolTask.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.2/tools/src/anttasks/XConfToolTask.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- XConfToolTask.java        8 Mar 2004 14:04:19 -0000       1.10
  +++ XConfToolTask.java        10 Mar 2004 09:08:25 -0000      1.11
  @@ -13,16 +13,18 @@
    * See the License for the specific language governing permissions and
    * limitations under the License.
    */
  +
   import org.apache.tools.ant.BuildException;
   import org.apache.tools.ant.DirectoryScanner;
   import org.apache.tools.ant.Project;
  -import org.apache.tools.ant.Task;
   import org.apache.tools.ant.taskdefs.MatchingTask;
   import org.apache.tools.ant.types.XMLCatalog;
   import org.apache.xpath.XPathAPI;
   import org.w3c.dom.Document;
   import org.w3c.dom.DocumentType;
  +import org.w3c.dom.DOMException;
   import org.w3c.dom.Element;
  +import org.w3c.dom.NamedNodeMap;
   import org.w3c.dom.NodeList;
   import org.w3c.dom.Node;
   import org.xml.sax.SAXException;
  @@ -30,24 +32,31 @@
   import javax.xml.parsers.DocumentBuilderFactory;
   import javax.xml.parsers.DocumentBuilder;
   import javax.xml.parsers.ParserConfigurationException;
  -import javax.xml.transform.sax.SAXTransformerFactory;
   import javax.xml.transform.OutputKeys;
   import javax.xml.transform.TransformerFactory;
   import javax.xml.transform.Transformer;
  -import javax.xml.transform.Source;
  -import javax.xml.transform.Result;
   import javax.xml.transform.TransformerException;
   import javax.xml.transform.dom.DOMSource;
   import javax.xml.transform.stream.StreamResult;
   import java.io.File;
  -import java.io.FileInputStream;
  -import java.io.FileWriter;
   import java.io.IOException;
   import java.net.UnknownHostException;
   
   /**
    * Ant task to patch xmlfiles.
    *
  + * 
  + * replace-properties no|false,anything else
  + * xpath: xpath expression for context node
  + * unless-path: xpath expression that must return empty node set
  + * unless: (deprecated) xpath expression that must return empty node set
  + * if-prop: use path file only when project property is set
  + * remove: xpath expression to remove before adding nodes
  + * add-attribute: name of attribute to add to context node (requires value)
  + * value: value of attribute to add to context node (requires add-attribute)
  + * insert-before: xpath expression, add new nodes before
  + * insert-after: xpath expression, add new nodes after
  + * 
    * @author <a href="mailto:[EMAIL PROTECTED]">Carsten Ziegeler</a>
    * @author <a href="mailto:[EMAIL PROTECTED]">Vadim Gritsenko</a>
    * @author <a href="mailto:[EMAIL PROTECTED]">Marcus Crafter</a>
  @@ -60,7 +69,7 @@
       private static final String NL=System.getProperty("line.separator");
       private static final String FSEP=System.getProperty("file.separator");
       private File file;
  -    private File directory;
  +    //private File directory;
       private File srcdir;
       private boolean addComments;
       /** for resolving entities such as dtds */
  @@ -89,8 +98,7 @@
        *
        * @param xmlCatalog the XMLCatalog instance to use to look up DTDs
        */
  -    public void addConfiguredXMLCatalog(XMLCatalog xmlCatalog)
  -    {
  +    public void addConfiguredXMLCatalog(XMLCatalog xmlCatalog) {
         this.xmlCatalog.addConfiguredXMLCatalog(xmlCatalog);
       }
   
  @@ -105,8 +113,7 @@
       /**
        * Initialize internal instance of XMLCatalog
        */
  -    public void init() throws BuildException
  -    {
  +    public void init() throws BuildException {
         super.init();
         xmlCatalog.setProject(project);
       }
  @@ -115,12 +122,9 @@
        * Execute task.
        */
       public void execute() throws BuildException {
  -
  -        if (this.file==null) {
  -            throw new BuildException("file attribute is required",
  -                                     location);
  +        if (this.file == null) {
  +            throw new BuildException("file attribute is required", location);
           }
  -
           try {
               final DocumentBuilderFactory builderFactory = 
DocumentBuilderFactory.newInstance();
               builderFactory.setValidating(false);
  @@ -128,7 +132,7 @@
               builderFactory.setNamespaceAware(false);
               builderFactory.setAttribute(
                   
"http://apache.org/xml/features/nonvalidating/load-external-dtd";,
  -                new Boolean(false));
  +                Boolean.FALSE);
               final DocumentBuilder builder = 
builderFactory.newDocumentBuilder();
               final Transformer transformer = 
TransformerFactory.newInstance().newTransformer();
   
  @@ -136,17 +140,16 @@
               log("Reading: " + this.file, Project.MSG_DEBUG);
               final Document document = 
builder.parse(this.file.toURL().toExternalForm());
   
  -            if (this.srcdir==null)
  +            if (this.srcdir == null) {
                   this.srcdir = project.resolveFile(".");
  +            }
   
               DirectoryScanner scanner = getDirectoryScanner(this.srcdir);
  -
               String[] list = scanner.getIncludedFiles();
  -
               boolean hasChanged = false;
               // process recursive
               File patchfile;
  -            for (int i = 0; i<list.length; i++) {
  +            for (int i = 0; i < list.length; i++) {
                   patchfile = new File(this.srcdir, list[i]);
                   try {
                       // Adds configuration snippet from the file to the 
configuration
  @@ -159,7 +162,7 @@
               }
   
               if (hasChanged) {
  -                log("Writing: "+this.file);
  +                log("Writing: " + this.file);
                   // Set the DOCTYPE output option on the transformer 
                   // if we have any DOCTYPE declaration in the input xml 
document
                   final DocumentType doctype = document.getDoctype();
  @@ -176,13 +179,15 @@
               throw new BuildException("TransformerException: "+e);
           } catch (SAXException e) {
               throw new BuildException("SAXException: "+e);
  +        } catch (DOMException e) {
  +            throw new BuildException("DOMException:" +e);           
           } catch (ParserConfigurationException e) {
               throw new BuildException("ParserConfigurationException: "+e);
           } catch (UnknownHostException e) {
               throw new BuildException("UnknownHostException.  Probable cause: 
The parser is " +
  -              "trying to resolve a dtd from the internet and no connection 
exists.\n" +
  -              "You can either connect to the internet during the build, or 
patch \n" +
  -              "XConfToolTask.java to ignore DTD declarations when your 
parser is in use.");
  +                "trying to resolve a dtd from the internet and no connection 
exists.\n" +
  +                "You can either connect to the internet during the build, or 
patch \n" +
  +                "XConfToolTask.java to ignore DTD declarations when your 
parser is in use.");
           } catch (IOException ioe) {
               throw new BuildException("IOException: "+ioe);
           }
  @@ -190,7 +195,7 @@
   
       /**
        * Patch XML document with a given patch file.
  -     *
  +     * 
        * @param configuration Orginal document
        * @param component Patch document
        * @param file Patch file
  @@ -200,55 +205,62 @@
       private boolean patch(final Document configuration,
                             final Document component,
                             String file)
  -                          throws TransformerException, IOException {
  +                          throws TransformerException, IOException, 
DOMException {
           // Check to see if Document is an xconf-tool document
           Element elem = component.getDocumentElement();
   
           String extension = 
file.lastIndexOf(".")>0?file.substring(file.lastIndexOf(".")+1):"";
           String basename = basename(file);
   
  -        if ( !elem.getTagName().equals(extension)) {
  +        if (!elem.getTagName().equals(extension)) {
               log("Skipping non xconf-tool file: "+file);
               return false;
           }
   
  +        String replacePropertiesStr = 
elem.getAttribute("replace-properties");
  +
  +        boolean replaceProperties = 
!("no".equalsIgnoreCase(replacePropertiesStr) ||
  +                                      
"false".equalsIgnoreCase(replacePropertiesStr));
  +
           // Get 'root' node were 'component' will be inserted into
  -        String xpath = elem.getAttribute("xpath");
  +        String xpath = getAttribute(elem, "xpath", replaceProperties);
   
           NodeList nodes = XPathAPI.selectNodeList(configuration, xpath);
   
  -        if (nodes.getLength()!=1) {
  +        if (nodes.getLength() !=1 ) {
               log("Error in: "+file);
  -            throw new IOException("XPath ("+xpath+
  +            throw new IOException("XPath (" + xpath +
                                     ") returned not one node, but "+
  -                                  nodes.getLength()+" nodes");
  +                                  nodes.getLength() + " nodes");
           }
           Node root = nodes.item(0);
   
           // Test that 'root' node satisfies 'component' insertion criteria
  -        String testPath = 
component.getDocumentElement().getAttribute("unless-path");
  -        if (testPath == null || testPath.length()==0) {
  +        String testPath = getAttribute(elem, "unless-path", 
replaceProperties);
  +        if (testPath == null || testPath.length() == 0) {
               // only look for old "unless" attr if unless-path is not present
  -            testPath = component.getDocumentElement().getAttribute("unless");
  +            testPath = getAttribute(elem, "unless", replaceProperties);
           }
           // Is if-path needed?
  -        String ifProp = 
component.getDocumentElement().getAttribute("if-prop");
  -        boolean ifValue = 
Boolean.valueOf(project.getProperty(ifProp)).booleanValue();
  -     
  -        if (ifProp != null && (ifProp.length()>0) && !ifValue ) {
  +        String ifProp = getAttribute(elem, "if-prop", replaceProperties);
  +        boolean ifValue = false;
  +        if (ifProp != null && !ifProp.equals("")) {
  +            Boolean.valueOf(project.getProperty(ifProp)).booleanValue();
  +        }
  +
  +        if (ifProp != null && ifProp.length() > 0 && !ifValue ) {
               log("Skipping: " + file, Project.MSG_DEBUG);
               return false;
  -        } else if ((testPath!=null) && (testPath.length()>0) &&
  -            (XPathAPI.selectNodeList(root, testPath).getLength()!=0)) {
  +        } else if (testPath != null && testPath.length() > 0 &&
  +            XPathAPI.selectNodeList(root, testPath).getLength() != 0) {
               log("Skipping: " + file, Project.MSG_DEBUG);
               return false;
           } else {
               // Test if component wants us to remove a list of nodes first
  -            xpath = component.getDocumentElement().getAttribute("remove");
  -
  +            xpath = getAttribute(elem, "remove", replaceProperties);
               Node remove = null;
   
  -            if ((xpath!=null) && (xpath.length()>0)) {
  +            if (xpath != null && xpath.length() > 0) {
                   nodes = XPathAPI.selectNodeList(configuration, xpath);
   
                   for (int i = 0, length = nodes.getLength(); i<length; i++) {
  @@ -260,11 +272,11 @@
               }
   
               // Test for an attribute that needs to be added to an element
  -            String name = 
component.getDocumentElement().getAttribute("add-attribute");
  -            String value = 
component.getDocumentElement().getAttribute("value");
  +            String name = getAttribute(elem, "add-attribute", 
replaceProperties);
  +            String value = getAttribute(elem, "value", replaceProperties);
   
  -            if ((name!=null) && (name.length()>0)) {
  -                if (value==null) {
  +            if (name != null && name.length() > 0) {
  +                if (value == null) {
                       throw new IOException("No attribute value specified for 
'add-attribute' "+
                                             xpath);
                   }
  @@ -274,29 +286,25 @@
               }
   
               // Test if 'component' provides desired insertion point
  -            xpath = 
component.getDocumentElement().getAttribute("insert-before");
  +            xpath = getAttribute(elem, "insert-before", replaceProperties);
               Node before = null;
   
  -            if ((xpath!=null) && (xpath.length()>0)) {
  +            if (xpath != null && xpath.length() > 0) {
                   nodes = XPathAPI.selectNodeList(root, xpath);
  -                if (nodes.getLength()!=1) {
  +                if (nodes.getLength() == 0) {
                       log("Error in: "+file);
  -                    throw new IOException("XPath ("+xpath+
  -                                          ") returned not one node, but "+
  -                                          nodes.getLength()+" nodes");
  +                    throw new IOException("XPath ("+xpath+") returned zero 
nodes");
                   }
                   before = nodes.item(0);
               } else {
  -                xpath = 
component.getDocumentElement().getAttribute("insert-after");
  -                if ((xpath!=null) && (xpath.length()>0)) {
  +                xpath = getAttribute(elem, "insert-after", 
replaceProperties);
  +                if (xpath != null && xpath.length() > 0) {
                       nodes = XPathAPI.selectNodeList(root, xpath);
  -                    if (nodes.getLength()!=1) {
  +                    if (nodes.getLength() == 0) {
                           log("Error in: "+file);
  -                        throw new IOException("XPath ("+xpath+
  -                                              ") returned not one node, but 
"+
  -                                              nodes.getLength()+" nodes");
  +                        throw new IOException("XPath ("+xpath+") zero 
nodes.");
                       }
  -                    before = nodes.item(0).getNextSibling();
  +                    before = 
nodes.item(nodes.getLength()-1).getNextSibling();
                   }
               }
   
  @@ -312,6 +320,9 @@
                   Node node = configuration.importNode(componentNodes.item(i),
                                                        true);
   
  +                if (replaceProperties) {
  +                    replaceProperties(node);
  +                }
                   if (before==null) {
                       root.appendChild(node);
                   } else {
  @@ -326,13 +337,56 @@
           }
       }
   
  +    private String getAttribute(Element elem, String attrName, boolean 
replaceProperties) {
  +        String attr = elem.getAttribute(attrName);
  +        if (attr == null) {
  +            return null;
  +        } else if (replaceProperties) {
  +            return getProject().replaceProperties(attr);
  +        } else {
  +            return attr;
  +        }
  +    }
  +
  +    private void replaceProperties(Node n) throws DOMException {
  +        NamedNodeMap attrs = n.getAttributes();
  +        if (attrs != null) {
  +            for (int i = 0; i < attrs.getLength(); i++) {
  +                Node attr = attrs.item(i);
  +                
attr.setNodeValue(getProject().replaceProperties(attr.getNodeValue()));     
  +            } 
  +        }
  +        switch (n.getNodeType()) {
  +            case Node.ATTRIBUTE_NODE:
  +            case Node.CDATA_SECTION_NODE:
  +            case Node.TEXT_NODE: {
  +                
n.setNodeValue(getProject().replaceProperties(n.getNodeValue()));
  +                break;
  +            }
  +            case Node.DOCUMENT_NODE:
  +            case Node.DOCUMENT_FRAGMENT_NODE:
  +            case Node.ELEMENT_NODE: {
  +                Node child = n.getFirstChild();
  +                while (child != null) {
  +                    replaceProperties(child);
  +                    child = child.getNextSibling();
  +                }
  +                break;
  +            }
  +            default: {
  +                // ignore all other node types
  +            }
  +        }
  +    }
  +
       /** Returns the file name (excluding directories and extension). */
       private String basename(String file) {
           int start = file.lastIndexOf(FSEP)+1; // last '/'
           int end = file.lastIndexOf(".");  // last '.'
   
  -        if (end == 0) end = file.length();
  -
  +        if (end == 0) {
  +            end = file.length();
  +        }
           return file.substring(start, end);
       }
   }
  
  
  
  1.36      +66 -30    cocoon-2.2/tools/src/blocks-build.xsl
  
  Index: blocks-build.xsl
  ===================================================================
  RCS file: /home/cvs/cocoon-2.2/tools/src/blocks-build.xsl,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- blocks-build.xsl  22 Oct 2003 19:57:52 -0000      1.35
  +++ blocks-build.xsl  10 Mar 2004 09:08:25 -0000      1.36
  @@ -1,4 +1,19 @@
   <?xml version="1.0"?>
  +<!--
  +  Copyright 1999-2004 The Apache Software Foundation
  +
  +  Licensed under the Apache License, Version 2.0 (the "License");
  +  you may not use this file except in compliance with the License.
  +  You may obtain a copy of the License at
  +
  +      http://www.apache.org/licenses/LICENSE-2.0
  +
  +  Unless required by applicable law or agreed to in writing, software
  +  distributed under the License is distributed on an "AS IS" BASIS,
  +  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  +  See the License for the specific language governing permissions and
  +  limitations under the License.
  +-->
   <xsl:stylesheet version="1.0" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
   
     <xsl:output method="xml" indent="yes"/>
  @@ -13,7 +28,7 @@
           </fileset>
           <fileset dir="{string('${lib.endorsed}')}">
             <include name="*.jar"/>
  -        </fileset>    
  +        </fileset>
           <!-- Currently, we have no JVM dependent libraries
             <fileset dir="{string('${lib.core}/jvm${target.vm}')}">
                <include name="*.jar"/>
  @@ -27,6 +42,7 @@
           </fileset>
           <path location="{string('${build.mocks}')}"/>
           <path location="{string('${build.dest}')}"/>
  +        <pathelement path="{string('${build.webapp.webinf}/classes/')}"/>
         </path>
   
         <path id="test.classpath">
  @@ -157,18 +173,28 @@
                  splitindex="true"
                  windowtitle="{string('${Name}')} API {string('${version}')} 
[{string('${TODAY}')}]"
                  doctitle="{string('${Name}')} API {string('${version}')}"
  -               bottom="Copyright &#169; {string('${year}')} Apache Software 
Foundation. All Rights Reserved."
  +               bottom="Copyright &#169; {string('${year}')} The Apache 
Software Foundation. All Rights Reserved."
                  stylesheetfile="{string('${resources.javadoc}')}/javadoc.css"
                  useexternalfile="yes"
                  additionalparam="{string('${javadoc.additionalparam}')}"
                  maxmemory="128m">
  -
  -        <link offline="true" href="http://avalon.apache.org/api"; 
packagelistloc="${resources.javadoc}/avalon"/>
  -        <link offline="true" 
href="http://xml.apache.org/xerces2-j/javadocs/api"; 
packagelistloc="${resources.javadoc}/xerces"/>
  -        <link offline="true" href="http://xml.apache.org/xalan-j/apidocs"; 
packagelistloc="${resources.javadoc}/xalan"/>
  -        <link offline="true" href="http://java.sun.com/j2se/1.4.1/docs/api"; 
packagelistloc="${resources.javadoc}/j2se"/>
  -        <link offline="true" 
href="http://java.sun.com/j2ee/sdk_1.3/techdocs/api"; 
packagelistloc="${resources.javadoc}/j2ee"/>
  -
  +               
  +        <link offline="true" href="http://avalon.apache.org/framework/api"; 
packagelistloc="${{resources.javadoc}}/avalon-framework"/>
  +        <link offline="true" href="http://avalon.apache.org/excalibur/api"; 
packagelistloc="${{resources.javadoc}}/avalon-excalibur"/>
  +        <link offline="true" 
href="http://xml.apache.org/xerces2-j/javadocs/api"; 
packagelistloc="${{resources.javadoc}}/xerces"/>
  +        <link offline="true" href="http://xml.apache.org/xalan-j/apidocs"; 
packagelistloc="${{resources.javadoc}}/xalan"/>
  +        <link offline="true" href="http://java.sun.com/j2se/1.4.2/docs/api"; 
packagelistloc="${{resources.javadoc}}/j2se"/>
  +        <link offline="true" 
href="http://java.sun.com/j2ee/sdk_1.3/techdocs/api"; 
packagelistloc="${{resources.javadoc}}/j2ee"/>
  +
  +        <tag name="avalon.component"   scope="types"   description="Avalon 
component" />
  +        <tag name="avalon.service"     scope="types"   
description="Implements service:"; />
  +        <!-- FIXME: javadoc or ant seems to not understand these
  +        <tag name="x-avalon.info"      scope="types"   
description="Shorthand:" />
  +        <tag name="x-avalon.lifestyle" scope="types"   
description="Lifestyle:" />
  +        -->
  +        <tag name="avalon.context"     scope="methods" description="Requires 
entry:" />
  +        <tag name="avalon.dependency"  scope="methods" description="Requires 
component:" />
  +      
           <packageset dir="{string('${java}')}">
             <include name="**"/>
           </packageset>
  @@ -180,10 +206,15 @@
               <include name="**"/>
             </packageset>
           </xsl:for-each>
  -        <classpath refid="classpath"/>
  -        <xsl:for-each select="$cocoon-blocks">
  -          <classpath 
refid="{substring-after(@name,'cocoon-block-')}.classpath"/>
  -        </xsl:for-each>
  +        <classpath>
  +          <fileset dir="{string('${tools.lib}')}">
  +            <include name="*.jar"/>
  +          </fileset>
  +          <path refid="classpath" />
  +          <xsl:for-each select="$cocoon-blocks">
  +            <path 
refid="{substring-after(@name,'cocoon-block-')}.classpath"/>
  +          </xsl:for-each>
  +        </classpath>
         </javadoc>
       </target>
   
  @@ -255,9 +286,7 @@
       <xsl:variable name="cocoon-block-dependencies" 
select="depend[starts-with(@project,'cocoon-block-')]"/>
   
       <target name="[EMAIL PROTECTED]" if="exclude.block.{$block-name}">
  -      <echo message="-----------------------------------------------"/>
  -      <echo message="ATTENTION: {$block-name} is excluded from the build."/>
  -      <echo message="-----------------------------------------------"/>
  +      <echo message="NOTICE: Block '{$block-name}' is excluded from the 
build."/>
       </target>
   
       <target name="[EMAIL PROTECTED]" 
unless="unless.exclude.block.{$block-name}"/>
  @@ -280,11 +309,12 @@
         <available property="{$block-name}.has.mocks" type="dir" 
file="{string('${blocks}')}/{$block-name}/mocks/"/>
   
         <xsl:if test="@status='unstable'">
  -        <echo message="-----------------------------------------------"/>
  -        <echo message="ATTENTION: {$block-name} is marked unstable."/>
  -        <echo message="It should be considered alpha quality"/>
  -        <echo message="which means that its API might change without 
notice."/>
  -        <echo message="-----------------------------------------------"/>
  +        <echo message="==================== WARNING 
======================="/>
  +        <echo message=" Block '{$block-name}' should be considered 
unstable."/>
  +        <echo 
message="----------------------------------------------------"/>
  +        <echo message="         This means that its API, schemas "/>
  +        <echo message="  and other contracts might change without notice."/>
  +        <echo 
message="===================================================="/>
         </xsl:if>
   
         <antcall target="{$block-name}-compile"/>
  @@ -328,7 +358,7 @@
         <antcall target="{$block-name}-webinf"/>
       </target>
   
  -    <target name="{$block-name}-prepare">
  +    <target name="{$block-name}-prepare" 
unless="unless.exclude.block.{$block-name}">
         <xsl:if test="depend">
           <xsl:attribute name="depends">
             <xsl:value-of select="@name"/>
  @@ -346,8 +376,8 @@
   
         <mkdir dir="{string('${build.blocks}')}/{$block-name}/conf"/>
         <copy filtering="on" 
todir="{string('${build.blocks}')}/{$block-name}/conf">
  -        <fileset dir="{string('${blocks}')}/{$block-name}/conf">
  -          <include name="**/*.x*"/>
  +        <fileset dir="{string('${blocks}')}/{$block-name}">
  +          <include name="conf**/*.x*"/>
           </fileset>
         </copy>
   
  @@ -385,6 +415,7 @@
              available - to the usual java source directory.
              If someone knows a better solution...
         -->
  +      <!-- Currently, we have no JVM dependent sources
         <condition property="dependend.vm" value="{string('${target.vm}')}">
           <available 
file="{string('${blocks}')}/{$block-name}/java{string('${target.vm}')}"/>
         </condition>
  @@ -393,7 +424,7 @@
             <available 
file="{string('${blocks}')}/{$block-name}/java{string('${target.vm}')}"/>
           </not>
         </condition>
  -
  +      -->
         <javac destdir="{string('${build.blocks}')}/{$block-name}/dest"
                debug="{string('${compiler.debug}')}"
                optimize="{string('${compiler.optimize}')}"
  @@ -402,12 +433,14 @@
                nowarn="{string('${compiler.nowarn}')}"
                compiler="{string('${compiler}')}">
           <src path="{string('${blocks}')}/{$block-name}/java"/>
  +        <!-- Currently, we have no JVM dependent sources
           <src 
path="{string('${blocks}')}/{$block-name}/java{string('${dependend.vm}')}"/>
  +        -->
           <classpath refid="{$block-name}.classpath"/>
           <exclude name="**/samples/**/*.java"/>
         </javac>
   
  -      <jar jarfile="{string('${build.blocks}')}/{$block-name}-block.jar">
  +      <jar jarfile="{string('${build.blocks}')}/{$block-name}-block.jar" 
index="true">
           <fileset dir="{string('${build.blocks}')}/{$block-name}/dest">
             <include name="org/**"/>
             <include name="META-INF/**"/>
  @@ -424,7 +457,9 @@
                nowarn="{string('${compiler.nowarn}')}"
                compiler="{string('${compiler}')}">
           <src path="{string('${blocks}')}/{$block-name}/java"/>
  +        <!-- Currently, we have no JVM dependent sources
           <src 
path="{string('${blocks}')}/{$block-name}/java{string('${dependend.vm}')}"/>
  +        -->
           <classpath refid="{$block-name}.classpath"/>
           <include name="**/samples/**/*.java"/>
         </javac>
  @@ -505,14 +540,14 @@
           <fileset dir="{string('${blocks}')}/{$block-name}/test" 
excludes="**/*.java"/>
         </copy>
   
  -      <javac srcdir="{string('${blocks}')}/{$block-name}/test"
  -             destdir="{string('${build.blocks}')}/{$block-name}/test"
  -             fork="true"
  +      <javac destdir="{string('${build.blocks}')}/{$block-name}/test"
                debug="{string('${compiler.debug}')}"
                optimize="{string('${compiler.optimize}')}"
                deprecation="{string('${compiler.deprecation}')}"
                target="{string('${target.vm}')}"
  -             nowarn="{string('${compiler.nowarn}')}">
  +             nowarn="{string('${compiler.nowarn}')}"
  +             compiler="{string('${compiler}')}">
  +        <src path="{string('${blocks}')}/{$block-name}/test"/>
           <classpath>
             <path refid="test.classpath"/>
             <path refid="{$block-name}.classpath"/>
  @@ -521,6 +556,7 @@
         </javac>
   
         <junit printsummary="yes" haltonfailure="yes" fork="yes">
  +        <jvmarg value="-Djava.endorsed.dirs=lib/endorsed"/>
           <classpath>
             <path refid="test.classpath"/>
             <path refid="{$block-name}.classpath"/>
  
  
  
  1.4       +16 -1     cocoon-2.2/tools/src/check-jars.xsl
  
  Index: check-jars.xsl
  ===================================================================
  RCS file: /home/cvs/cocoon-2.2/tools/src/check-jars.xsl,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- check-jars.xsl    22 Sep 2003 17:11:55 -0000      1.3
  +++ check-jars.xsl    10 Mar 2004 09:08:25 -0000      1.4
  @@ -1,4 +1,19 @@
   <?xml version="1.0" encoding="utf-8"?>
  +<!--
  +  Copyright 1999-2004 The Apache Software Foundation
  +
  +  Licensed under the Apache License, Version 2.0 (the "License");
  +  you may not use this file except in compliance with the License.
  +  You may obtain a copy of the License at
  +
  +      http://www.apache.org/licenses/LICENSE-2.0
  +
  +  Unless required by applicable law or agreed to in writing, software
  +  distributed under the License is distributed on an "AS IS" BASIS,
  +  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  +  See the License for the specific language governing permissions and
  +  limitations under the License.
  +-->
   
   <!--+
       | CVS $Id$
  
  
  
  1.4       +1 -2      cocoon-2.2/tools/src/loader/Loader.java
  
  Index: Loader.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.2/tools/src/loader/Loader.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Loader.java       8 Mar 2004 14:04:20 -0000       1.3
  +++ Loader.java       10 Mar 2004 09:08:26 -0000      1.4
  @@ -21,7 +21,6 @@
   
   import java.lang.reflect.InvocationTargetException;
   import java.lang.reflect.Method;
  -import java.lang.reflect.Modifier;
   
   import java.util.StringTokenizer;
   
  
  
  

Reply via email to