cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ilgro...@apache.org
Subject svn commit: r1573205 [5/5] - in /cocoon/branches/BRANCH_2_1_X-dojo1_1: ./ legal/ lib/ lib/core/ lib/endorsed/ lib/optional/ misc/notes/ src/blocks/auth/java/org/apache/cocoon/auth/ src/blocks/batik/java/org/apache/cocoon/serialization/ src/blocks/batik...
Date Sat, 01 Mar 2014 18:02:20 GMT
Modified: cocoon/branches/BRANCH_2_1_X-dojo1_1/src/java/org/apache/cocoon/transformation/I18nTransformer.java
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X-dojo1_1/src/java/org/apache/cocoon/transformation/I18nTransformer.java?rev=1573205&r1=1573204&r2=1573205&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X-dojo1_1/src/java/org/apache/cocoon/transformation/I18nTransformer.java (original)
+++ cocoon/branches/BRANCH_2_1_X-dojo1_1/src/java/org/apache/cocoon/transformation/I18nTransformer.java Sat Mar  1 18:02:14 2014
@@ -905,6 +905,9 @@ public class I18nTransformer extends Abs
 
     // Date and number elements and params formatting attributes with values.
     private HashMap formattingParams;
+    
+    // The namespaces and their prefixes 
+    private Map namespaces;
 
     /**
      * Returns the current locale setting of this transformer instance.
@@ -1108,6 +1111,7 @@ public class I18nTransformer extends Abs
         this.indexedParams      = new HashMap(3);
         this.formattingParams   = null;
         this.strBuffer          = null;
+        this.namespaces			= new HashMap(5);
 
         // give the catalogue variable its value -- first look if it's locally overridden
         // and otherwise use the component-wide defaults.
@@ -1133,6 +1137,31 @@ public class I18nTransformer extends Abs
     //
     // Standard SAX event handlers
     //
+    
+    /**
+     * Process the SAX event.
+     * @see org.xml.sax.ContentHandler#startPrefixMapping
+     */
+    public void startPrefixMapping(String prefix, String uri)
+    throws SAXException {
+        // consume i18n prefix mappings
+        namespaces.put(prefix,uri);
+        if (!I18nUtils.matchesI18nNamespace(uri)) {
+            super.startPrefixMapping(prefix, uri);
+        }
+    }
+
+    /**
+     * Process the SAX event.
+     * @see org.xml.sax.ContentHandler#endPrefixMapping
+     */
+    public void endPrefixMapping(String prefix)
+    throws SAXException {
+        if (!I18nUtils.matchesI18nNamespace((String)namespaces.get(prefix))) {
+            super.endPrefixMapping(prefix);
+        }
+        namespaces.remove(prefix);
+    }
 
     public void startElement(String uri, String name, String raw,
                              Attributes attr)
@@ -2192,6 +2221,7 @@ public class I18nTransformer extends Abs
         this.untranslatedRecorder = null;
         this.catalogue = null;
         this.objectModel = null;
+        this.namespaces.clear();
 
         // Release catalogues which were selected for current locale
         Iterator i = catalogues.values().iterator();

Modified: cocoon/branches/BRANCH_2_1_X-dojo1_1/src/java/org/apache/cocoon/transformation/StripNameSpacesTransformer.java
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X-dojo1_1/src/java/org/apache/cocoon/transformation/StripNameSpacesTransformer.java?rev=1573205&r1=1573204&r2=1573205&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X-dojo1_1/src/java/org/apache/cocoon/transformation/StripNameSpacesTransformer.java (original)
+++ cocoon/branches/BRANCH_2_1_X-dojo1_1/src/java/org/apache/cocoon/transformation/StripNameSpacesTransformer.java Sat Mar  1 18:02:14 2014
@@ -23,6 +23,7 @@ import org.apache.avalon.framework.param
 import org.apache.cocoon.ProcessingException;
 import org.apache.cocoon.caching.CacheableProcessingComponent;
 import org.apache.cocoon.environment.SourceResolver;
+import org.apache.cocoon.xml.AttributesImpl;
 import org.apache.excalibur.source.SourceValidity;
 import org.apache.excalibur.source.impl.validity.NOPValidity;
 import org.xml.sax.Attributes;
@@ -65,8 +66,21 @@ public class StripNameSpacesTransformer 
 
 	public void startElement(String uri, String localName, String qName,
 			Attributes attr) throws SAXException {
-		
-		super.startElement(EMPTY_NS, localName, localName, attr);
+	    
+	    AttributesImpl l_attr = new AttributesImpl();
+
+        String attrName;
+        String attrValue;
+        String attrType;
+        for (int i = 0; i < attr.getLength(); i++) {
+            attrName = attr.getLocalName(i);
+            attrValue = attr.getValue(i);
+            attrType = attr.getType(i);
+            if (attrValue != null) {
+                l_attr.addAttribute(EMPTY_NS, attrName, attrName, attrType, attrValue);
+            }
+        }
+		super.startElement(EMPTY_NS, localName, localName, l_attr);
 
 	}
 

Modified: cocoon/branches/BRANCH_2_1_X-dojo1_1/src/java/org/apache/cocoon/transformation/XIncludeTransformer.java
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X-dojo1_1/src/java/org/apache/cocoon/transformation/XIncludeTransformer.java?rev=1573205&r1=1573204&r2=1573205&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X-dojo1_1/src/java/org/apache/cocoon/transformation/XIncludeTransformer.java (original)
+++ cocoon/branches/BRANCH_2_1_X-dojo1_1/src/java/org/apache/cocoon/transformation/XIncludeTransformer.java Sat Mar  1 18:02:14 2014
@@ -54,6 +54,7 @@ import org.xml.sax.ContentHandler;
 import org.xml.sax.Locator;
 import org.xml.sax.SAXException;
 import org.xml.sax.ext.LexicalHandler;
+import org.xml.sax.helpers.AttributesImpl;
 
 /**
  * @cocoon.sitemap.component.documentation
@@ -81,7 +82,9 @@ public class XIncludeTransformer extends
      * @deprecated Should be removed in cocoon 2.2. Use javax.xml.XMLConstants.XML_NS_URI instead.
      */
     public static final String XMLBASE_NAMESPACE_URI = "http://www.w3.org/XML/1998/namespace";
+    public static final String XMLBASE_NAMESPACE_PREFIX = "xml";
     public static final String XMLBASE_ATTRIBUTE = "base";
+    public static final String XMLBASE_ATTRIBUTE_TYPE = "CDATA";
 
     public static final String XINCLUDE_NAMESPACE_URI = "http://www.w3.org/2001/XInclude";
     public static final String XINCLUDE_INCLUDE_ELEMENT = "include";
@@ -181,6 +184,18 @@ public class XIncludeTransformer extends
          * XIncludePipe. Used to detect loop inclusions.
          */
         private String xpointer;
+        
+        /**
+         * Value of the current element level. Used to determine when to insert
+         * xml:base attributes for base URI fixup.
+         */
+        private int level = 0;
+
+        /**
+         * Base URI of the parent of the current element. Used to determine
+         * if base URI fixup is necessary.
+         */
+        private String parentBaseURI = null;
 
         private XIncludePipe parent;
 
@@ -226,7 +241,9 @@ public class XIncludeTransformer extends
 
         public void startElement(String uri, String name, String raw, Attributes attr) throws SAXException {
             // Track xml:base context:
+            parentBaseURI = xmlBaseSupport.getCurrentBase();
             xmlBaseSupport.startElement(uri, name, raw, attr);
+            this.level++;
             // Handle elements in xinclude namespace:
             if (XINCLUDE_NAMESPACE_URI.equals(uri)) {
                 // Handle xi:include:
@@ -256,15 +273,56 @@ public class XIncludeTransformer extends
                     throw new SAXException("Unknown XInclude element " + raw + " at " + getLocation());
                 }
             } else if (isEvaluatingContent()) {
-                // Copy other elements through when appropriate:
-                super.startElement(uri, name, raw, attr);
-            }
+                // Copy other elements through when appropriate,
+                // performing base URI fixup when necessary.
+                if(mustAddBaseAttr())
+                    super.startElement(uri, name, raw, addBaseURI(attr));
+                else
+                    super.startElement(uri, name, raw, attr);
+            }
+        }
+       
+        private boolean mustAddBaseAttr(){
+            if(level != 1)
+                return false;
+            if(this.parent == null)
+                return false;
+            String parentBase = this.parent.parentBaseURI;
+            String currentBase = xmlBaseSupport.getCurrentBase();
+            if(currentBase == null)
+                return false;
+            if(parentBase == null || !parentBase.equals(currentBase))
+                return true;
+            return false;
+        }
+
+        /**
+         * Adds xml:base attribute as per the XInclude spec.
+         */
+        private Attributes addBaseURI(Attributes oldAttr) throws SAXException {          
+            String currentBaseURI = xmlBaseSupport.getCurrentBase();
+
+            AttributesImpl fixedAttr = new AttributesImpl(oldAttr);
+                
+            // Old xml:base attributes are removed.
+            int xmlBaseAttrIdx = fixedAttr.getIndex(XMLBASE_NAMESPACE_URI, XMLBASE_ATTRIBUTE);
+            if(xmlBaseAttrIdx != -1)
+                fixedAttr.removeAttribute(xmlBaseAttrIdx);
+            
+            fixedAttr.addAttribute(
+                    XMLBASE_NAMESPACE_URI, XMLBASE_ATTRIBUTE,
+                    XMLBASE_NAMESPACE_PREFIX + ":" + XMLBASE_ATTRIBUTE,
+                    XMLBASE_ATTRIBUTE_TYPE,
+                    currentBaseURI
+            );
+            return fixedAttr;
         }
 
         public void endElement(String uri, String name, String raw) throws SAXException {
             // Track xml:base context:
             xmlBaseSupport.endElement(uri, name, raw);
-
+            this.level--;
+            
             // Handle elements in xinclude namespace:
             if (XINCLUDE_NAMESPACE_URI.equals(uri)) {
                 // Handle xi:include:

Modified: cocoon/branches/BRANCH_2_1_X-dojo1_1/src/java/org/apache/cocoon/xml/XMLBaseSupport.java
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X-dojo1_1/src/java/org/apache/cocoon/xml/XMLBaseSupport.java?rev=1573205&r1=1573204&r2=1573205&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X-dojo1_1/src/java/org/apache/cocoon/xml/XMLBaseSupport.java (original)
+++ cocoon/branches/BRANCH_2_1_X-dojo1_1/src/java/org/apache/cocoon/xml/XMLBaseSupport.java Sat Mar  1 18:02:14 2014
@@ -117,7 +117,10 @@ public class XMLBaseSupport {
         return resolve(getCurrentBase(), spec);
     }
 
-    private String getCurrentBase() {
+    /**
+     * Returns the base URI currently in effect, or null if unknown.
+     */
+    public String getCurrentBase() {
         if (bases.size() > 0) {
             BaseInfo baseInfo = (BaseInfo)bases.peek();
             return baseInfo.getUrl();

Modified: cocoon/branches/BRANCH_2_1_X-dojo1_1/src/test/org/apache/cocoon/SitemapComponentTestCase.java
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X-dojo1_1/src/test/org/apache/cocoon/SitemapComponentTestCase.java?rev=1573205&r1=1573204&r2=1573205&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X-dojo1_1/src/test/org/apache/cocoon/SitemapComponentTestCase.java (original)
+++ cocoon/branches/BRANCH_2_1_X-dojo1_1/src/test/org/apache/cocoon/SitemapComponentTestCase.java Sat Mar  1 18:02:14 2014
@@ -48,6 +48,7 @@ import org.apache.cocoon.environment.moc
 import org.apache.cocoon.environment.mock.MockResponse;
 import org.apache.cocoon.generation.Generator;
 import org.apache.cocoon.matching.Matcher;
+import org.apache.cocoon.reading.Reader;
 import org.apache.cocoon.serialization.Serializer;
 import org.apache.cocoon.sitemap.PatternException;
 import org.apache.cocoon.transformation.Transformer;
@@ -449,6 +450,59 @@ public abstract class SitemapComponentTe
         return document.toByteArray();
     }
     
+    public final byte[] read(String type, Parameters parameters, String source) throws SAXException, IOException, ProcessingException {
+        ServiceSelector selector = null;
+        Reader reader = null;
+        SourceResolver resolver = null;
+        Source inputsource = null;
+
+        assertNotNull("Test for component manager", this.getManager());
+
+        ByteArrayOutputStream document = null;
+
+        try {
+            selector = (ServiceSelector) this.lookup(Reader.ROLE+
+                "Selector");
+            assertNotNull("Test lookup of serializer selector", selector);
+
+            resolver = (SourceResolver) this.lookup(SourceResolver.ROLE);
+            assertNotNull("Test lookup of source resolver", resolver);
+
+            assertNotNull("Test if reader name is not null", type);
+            reader = (Reader) selector.select(type);
+            assertNotNull("Test lookup of reader", reader);
+            
+            reader.setup(new SourceResolverAdapter(resolver),
+                    this.getObjectModel(), source, parameters);
+
+            document = new ByteArrayOutputStream();
+            reader.setOutputStream(document);
+
+            reader.generate();
+        } catch (ServiceException ce) {
+            getLogger().error("Could not retrieve serializer", ce);
+            fail("Could not retrieve serializer:"+ce.toString());
+        } finally {
+            if (reader!=null) {
+                selector.release(reader);
+            }
+
+            if (selector!=null) {
+                this.release(selector);
+            }
+
+            if (inputsource!=null) {
+                resolver.release(inputsource);
+            }
+
+            if (resolver!=null) {
+                this.release(resolver);
+            }
+        }
+
+        return document.toByteArray();
+    }
+    
     public String callFunction(String type, String source, String function, Map params) throws Exception {
         
         redirector.reset();

Propchange: cocoon/branches/BRANCH_2_1_X-dojo1_1/src/test/org/apache/cocoon/caching/CachingOutputStreamTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: cocoon/branches/BRANCH_2_1_X-dojo1_1/src/test/org/apache/cocoon/components/source/impl/ZipSourceTestCase.xtest
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X-dojo1_1/src/test/org/apache/cocoon/components/source/impl/ZipSourceTestCase.xtest?rev=1573205&r1=1573204&r2=1573205&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X-dojo1_1/src/test/org/apache/cocoon/components/source/impl/ZipSourceTestCase.xtest (original)
+++ cocoon/branches/BRANCH_2_1_X-dojo1_1/src/test/org/apache/cocoon/components/source/impl/ZipSourceTestCase.xtest Sat Mar  1 18:02:14 2014
@@ -1,39 +1,39 @@
-<?xml version="1.0" ?>
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You 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.
--->
-<testcase>
- <roles>
-  <role name="org.apache.excalibur.source.SourceFactorySelector"
-        shorthand="source-factories"
-        default-class="org.apache.avalon.excalibur.component.ExcaliburComponentSelector"/>
-
-  <role name="org.apache.excalibur.source.SourceResolver"
-        shorthand="source-resolver"
-        default-class="org.apache.excalibur.source.impl.SourceResolverImpl"/>
- </roles>
-
- <components>
-  <source-factories>
-   <component-instance class="org.apache.excalibur.source.impl.ResourceSourceFactory" name="resource"/>
-   <component-instance class="org.apache.cocoon.components.source.impl.ZipSourceFactory" name="zip"/>
-   <component-instance class="org.apache.excalibur.source.impl.URLSourceFactory" name="*"/>
-  </source-factories>
-
-  <source-resolver class="org.apache.excalibur.source.impl.SourceResolverImpl"/>
- </components>
-
-</testcase>
+<?xml version="1.0" ?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
+<testcase>
+ <roles>
+  <role name="org.apache.excalibur.source.SourceFactorySelector"
+        shorthand="source-factories"
+        default-class="org.apache.avalon.excalibur.component.ExcaliburComponentSelector"/>
+
+  <role name="org.apache.excalibur.source.SourceResolver"
+        shorthand="source-resolver"
+        default-class="org.apache.excalibur.source.impl.SourceResolverImpl"/>
+ </roles>
+
+ <components>
+  <source-factories>
+   <component-instance class="org.apache.excalibur.source.impl.ResourceSourceFactory" name="resource"/>
+   <component-instance class="org.apache.cocoon.components.source.impl.ZipSourceFactory" name="zip"/>
+   <component-instance class="org.apache.excalibur.source.impl.URLSourceFactory" name="*"/>
+  </source-factories>
+
+  <source-resolver class="org.apache.excalibur.source.impl.SourceResolverImpl"/>
+ </components>
+
+</testcase>

Propchange: cocoon/branches/BRANCH_2_1_X-dojo1_1/src/test/org/apache/cocoon/components/source/impl/ZipSourceTestCase.xtest
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: cocoon/branches/BRANCH_2_1_X-dojo1_1/src/test/org/apache/cocoon/selection/HostSelectorTestCase.java
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X-dojo1_1/src/test/org/apache/cocoon/selection/HostSelectorTestCase.java?rev=1573205&r1=1573204&r2=1573205&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X-dojo1_1/src/test/org/apache/cocoon/selection/HostSelectorTestCase.java (original)
+++ cocoon/branches/BRANCH_2_1_X-dojo1_1/src/test/org/apache/cocoon/selection/HostSelectorTestCase.java Sat Mar  1 18:02:14 2014
@@ -19,6 +19,7 @@ package org.apache.cocoon.selection;
 import junit.framework.Test;
 import junit.framework.TestSuite;
 import junit.textui.TestRunner;
+
 import org.apache.avalon.framework.parameters.Parameters;
 import org.apache.cocoon.SitemapComponentTestCase;
 
@@ -92,4 +93,30 @@ public class HostSelectorTestCase extend
         System.out.println(result);
         assertTrue( "Test if host is not " + expectedHostName, !result );
     }
+
+    /**
+     * Test the host selector matches regardless of whether the hostname and
+     * value are upper or lower case.
+     */
+    public void testHostCaseInsensitive() throws Exception {
+        final String hostLower = "myhost-dns-name";
+        final String hostUpper = "MYHOST-DNS-NAME-IN-A-EUROPE-COUNTRY";
+        String expectedHostName;
+
+        Parameters parameters = new Parameters();
+        boolean result;
+
+        getRequest().setHeader("Host", hostUpper);
+        expectedHostName = "myhost-eu";
+        result = this.select(HOST_SELECTOR, expectedHostName, parameters);
+        System.out.println(result);
+        assertTrue("Test upper case host doesn't match lower case value as expected.", result);
+
+        getRequest().setHeader("Host", hostLower);
+        expectedHostName = "myhost-uppercase";
+        result = this.select(HOST_SELECTOR, expectedHostName, parameters);
+        System.out.println(result);
+        assertTrue("Test lower case host doesn't match upper case value as expected.", result);
+    }
+
 }

Modified: cocoon/branches/BRANCH_2_1_X-dojo1_1/src/test/org/apache/cocoon/selection/HostSelectorTestCase.xtest
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X-dojo1_1/src/test/org/apache/cocoon/selection/HostSelectorTestCase.xtest?rev=1573205&r1=1573204&r2=1573205&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X-dojo1_1/src/test/org/apache/cocoon/selection/HostSelectorTestCase.xtest (original)
+++ cocoon/branches/BRANCH_2_1_X-dojo1_1/src/test/org/apache/cocoon/selection/HostSelectorTestCase.xtest Sat Mar  1 18:02:14 2014
@@ -43,6 +43,7 @@
                        name="host">
       <host name="myhost-eu" value="myhost-dns-name-in-a-europe-country"/>
       <host name="myhost-us" value="myhost-dns-name-in-a-us-state"/>
+      <host name="myhost-uppercase" value="MYHOST-DNS-NAME"/>
     </component-instance>
   </selectors>
  </components>

Modified: cocoon/branches/BRANCH_2_1_X-dojo1_1/src/test/org/apache/cocoon/transformation/xinclude-result-1.xml
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X-dojo1_1/src/test/org/apache/cocoon/transformation/xinclude-result-1.xml?rev=1573205&r1=1573204&r2=1573205&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X-dojo1_1/src/test/org/apache/cocoon/transformation/xinclude-result-1.xml (original)
+++ cocoon/branches/BRANCH_2_1_X-dojo1_1/src/test/org/apache/cocoon/transformation/xinclude-result-1.xml Sat Mar  1 18:02:14 2014
@@ -21,7 +21,7 @@
   <p>P1</p>
   <p>P2</p>
 
-<root-include>
+<root-include xml:base="resource://org/apache/cocoon/transformation/xinclude-incl.xml">
   <br/>
   <p>include 1</p>
   <p>include 2</p>
@@ -31,4 +31,4 @@
 
   <p>P3</p>
   <p>P4</p>
-</root>
\ No newline at end of file
+</root>

Propchange: cocoon/branches/BRANCH_2_1_X-dojo1_1/src/test/org/apache/cocoon/util/BufferedOutputStreamTestCase.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: cocoon/branches/BRANCH_2_1_X-dojo1_1/src/webapp/samples/catalog/catalog-demo.xml
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X-dojo1_1/src/webapp/samples/catalog/catalog-demo.xml?rev=1573205&r1=1573204&r2=1573205&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X-dojo1_1/src/webapp/samples/catalog/catalog-demo.xml (original)
+++ cocoon/branches/BRANCH_2_1_X-dojo1_1/src/webapp/samples/catalog/catalog-demo.xml Sat Mar  1 18:02:14 2014
@@ -35,9 +35,9 @@
  <section>
   <para>This sample application demonstrates the use of catalogs for
    entity resolution. &note; see the Apache Cocoon documentation
-   <link href="../../docs/userdocs/concepts/catalog.html">Entity resolution with
+   <link href="http://cocoon.apache.org/2.1/userdocs/concepts/catalog.html">Entity resolution with
    catalogs</link> for the full background and explanation, and the XML
-   source of this document (catalog-demo.xml).
+   source of this document (src/webapp/samples/catalog/catalog-demo.xml).
   </para>
 
   <para>This top-level XML instance document is catalog-demo.xml - it declares

Modified: cocoon/branches/BRANCH_2_1_X-dojo1_1/src/webapp/samples/common/style/xsl/html/simple-page2html.xsl
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X-dojo1_1/src/webapp/samples/common/style/xsl/html/simple-page2html.xsl?rev=1573205&r1=1573204&r2=1573205&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X-dojo1_1/src/webapp/samples/common/style/xsl/html/simple-page2html.xsl (original)
+++ cocoon/branches/BRANCH_2_1_X-dojo1_1/src/webapp/samples/common/style/xsl/html/simple-page2html.xsl Sat Mar  1 18:02:14 2014
@@ -32,7 +32,7 @@
        <title><xsl:value-of select="title"/></title>
        <link rel="stylesheet" href="{$contextPath}/styles/main.css" title="Default Style"/>
        <!-- copy local CSS, if any -->
-       <xsl:copy-of select="*[not(name() = 'content')]"/>
+       <xsl:copy-of select="*[not(name() = 'content') and not(name() = 'resources')]"/>
      </head>
      <body>
        <xsl:call-template name="resources"/>

Modified: cocoon/branches/BRANCH_2_1_X-dojo1_1/src/webapp/samples/hello-world/style/xsl/page2fo.xsl
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X-dojo1_1/src/webapp/samples/hello-world/style/xsl/page2fo.xsl?rev=1573205&r1=1573204&r2=1573205&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X-dojo1_1/src/webapp/samples/hello-world/style/xsl/page2fo.xsl (original)
+++ cocoon/branches/BRANCH_2_1_X-dojo1_1/src/webapp/samples/hello-world/style/xsl/page2fo.xsl Sat Mar  1 18:02:14 2014
@@ -33,8 +33,8 @@
                   margin-bottom="2cm" 
                   margin-left="2.5cm" 
                   margin-right="2.5cm">
-       <fo:region-before extent="3cm"/>
        <fo:region-body margin-top="3cm"/>
+       <fo:region-before extent="3cm"/>
        <fo:region-after extent="1.5cm"/>
      </fo:simple-page-master>
 

Modified: cocoon/branches/BRANCH_2_1_X-dojo1_1/src/webapp/samples/imagereader/dir2page.xsl
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X-dojo1_1/src/webapp/samples/imagereader/dir2page.xsl?rev=1573205&r1=1573204&r2=1573205&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X-dojo1_1/src/webapp/samples/imagereader/dir2page.xsl (original)
+++ cocoon/branches/BRANCH_2_1_X-dojo1_1/src/webapp/samples/imagereader/dir2page.xsl Sat Mar  1 18:02:14 2014
@@ -30,9 +30,8 @@
       </p>
       <p>
         See documentation for
-        <a href="../../docs/userdocs/generators/imagedirectory-generator.html">Image
-        Directory Generator</a> and
-        <a href="../../docs/userdocs/readers/image-reader.html">Image Reader</a>
+        <a href="http://cocoon.apache.org/2.1/userdocs/imagedirectory-generator.html">Image Directory Generator</a> and
+        <a href="http://cocoon.apache.org/2.1/userdocs/core/image-reader.html">Image Reader</a>
       </p>
     </body></html>
   </xsl:template>

Propchange: cocoon/branches/BRANCH_2_1_X-dojo1_1/src/webapp/samples/modules/a/forrestconf.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: cocoon/branches/BRANCH_2_1_X-dojo1_1/src/webapp/samples/protected/docs/protected.xml
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X-dojo1_1/src/webapp/samples/protected/docs/protected.xml?rev=1573205&r1=1573204&r2=1573205&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X-dojo1_1/src/webapp/samples/protected/docs/protected.xml (original)
+++ cocoon/branches/BRANCH_2_1_X-dojo1_1/src/webapp/samples/protected/docs/protected.xml Sat Mar  1 18:02:14 2014
@@ -21,7 +21,7 @@
   <resources>
     <resource type="file" href="descriptors/auth.xml?cocoon-view=pretty-content">Authenticator</resource>
     <resource type="file" href="descriptors/params.xml?cocoon-view=pretty-content">Validator</resource>
-    <resource type="doc" href="userdocs/actions/database-actions.html">Actions</resource>
+    <resource type="doc" href="http://cocoon.apache.org/2.1/userdocs/database-actions.html">Actions</resource>
   </resources>
   <title>Protected area</title>
   <content>

Modified: cocoon/branches/BRANCH_2_1_X-dojo1_1/src/webapp/samples/simpleform/one/ERROR.xsp
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X-dojo1_1/src/webapp/samples/simpleform/one/ERROR.xsp?rev=1573205&r1=1573204&r2=1573205&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X-dojo1_1/src/webapp/samples/simpleform/one/ERROR.xsp (original)
+++ cocoon/branches/BRANCH_2_1_X-dojo1_1/src/webapp/samples/simpleform/one/ERROR.xsp Sat Mar  1 18:02:14 2014
@@ -25,7 +25,7 @@
 
     <resources>
        <resource type="file" href="descriptor.xml?cocoon-view=pretty-content">Descriptor</resource>
-       <resource type="doc" href="userdocs/xsp/logicsheet-forms.html">Action &amp; Logicsheet</resource>
+       <resource type="doc" href="http://cocoon.apache.org/2.1/userdocs/logicsheets/logicsheet-forms.html">Action &amp; Logicsheet</resource>
     </resources>
 
     <title>Car Reservation</title>

Modified: cocoon/branches/BRANCH_2_1_X-dojo1_1/src/webapp/samples/simpleform/one/OK.xsp
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X-dojo1_1/src/webapp/samples/simpleform/one/OK.xsp?rev=1573205&r1=1573204&r2=1573205&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X-dojo1_1/src/webapp/samples/simpleform/one/OK.xsp (original)
+++ cocoon/branches/BRANCH_2_1_X-dojo1_1/src/webapp/samples/simpleform/one/OK.xsp Sat Mar  1 18:02:14 2014
@@ -25,7 +25,7 @@
    <page>
     <resources>
        <resource type="file" href="descriptor.xml?cocoon-view=pretty-content">Descriptor</resource>
-       <resource type="doc" href="userdocs/xsp/logicsheet-forms.html">Action &amp; Logicsheet</resource>
+       <resource type="doc" href="http://cocoon.apache.org/2.1/userdocs/logicsheets/logicsheet-forms.html">Action &amp; Logicsheet</resource>
     </resources>
 
       <title>Car Reservation</title>

Modified: cocoon/branches/BRANCH_2_1_X-dojo1_1/status.xml
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X-dojo1_1/status.xml?rev=1573205&r1=1573204&r2=1573205&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X-dojo1_1/status.xml (original)
+++ cocoon/branches/BRANCH_2_1_X-dojo1_1/status.xml Sat Mar  1 18:02:14 2014
@@ -74,6 +74,7 @@
   <person name="Marcus Crafter" email="crafterm@apache.org" id="MC"/>
   <person name="David Crossley" email="crossley@apache.org" id="DC"/>
   <person name="Torsten Curdt" email="tcurdt@apache.org" id="TC"/>
+  <person name="C&#233;dric Damioli" email="cdamioli@apache.org" id="CD"/>
   <person name="Bertrand Delacr&#233;taz" email="bdelacretaz@apache.org" id="BD"/>
   <person name="Bruno Dumon" email="bruno@apache.org" id="BRD"/>
   <person name="Daniel Fagerstrom" email="danielf@apache.org" id="DF"/>
@@ -91,6 +92,7 @@
   <person name="Geoff Howard" email="ghoward@apache.org" id="GH"/>
   <person name="Bernhard Huber" email="huber@apache.org" id="BH"/>
   <person name="Ivelin Atanasoff Ivanov" email="ivelin@apache.org" id="IAI"/>
+  <person name="Jasha Joachimsthal" email="jasha@apache.org" id="JSJ"/>
   <person name="Jason Johnston" email="jjohnston@apache.org" id="JJ"/>
   <person name="Grzegorz Kossakowski" email="gkossakowski@apache.org" id="GK"/>
   <person name="Matthew Langham" email="mlangham@apache.org" id="ML"/>
@@ -181,14 +183,73 @@
   </todo>
 
   <changes>
-  <release version="2.1.12" date="TBD">
+  <release version="2.1.13" date="TBD">
+    <action dev="XXX" type="add">
+      DUMMY
+    </action>
+  </release>
+  <release version="2.1.12" date="March 14 2013">
     <!-- Leave this entry about raising minimum Java to 1.4 at the top for 2.1.12! -->
     <action dev="all" type="update">
       Starting with 2.1.12 the minimum required Java version will be 1.4.2.
     </action>
+    <action dev="DC" type="update" fixes-bug="COCOON-2333">
+      Core: Update xml-commons-resolver to 1.2
+    </action>
+    <action dev="CD" type="add" fixes-bug="COCOON-2288" due-to="Laurent Medioni" due-to-email="lmedioni@temenos.com">
+      Allow usage of SLF4J for traces
+    </action>
+    <action dev="CD" type="fix" fixes-bug="COCOON-1529" due-to="Johannes Textor">
+      I18nTranformer should consume and stop propagating start/endPrefixMapping of its namespace
+    </action>
+    <action dev="CD" type="fix" fixes-bug="COCOON-2069" due-to="Jeroen Reijn">
+      Cocoon 2.1 is not initialized when building without samples
+    </action>
+    <action dev="CD" fixes-bug="COCOON-2310" type="update">
+      Serializers block: Added support of XHTML5 in the XHTMLSerializer
+    </action>
+    <action dev="CD" fixes-bug="COCOON-2307" type="fix">
+      Core: When interrupted, the ResourceReader may store incomplete data in the cache
+    </action>
+    <action dev="CD" fixes-bug="COCOON-2314" type="update">
+      Core: Allow to override the upload parameters in CocoonServlet
+    </action>
+    <action dev="AG" type="update">
+      Core: Update xercesImpl to 2.11.0 and xml-apis to 1.4.01.
+    </action>
+    <action dev="JSJ" type="fix" fixes-bug="COCOON-2104" due-to="Andrew Cave" due-to-email="ajcave@ualberta.ca">
+      Add base URI fixup support to XIncludeTransformer
+    </action>
+    <action dev="JSJ" type="fix" fixes-bug="COCOON-2041" due-to="Edward Riede" due-to-email="edriede@yahoo.com">
+      Repository block: WebDAV Returns improper status on PUT
+    </action>
+    <action dev="JSJ" type="update" fixes-bug="COCOON-2289" due-to="Cédric Damioli" due-to-email="cedric.damioli@anyware-services.com">
+      FOP block: Backport from FOPNGSerializer (C2.2) to FOPSerializer. Upgraded FOP dependency from 0.20.5 to 0.95.
+    </action>
+    <action dev="JSJ" type="add" fixes-bug="COCOON-2278" due-to="Nico Verwer" due-to-email="nverwer@email.com">
+      XSP block: Make SOAPHelper use https, not just http
+    </action>
+    <action dev="SW" type="fix" fixes-bug="COCOON-2286" due-to="Cédric Damioli" due-to-email="cedric.damioli@anyware-services.com">
+      Serializer block: charset data won't load if there's a space in the path to the jar file (e.g "C:\Program Files\MyApp\...")
+    </action>
+    <action dev="JSJ" type="fix" fixes-bug="COCOON-2257">
+      JCR block: Missing modCount attribute in JCR sample content.
+    </action>
+    <action dev="AG" type="update">
+      Updated ant to 1.7.1. This ant detects correctly java 1.6.
+    </action>
+    <action dev="JH" type="update" fixes-bug="COCOON-1887" due-to="Andrew Stevens" due-to-email="stevensa@users.sourceforge.net">
+      Change HostSelector to be case-insensitive according to RFC3986 section 3.2.2.
+    </action>
+    <action dev="JH" type="add" fixes-bug="COCOON-2243" due-to="Benjamin Boksa" due-to-email="benjamin@boksa.de">
+      Handle case in ApplicationUtil.isUserInRole(..) when User is null.
+    </action>
     <action dev="AG" type="fix" fixes-bug="COCOON-1822" due-to="Karen Torres &amp; Rafael Márquez" due-to-email="ktorres@agssa.net &amp; rmarquez@agssa.net">
       Forms: MultiValueField list-type="double-listbox" does not work correctly in ajax enabled forms.
     </action>
+    <action dev="JSJ" type="fix" fixes-bug="COCOON-2228">
+      StripNameSpacesTransformer does not strip namespace prefix of attributes
+    </action>
     <action dev="AN" type="fix" fixes-bug="COCOON-2169" due-to="Mark Lundquist" due-to-email="lundquist.mark@gmail.com">
       ImageOp block: If parameter width or height in resize operation is zero, use the original image size.
       If both are zero, then handle as no-op.  Set default values to zero to allow using that feature by

Modified: cocoon/branches/BRANCH_2_1_X-dojo1_1/tools/bin/ant
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X-dojo1_1/tools/bin/ant?rev=1573205&r1=1573204&r2=1573205&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X-dojo1_1/tools/bin/ant (original)
+++ cocoon/branches/BRANCH_2_1_X-dojo1_1/tools/bin/ant Sat Mar  1 18:02:14 2014
@@ -1,19 +1,19 @@
 #! /bin/sh
 
-#   Licensed to the Apache Software Foundation (ASF) under one or more
-#   contributor license agreements.  See the NOTICE file distributed with
-#   this work for additional information regarding copyright ownership.
-#   The ASF licenses this file to You 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
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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
+#     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.
+# 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.
 
 # Extract launch and ant arguments, (see details below).
 ant_exec_args=
@@ -44,9 +44,11 @@ if $no_config ; then
   rpm_mode=false
   usejikes=$use_jikes_default
 else
-  # load system-wide ant configuration
-  if [ -f "/etc/ant.conf" ] ; then
-    . /etc/ant.conf
+  # load system-wide ant configuration (ONLY if ANT_HOME has NOT been set)
+  if [ -z "$ANT_HOME" -o "$ANT_HOME" = "/usr/share/ant" ]; then
+      if [ -f "/etc/ant.conf" ] ; then
+          . /etc/ant.conf
+      fi
   fi
 
   # load user ant configuration
@@ -106,7 +108,7 @@ if [ -z "$ANT_HOME" -o ! -d "$ANT_HOME" 
   ANT_HOME=`dirname "$PRG"`/..
 
   # make it fully qualified
-  ANT_HOME=`cd "$ANT_HOME" && pwd`
+  ANT_HOME=`cd "$ANT_HOME" > /dev/null && pwd`
 fi
 
 # For Cygwin, ensure paths are in UNIX format before anything is touched
@@ -122,9 +124,11 @@ ANT_LIB="${ANT_HOME}/lib"
 
 if [ -z "$JAVACMD" ] ; then
   if [ -n "$JAVA_HOME"  ] ; then
+    # IBM's JDK on AIX uses strange locations for the executables
     if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
-      # IBM's JDK on AIX uses strange locations for the executables
       JAVACMD="$JAVA_HOME/jre/sh/java"
+    elif [ -x "$JAVA_HOME/jre/bin/java" ] ; then
+      JAVACMD="$JAVA_HOME/jre/bin/java"
     else
       JAVACMD="$JAVA_HOME/bin/java"
     fi
@@ -145,12 +149,34 @@ fi
 # Build local classpath using just the launcher in non-rpm mode or
 # use the Jpackage helper in rpm mode with basic and default jars
 # specified in the ant.conf configuration. Because the launcher is
-# used, libraries linked in ANT_HOME will also be include, but this
+# used, libraries linked in ANT_HOME/lib will also be included, but this
 # is discouraged as it is not java-version safe. A user should
 # request optional jars and their dependencies via the OPT_JAR_LIST
 # variable
-if $rpm_mode && [ -f /usr/bin/build-classpath ] ; then
+if $rpm_mode && [ -x /usr/bin/build-classpath ] ; then
   LOCALCLASSPATH="$(/usr/bin/build-classpath ant ant-launcher jaxp_parser_impl xml-commons-apis)"
+
+  # If no optional jars have been specified then build the default list
+  if [ -z "$OPT_JAR_LIST" ] ; then
+    for file in /etc/ant.d/*; do
+      if [ -f "$file" ]; then
+        case "$file" in
+        *~) ;;
+        *#*) ;;
+        *.rpmsave) ;;
+        *.rpmnew) ;;
+        *)
+          for dep in `cat "$file"`; do
+            case "$OPT_JAR_LIST" in
+            *"$dep"*) ;;
+            *) OPT_JAR_LIST="$OPT_JAR_LIST${OPT_JAR_LIST:+ }$dep"
+            esac
+          done
+        esac
+      fi
+    done
+  fi
+
   # If the user requested to try to add some other jars to the classpath
   if [ -n "$OPT_JAR_LIST" ] ; then
     _OPTCLASSPATH="$(/usr/bin/build-classpath $OPT_JAR_LIST 2> /dev/null)"

Modified: cocoon/branches/BRANCH_2_1_X-dojo1_1/tools/bin/ant.bat
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X-dojo1_1/tools/bin/ant.bat?rev=1573205&r1=1573204&r2=1573205&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X-dojo1_1/tools/bin/ant.bat (original)
+++ cocoon/branches/BRANCH_2_1_X-dojo1_1/tools/bin/ant.bat Sat Mar  1 18:02:14 2014
@@ -6,27 +6,56 @@ REM  this work for additional informatio
 REM  The ASF licenses this file to You under the Apache License, Version 2.0
 REM  (the "License"); you may not use this file except in compliance with
 REM  the License.  You may obtain a copy of the License at
-REM
+REM 
 REM      http://www.apache.org/licenses/LICENSE-2.0
-REM
+REM 
 REM  Unless required by applicable law or agreed to in writing, software
 REM  distributed under the License is distributed on an "AS IS" BASIS,
 REM  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 REM  See the License for the specific language governing permissions and
 REM  limitations under the License.
 
+REM This is an inordinately troublesome piece of code, particularly because it
+REM tries to work on both Win9x and WinNT-based systems. If we could abandon '9x
+REM support, things would be much easier, but sadly, it is not yet time.
+REM Be cautious about editing this, and only add WinNT specific stuff in code that
+REM only runs on WinNT.
+
+if "%HOME%"=="" goto homeDrivePathPre
 if exist "%HOME%\antrc_pre.bat" call "%HOME%\antrc_pre.bat"
 
+:homeDrivePathPre
+if "%HOMEDRIVE%%HOMEPATH%"=="" goto userProfilePre
+if "%HOMEDRIVE%%HOMEPATH%"=="%HOME%" goto userProfilePre
+if exist "%HOMEDRIVE%%HOMEPATH%\antrc_pre.bat" call "%HOMEDRIVE%%HOMEPATH%\antrc_pre.bat"
+
+:userProfilePre
+if "%USERPROFILE%"=="" goto alpha
+if "%USERPROFILE%"=="%HOME%" goto alpha
+if "%USERPROFILE%"=="%HOMEDRIVE%%HOMEPATH%" goto alpha
+if exist "%USERPROFILE%\antrc_pre.bat" call "%USERPROFILE%\antrc_pre.bat"
+
+:alpha
+
 if "%OS%"=="Windows_NT" @setlocal
 if "%OS%"=="WINNT" @setlocal
 
-rem %~dp0 is expanded pathname of the current script under NT
-set DEFAULT_ANT_HOME=%~dp0..
+if "%ANT_HOME%"=="" goto setDefaultAntHome
 
-if "%ANT_HOME%"=="" set ANT_HOME=%DEFAULT_ANT_HOME%
-set DEFAULT_ANT_HOME=
+:stripAntHome
+if not _%ANT_HOME:~-1%==_\ goto checkClasspath
+set ANT_HOME=%ANT_HOME:~0,-1%
+goto stripAntHome
 
+:setDefaultAntHome
+rem %~dp0 is expanded pathname of the current script under NT
+set ANT_HOME=%~dp0..
+
+:checkClasspath
 set _USE_CLASSPATH=yes
+rem CLASSPATH must not be used if it is equal to ""
+if "%CLASSPATH%"=="""" set _USE_CLASSPATH=no
+if "%CLASSPATH%"=="" set _USE_CLASSPATH=no
 
 rem Slurp the command line arguments. This loop allows for an unlimited number
 rem of arguments (up to the command line limit, anyway).
@@ -50,6 +79,15 @@ rem This label provides a place for the 
 rem and for NT handling to skip to.
 
 :doneStart
+
+if _USE_CLASSPATH==no goto findAntHome
+
+:stripClasspath
+if not _%CLASSPATH:~-1%==_\ goto findAntHome
+set CLASSPATH=%CLASSPATH:~0,-1%
+goto stripClasspath
+
+:findAntHome
 rem find ANT_HOME if it does not exist due to either an invalid value passed
 rem by the user or the %0 problem on Windows 9x
 if exist "%ANT_HOME%\lib\ant.jar" goto checkJava
@@ -91,37 +129,98 @@ if not "%JIKESPATH%"=="" goto runAntWith
 
 :runAnt
 if "%_USE_CLASSPATH%"=="no" goto runAntNoClasspath
-if not "%CLASSPATH%"=="" goto runAntWithClasspath
-"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% %ANT_CMD_LINE_ARGS%
+:runAntWithClasspath
+"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% -cp "%CLASSPATH%" %ANT_CMD_LINE_ARGS%
+rem Check the error code of the Ant build
+if not "%OS%"=="Windows_NT" goto onError
+set ANT_ERROR=%ERRORLEVEL%
 goto end
 
 :runAntNoClasspath
 "%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% %ANT_CMD_LINE_ARGS%
-goto end
-
-:runAntWithClasspath
-"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% -cp "%CLASSPATH%" %ANT_CMD_LINE_ARGS%
+rem Check the error code of the Ant build
+if not "%OS%"=="Windows_NT" goto onError
+set ANT_ERROR=%ERRORLEVEL%
 goto end
 
 :runAntWithJikes
-if "%_USE_CLASSPATH%"=="no" goto runAntWithJikesNoClasspath
-if not "%CLASSPATH%"=="" goto runAntWithJikesAndClasspath
 
-:runAntWithJikesNoClasspath
-"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" "-Djikes.class.path=%JIKESPATH%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% %ANT_CMD_LINE_ARGS%
-goto end
+if not _%JIKESPATH:~-1%==_\ goto checkJikesAndClasspath
+set JIKESPATH=%JIKESPATH:~0,-1%
+goto runAntWithJikes
+
+:checkJikesAndClasspath
+
+if "%_USE_CLASSPATH%"=="no" goto runAntWithJikesNoClasspath
 
 :runAntWithJikesAndClasspath
 "%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" "-Djikes.class.path=%JIKESPATH%" org.apache.tools.ant.launch.Launcher %ANT_ARGS%  -cp "%CLASSPATH%" %ANT_CMD_LINE_ARGS%
+rem Check the error code of the Ant build
+if not "%OS%"=="Windows_NT" goto onError
+set ANT_ERROR=%ERRORLEVEL%
 goto end
 
+:runAntWithJikesNoClasspath
+"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar" "-Dant.home=%ANT_HOME%" "-Djikes.class.path=%JIKESPATH%" org.apache.tools.ant.launch.Launcher %ANT_ARGS% %ANT_CMD_LINE_ARGS%
+rem Check the error code of the Ant build
+if not "%OS%"=="Windows_NT" goto onError
+set ANT_ERROR=%ERRORLEVEL%
+goto end
+
+:onError
+rem Windows 9x way of checking the error code.  It matches via brute force.
+for %%i in (1 10 100) do set err%%i=
+for %%i in (0 1 2) do if errorlevel %%i00 set err100=%%i
+if %err100%==2 goto onError200
+if %err100%==0 set err100=
+for %%i in (0 1 2 3 4 5 6 7 8 9) do if errorlevel %err100%%%i0 set err10=%%i
+if "%err100%"=="" if %err10%==0 set err10=
+:onError1
+for %%i in (0 1 2 3 4 5 6 7 8 9) do if errorlevel %err100%%err10%%%i set err1=%%i
+goto onErrorEnd
+:onError200
+for %%i in (0 1 2 3 4 5) do if errorlevel 2%%i0 set err10=%%i
+if err10==5 for %%i in (0 1 2 3 4 5) do if errorlevel 25%%i set err1=%%i
+if not err10==5 goto onError1
+:onErrorEnd
+set ANT_ERROR=%err100%%err10%%err1%
+for %%i in (1 10 100) do set err%%i=
+
 :end
-set _JAVACMD=
-set ANT_CMD_LINE_ARGS=
+rem bug ID 32069: resetting an undefined env variable changes the errorlevel.
+if not "%_JAVACMD%"=="" set _JAVACMD=
+if not "%_ANT_CMD_LINE_ARGS%"=="" set ANT_CMD_LINE_ARGS=
+
+if "%ANT_ERROR%"=="0" goto mainEnd
 
+rem Set the return code if we are not in NT.  We can only set
+rem a value of 1, but it's better than nothing.
+if not "%OS%"=="Windows_NT" echo 1 > nul | choice /n /c:1
+
+rem Set the ERRORLEVEL if we are running NT.
+if "%OS%"=="Windows_NT" color 00
+
+goto omega
+
+:mainEnd
+
+rem If there were no errors, we run the post script.
 if "%OS%"=="Windows_NT" @endlocal
 if "%OS%"=="WINNT" @endlocal
 
-:mainEnd
+if "%HOME%"=="" goto homeDrivePathPost
 if exist "%HOME%\antrc_post.bat" call "%HOME%\antrc_post.bat"
 
+:homeDrivePathPost
+if "%HOMEDRIVE%%HOMEPATH%"=="" goto userProfilePost
+if "%HOMEDRIVE%%HOMEPATH%"=="%HOME%" goto userProfilePost
+if exist "%HOMEDRIVE%%HOMEPATH%\antrc_post.bat" call "%HOMEDRIVE%%HOMEPATH%\antrc_post.bat"
+
+:userProfilePost
+if "%USERPROFILE%"=="" goto omega
+if "%USERPROFILE%"=="%HOME%" goto omega
+if "%USERPROFILE%"=="%HOMEDRIVE%%HOMEPATH%" goto omega
+if exist "%USERPROFILE%\antrc_post.bat" call "%USERPROFILE%\antrc_post.bat"
+
+:omega
+

Modified: cocoon/branches/BRANCH_2_1_X-dojo1_1/tools/bin/ant.cmd
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X-dojo1_1/tools/bin/ant.cmd?rev=1573205&r1=1573204&r2=1573205&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X-dojo1_1/tools/bin/ant.cmd (original)
+++ cocoon/branches/BRANCH_2_1_X-dojo1_1/tools/bin/ant.cmd Sat Mar  1 18:02:14 2014
@@ -1,18 +1,18 @@
 /* 
-    Licensed to the Apache Software Foundation (ASF) under one or more
-    contributor license agreements.  See the NOTICE file distributed with
-    this work for additional information regarding copyright ownership.
-    The ASF licenses this file to You 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.
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You 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.
  
     Run ant
 */

Modified: cocoon/branches/BRANCH_2_1_X-dojo1_1/tools/bin/antRun
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X-dojo1_1/tools/bin/antRun?rev=1573205&r1=1573204&r2=1573205&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X-dojo1_1/tools/bin/antRun (original)
+++ cocoon/branches/BRANCH_2_1_X-dojo1_1/tools/bin/antRun Sat Mar  1 18:02:14 2014
@@ -1,22 +1,19 @@
-#!/bin/sh
+#! /bin/sh
 
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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
 #
-#  Licensed to the Apache Software Foundation (ASF) under one or more
-#  contributor license agreements.  See the NOTICE file distributed with
-#  this work for additional information regarding copyright ownership.
-#  The ASF licenses this file to You 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.
-# 
+#     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.
 
 # Args: DIR command
 cd "$1"

Modified: cocoon/branches/BRANCH_2_1_X-dojo1_1/tools/bin/antRun.bat
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X-dojo1_1/tools/bin/antRun.bat?rev=1573205&r1=1573204&r2=1573205&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X-dojo1_1/tools/bin/antRun.bat (original)
+++ cocoon/branches/BRANCH_2_1_X-dojo1_1/tools/bin/antRun.bat Sat Mar  1 18:02:14 2014
@@ -1,22 +1,19 @@
 @echo off
 
-REM
-REM Licensed to the Apache Software Foundation (ASF) under one or more
-REM contributor license agreements.  See the NOTICE file distributed with
-REM this work for additional information regarding copyright ownership.
-REM The ASF licenses this file to You under the Apache License, Version 2.0
-REM (the "License"); you may not use this file except in compliance with
-REM the License.  You may obtain a copy of the License at
-REM
+REM  Licensed to the Apache Software Foundation (ASF) under one or more
+REM  contributor license agreements.  See the NOTICE file distributed with
+REM  this work for additional information regarding copyright ownership.
+REM  The ASF licenses this file to You under the Apache License, Version 2.0
+REM  (the "License"); you may not use this file except in compliance with
+REM  the License.  You may obtain a copy of the License at
+REM 
 REM      http://www.apache.org/licenses/LICENSE-2.0
-REM
+REM 
 REM  Unless required by applicable law or agreed to in writing, software
 REM  distributed under the License is distributed on an "AS IS" BASIS,
 REM  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 REM  See the License for the specific language governing permissions and
 REM  limitations under the License.
-REM
-REM
 
 if "%OS%"=="Windows_NT" @setlocal
 if "%OS%"=="WINNT" @setlocal
@@ -24,12 +21,17 @@ if "%OS%"=="WINNT" @setlocal
 if ""%1""=="""" goto runCommand
 
 rem Change drive and directory to %1
-if "%OS%"=="Windows_NT" cd /d ""%1""
-if not "%OS%"=="Windows_NT" cd ""%1""
+if "%OS%"=="Windows_NT" goto nt_cd
+if "%OS%"=="WINNT" goto nt_cd
+cd ""%1""
+goto end_cd
+:nt_cd
+cd /d ""%1""
+:end_cd
 shift
 
 rem Slurp the command line arguments. This loop allows for an unlimited number
-rem of agruments (up to the command line limit, anyway).
+rem of arguments (up to the command line limit, anyway).
 set ANT_RUN_CMD=%1
 if ""%1""=="""" goto runCommand
 shift

Modified: cocoon/branches/BRANCH_2_1_X-dojo1_1/tools/bin/antRun.pl
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X-dojo1_1/tools/bin/antRun.pl?rev=1573205&r1=1573204&r2=1573205&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X-dojo1_1/tools/bin/antRun.pl (original)
+++ cocoon/branches/BRANCH_2_1_X-dojo1_1/tools/bin/antRun.pl Sat Mar  1 18:02:14 2014
@@ -1,11 +1,11 @@
 #!/usr/bin/perl
 #
 # Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You 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
+#  contributor license agreements.  See the NOTICE file distributed with
+#  this work for additional information regarding copyright ownership.
+#  The ASF licenses this file to You 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
 #

Modified: cocoon/branches/BRANCH_2_1_X-dojo1_1/tools/bin/antenv.cmd
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X-dojo1_1/tools/bin/antenv.cmd?rev=1573205&r1=1573204&r2=1573205&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X-dojo1_1/tools/bin/antenv.cmd (original)
+++ cocoon/branches/BRANCH_2_1_X-dojo1_1/tools/bin/antenv.cmd Sat Mar  1 18:02:14 2014
@@ -1,20 +1,18 @@
 /* 
-    Licensed to the Apache Software Foundation (ASF) under one or more
-    contributor license agreements.  See the NOTICE file distributed with
-    this work for additional information regarding copyright ownership.
-    The ASF licenses this file to You 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.
-
-    Ant environment
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You 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.
 */
 
 '@echo off'

Modified: cocoon/branches/BRANCH_2_1_X-dojo1_1/tools/bin/complete-ant-cmd.pl
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X-dojo1_1/tools/bin/complete-ant-cmd.pl?rev=1573205&r1=1573204&r2=1573205&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X-dojo1_1/tools/bin/complete-ant-cmd.pl (original)
+++ cocoon/branches/BRANCH_2_1_X-dojo1_1/tools/bin/complete-ant-cmd.pl Sat Mar  1 18:02:14 2014
@@ -1,11 +1,11 @@
 #!/usr/bin/perl
 #
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You 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
+#  Licensed to the Apache Software Foundation (ASF) under one or more
+#  contributor license agreements.  See the NOTICE file distributed with
+#  this work for additional information regarding copyright ownership.
+#  The ASF licenses this file to You 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
 #

Modified: cocoon/branches/BRANCH_2_1_X-dojo1_1/tools/bin/envset.cmd
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X-dojo1_1/tools/bin/envset.cmd?rev=1573205&r1=1573204&r2=1573205&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X-dojo1_1/tools/bin/envset.cmd (original)
+++ cocoon/branches/BRANCH_2_1_X-dojo1_1/tools/bin/envset.cmd Sat Mar  1 18:02:14 2014
@@ -1,19 +1,19 @@
 /*
 
-    Licensed to the Apache Software Foundation (ASF) under one or more
-    contributor license agreements.  See the NOTICE file distributed with
-    this work for additional information regarding copyright ownership.
-    The ASF licenses this file to You 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.
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You 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.
 
 SET environment variables
 First optional parameter:

Modified: cocoon/branches/BRANCH_2_1_X-dojo1_1/tools/bin/lcp.bat
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X-dojo1_1/tools/bin/lcp.bat?rev=1573205&r1=1573204&r2=1573205&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X-dojo1_1/tools/bin/lcp.bat (original)
+++ cocoon/branches/BRANCH_2_1_X-dojo1_1/tools/bin/lcp.bat Sat Mar  1 18:02:14 2014
@@ -1,13 +1,13 @@
 REM
-REM Licensed to the Apache Software Foundation (ASF) under one or more
-REM contributor license agreements.  See the NOTICE file distributed with
-REM this work for additional information regarding copyright ownership.
-REM The ASF licenses this file to You under the Apache License, Version 2.0
-REM (the "License"); you may not use this file except in compliance with
-REM the License.  You may obtain a copy of the License at
-REM
+REM  Licensed to the Apache Software Foundation (ASF) under one or more
+REM  contributor license agreements.  See the NOTICE file distributed with
+REM  this work for additional information regarding copyright ownership.
+REM  The ASF licenses this file to You under the Apache License, Version 2.0
+REM  (the "License"); you may not use this file except in compliance with
+REM  the License.  You may obtain a copy of the License at
+REM 
 REM      http://www.apache.org/licenses/LICENSE-2.0
-REM
+REM 
 REM  Unless required by applicable law or agreed to in writing, software
 REM  distributed under the License is distributed on an "AS IS" BASIS,
 REM  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -27,5 +27,5 @@ shift
 goto argCheck
 
 :gotAllArgs
-set LOCALCLASSPATH=%_CLASSPATHCOMPONENT%;%LOCALCLASSPATH%
+set LOCALCLASSPATH=%LOCALCLASSPATH%;%_CLASSPATHCOMPONENT%
 

Modified: cocoon/branches/BRANCH_2_1_X-dojo1_1/tools/bin/runant.pl
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X-dojo1_1/tools/bin/runant.pl?rev=1573205&r1=1573204&r2=1573205&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X-dojo1_1/tools/bin/runant.pl (original)
+++ cocoon/branches/BRANCH_2_1_X-dojo1_1/tools/bin/runant.pl Sat Mar  1 18:02:14 2014
@@ -1,11 +1,11 @@
 #!/usr/bin/perl
 #
 # Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You 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
+#  contributor license agreements.  See the NOTICE file distributed with
+#  this work for additional information regarding copyright ownership.
+#  The ASF licenses this file to You 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
 #

Modified: cocoon/branches/BRANCH_2_1_X-dojo1_1/tools/bin/runant.py
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X-dojo1_1/tools/bin/runant.py?rev=1573205&r1=1573204&r2=1573205&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X-dojo1_1/tools/bin/runant.py (original)
+++ cocoon/branches/BRANCH_2_1_X-dojo1_1/tools/bin/runant.py Sat Mar  1 18:02:14 2014
@@ -1,10 +1,10 @@
 #!/usr/bin/python
 # Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You 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
+#  contributor license agreements.  See the NOTICE file distributed with
+#  this work for additional information regarding copyright ownership.
+#  The ASF licenses this file to You 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
 #
@@ -96,6 +96,7 @@ cmdline = ('%s %s -classpath %s -Dant.ho
 
 if debug:
     print '\n%s\n\n' % (cmdline)
+sys.stdout.flush()
 
 # Run the biniou!
 os.system(cmdline)

Modified: cocoon/branches/BRANCH_2_1_X-dojo1_1/tools/bin/runrc.cmd
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X-dojo1_1/tools/bin/runrc.cmd?rev=1573205&r1=1573204&r2=1573205&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X-dojo1_1/tools/bin/runrc.cmd (original)
+++ cocoon/branches/BRANCH_2_1_X-dojo1_1/tools/bin/runrc.cmd Sat Mar  1 18:02:14 2014
@@ -1,21 +1,21 @@
 /* 
-    Licensed to the Apache Software Foundation (ASF) under one or more
-    contributor license agreements.  See the NOTICE file distributed with
-    this work for additional information regarding copyright ownership.
-    The ASF licenses this file to You 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.
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You 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.
 
-    Run RC file, name is in the first arg, second arg is either PATH
-    ENV  or -r or nothing 
+   Run RC file, name is in the first arg, second arg is either PATH
+   ENV  or -r or nothing 
 */
 
 parse arg name path rest

Modified: cocoon/branches/BRANCH_2_1_X-dojo1_1/tools/lib/ant-junit.jar
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X-dojo1_1/tools/lib/ant-junit.jar?rev=1573205&r1=1573204&r2=1573205&view=diff
==============================================================================
Binary files - no diff available.

Modified: cocoon/branches/BRANCH_2_1_X-dojo1_1/tools/lib/ant-launcher.jar
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X-dojo1_1/tools/lib/ant-launcher.jar?rev=1573205&r1=1573204&r2=1573205&view=diff
==============================================================================
Binary files - no diff available.

Modified: cocoon/branches/BRANCH_2_1_X-dojo1_1/tools/lib/ant-trax.jar
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X-dojo1_1/tools/lib/ant-trax.jar?rev=1573205&r1=1573204&r2=1573205&view=diff
==============================================================================
Binary files - no diff available.

Modified: cocoon/branches/BRANCH_2_1_X-dojo1_1/tools/lib/ant.jar
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X-dojo1_1/tools/lib/ant.jar?rev=1573205&r1=1573204&r2=1573205&view=diff
==============================================================================
Binary files - no diff available.

Modified: cocoon/branches/BRANCH_2_1_X-dojo1_1/tools/src/blocks-build.xsl
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X-dojo1_1/tools/src/blocks-build.xsl?rev=1573205&r1=1573204&r2=1573205&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X-dojo1_1/tools/src/blocks-build.xsl (original)
+++ cocoon/branches/BRANCH_2_1_X-dojo1_1/tools/src/blocks-build.xsl Sat Mar  1 18:02:14 2014
@@ -31,6 +31,12 @@
         <fileset dir="${{lib.endorsed}}">
           <include name="*.jar"/>
         </fileset>
+        <fileset dir="${{lib.local}}">
+          <include name="*.jar"/>
+        </fileset>
+        <fileset dir="${{lib.optional}}">
+          <include name="*.jar"/>
+        </fileset>
         <!-- Currently, we have no JVM dependent libraries
           <fileset dir="${{lib.core}}/jvm${{target.vm}}">
              <include name="*.jar"/>
@@ -157,6 +163,7 @@
              debug="${{compiler.debug}}"
              optimize="${{compiler.optimize}}"
              deprecation="${{compiler.deprecation}}"
+             source="${{source.vm}}"
              target="${{target.vm}}"
              nowarn="${{compiler.nowarn}}"
              compiler="${{compiler}}">
@@ -229,6 +236,7 @@
              debug="${{compiler.debug}}"
              optimize="${{compiler.optimize}}"
              deprecation="${{compiler.deprecation}}"
+             source="${{source.vm}}"
              target="${{target.vm}}"
              nowarn="${{compiler.nowarn}}"
              compiler="${{compiler}}">
@@ -433,6 +441,7 @@
                      optimize="${{compiler.optimize}}"
                      deprecation="${{compiler.deprecation}}"
                      target="${{target.vm}}"
+                     source="${{source.vm}}"
                      nowarn="${{compiler.nowarn}}"
                      compiler="${{compiler}}">
                 <src path="@{{dir}}/test/org/apache"/>
@@ -493,6 +502,7 @@
                      optimize="${{compiler.optimize}}"
                      deprecation="${{compiler.deprecation}}"
                      target="${{target.vm}}"
+                     source="${{source.vm}}"
                      nowarn="${{compiler.nowarn}}"
                      compiler="${{compiler}}">
                 <src path="@{{dir}}/test/htmlunit"/>

Modified: cocoon/branches/BRANCH_2_1_X-dojo1_1/tools/targets/dist-build.xml
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X-dojo1_1/tools/targets/dist-build.xml?rev=1573205&r1=1573204&r2=1573205&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X-dojo1_1/tools/targets/dist-build.xml (original)
+++ cocoon/branches/BRANCH_2_1_X-dojo1_1/tools/targets/dist-build.xml Sat Mar  1 18:02:14 2014
@@ -76,7 +76,13 @@
     <zip zipfile="${dist.target}/${dist.name}-src.zip"
          basedir="${dist.root}"
          includes="${dist.name}/**">
+        <exclude name="${dist.name}/lib/**"/>
+        <exclude name="${dist.name}/tools/lib/**"/>
+        <exclude name="${dist.name}/tools/jetty/lib/**"/>
+        <exclude name="${dist.name}/legal/**"/>
     </zip>
+    <checksum file="${dist.target}/${dist.name}-src.zip" algorithm="md5"/>
+    <checksum file="${dist.target}/${dist.name}-src.zip" algorithm="sha1"/>
 
     <tar tarfile="${dist.target}/${dist.name}-src.tar"
          longfile="gnu">
@@ -85,6 +91,10 @@
              <exclude name="${dist.name}/cocoon.sh"/>
              <exclude name="${dist.name}/build.sh"/>
              <exclude name="${dist.name}/tools/bin/antRun"/>
+             <exclude name="${dist.name}/lib/**"/>
+             <exclude name="${dist.name}/tools/lib/**"/>
+             <exclude name="${dist.name}/tools/jetty/lib/**"/>
+             <exclude name="${dist.name}/legal/**"/>
          </tarfileset>
          <tarfileset dir="${dist.root}" mode="755">
              <include name="${dist.name}/cocoon.sh"/>
@@ -94,6 +104,39 @@
     </tar>
     <gzip zipfile="${dist.target}/${dist.name}-src.tar.gz" src="${dist.target}/${dist.name}-src.tar"/>
     <delete file="${dist.target}/${dist.name}-src.tar"/>
+    <checksum file="${dist.target}/${dist.name}-src.tar.gz" algorithm="md5"/>
+    <checksum file="${dist.target}/${dist.name}-src.tar.gz" algorithm="sha1"/>
+
+    <zip zipfile="${dist.target}/${dist.name}-deps.zip">
+    	<fileset dir="${dist.root}">
+            <include name="${dist.name}/lib/**"/>
+            <include name="${dist.name}/tools/lib/**"/>
+            <include name="${dist.name}/tools/jetty/lib/**"/>
+    	</fileset>
+        <zipfileset dir="${dist.root}/${dist.name}/legal" prefix="${dist.name}/">
+            <include name="NOTICE.txt"/>
+            <include name="LICENSE.txt"/>
+        </zipfileset>
+    </zip>
+    <checksum file="${dist.target}/${dist.name}-deps.zip" algorithm="md5"/>
+    <checksum file="${dist.target}/${dist.name}-deps.zip" algorithm="sha1"/>
+
+    <tar tarfile="${dist.target}/${dist.name}-deps.tar"
+         longfile="gnu">
+        <tarfileset dir="${dist.root}">
+            <include name="${dist.name}/lib/**"/>
+            <include name="${dist.name}/tools/lib/**"/>
+            <include name="${dist.name}/tools/jetty/lib/**"/>
+        </tarfileset>
+        <tarfileset dir="${dist.root}/${dist.name}/legal" prefix="${dist.name}/">
+            <include name="NOTICE.txt"/>
+            <include name="LICENSE.txt"/>
+        </tarfileset>
+    </tar>
+    <gzip zipfile="${dist.target}/${dist.name}-deps.tar.gz" src="${dist.target}/${dist.name}-deps.tar"/>
+    <delete file="${dist.target}/${dist.name}-deps.tar"/>
+    <checksum file="${dist.target}/${dist.name}-deps.tar.gz" algorithm="md5"/>
+    <checksum file="${dist.target}/${dist.name}-deps.tar.gz" algorithm="sha1"/>
   </target>
 
   <target name="clean-dist" depends="clean" description="Cleans everything and brings back to original 'SVN checkout' state">

Modified: cocoon/branches/BRANCH_2_1_X-dojo1_1/tools/targets/init-build.xml
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X-dojo1_1/tools/targets/init-build.xml?rev=1573205&r1=1573204&r2=1573205&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X-dojo1_1/tools/targets/init-build.xml (original)
+++ cocoon/branches/BRANCH_2_1_X-dojo1_1/tools/targets/init-build.xml Sat Mar  1 18:02:14 2014
@@ -187,6 +187,23 @@
 
   <!-- Prepare the build directory -->
   <target name="prepare" depends="init-tasks">
+    <!-- Test presence of libs -->
+    <if>
+      <not>
+        <available file="${lib}"/>
+      </not>
+      <then>
+        <echo>====================================================================
+          WARNING : dependencies not found
+====================================================================
+          Third party libraries must be present in order to build Cocoon.
+          You may download the cocoon-${version}-deps.zip and unzip
+          its content in this directory to get these libraries.
+====================================================================</echo>
+        <fail message="dependencies not found"/>
+      </then>
+    </if>
+
     <echo>====================================================================
                  ${fullname} ${version} [${year}]
 ====================================================================



Mime
View raw message