[jboss-svn-commits] JBoss Common SVN: r1935 - in tags: . JBossCommon-1.0.2 JBossCommon-1.0.2/src/main/org/jboss/util/xml JBossCommon-1.0.2/tools/etc/buildmagic

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Thu Aug 10 12:43:22 EDT 2006


Author: thomas.diesler at jboss.com
Date: 2006-08-10 12:43:17 -0400 (Thu, 10 Aug 2006)
New Revision: 1935

Added:
   tags/JBossCommon-1.0.2/
   tags/JBossCommon-1.0.2/build.xml
   tags/JBossCommon-1.0.2/src/main/org/jboss/util/xml/DOMUtils.java
   tags/JBossCommon-1.0.2/src/main/org/jboss/util/xml/DOMWriter.java
   tags/JBossCommon-1.0.2/tools/etc/buildmagic/buildmagic.ent
Removed:
   tags/JBossCommon-1.0.2/build.xml
   tags/JBossCommon-1.0.2/src/main/org/jboss/util/xml/DOMUtils.java
   tags/JBossCommon-1.0.2/src/main/org/jboss/util/xml/DOMWriter.java
   tags/JBossCommon-1.0.2/tools/etc/buildmagic/buildmagic.ent
Log:
Tag JBossCommon-1.0.2



Copied: tags/JBossCommon-1.0.2 (from rev 1932, tags/JBossCommon-1.0.1)

Deleted: tags/JBossCommon-1.0.2/build.xml
===================================================================
--- tags/JBossCommon-1.0.1/build.xml	2006-08-10 16:19:33 UTC (rev 1932)
+++ tags/JBossCommon-1.0.2/build.xml	2006-08-10 16:43:17 UTC (rev 1935)
@@ -1,250 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE project [
-   <!ENTITY buildmagic SYSTEM "tools/etc/buildmagic/buildmagic.ent">
-   <!ENTITY targets SYSTEM "tools/etc/buildmagic/targets.ent">
-]>
-
-<!-- ====================================================================== -->
-<!--                                                                        -->
-<!--  JBoss, the OpenSource J2EE webOS                                      -->
-<!--                                                                        -->
-<!--  Distributable under LGPL license.                                     -->
-<!--  See terms of license at http://www.gnu.org.                           -->
-<!--                                                                        -->
-<!-- ====================================================================== -->
-
-<!-- $Id$ -->
-
-<project default="build" name="JBoss/Common">
-
-  <!-- ================================================================== -->
-  <!-- Setup                                                              -->
-  <!-- ================================================================== -->
-
-  <!--
-     | Include the common Buildmagic elements.
-     |
-     | This defines several different targets, properties and paths.
-     | It also sets up the basic extention tasks amoung other things.
-   -->
-
-  &buildmagic;
-
-  <!--
-     | Include the normal targets.
-   -->
-  &targets;
-
-  <!-- ================================================================== -->
-  <!-- Configuration                                                      -->
-  <!-- ================================================================== -->
-
-  <!--
-     | Configure the build system.  
-     |
-     | This target is invoked by the Buildmagic initialization logic and 
-     | should contain module specific configuration elements.
-   -->
-
-  <target name="configure" unless="configure.disable">
-
-    <!-- =================== -->
-    <!-- Basic Configuration -->
-    <!-- =================== -->
-
-    <!-- Module name(s) & version -->
-    <property name="module.name" value="common"/>
-    <property name="module.Name" value="JBoss/Common"/>
-    <property name="module.version" value="DEV"/>
-
-    
-
-    <!-- The combined dependent module classpath -->
-    <path id="dependentmodule.classpath">
-    </path>
-
-    <!-- ===== -->
-    <!-- Tasks -->
-    <!-- ===== -->
-
-    <call target="_default:task-init"/>
-    
-    <!-- Set project specific properties -->
-    <property name="jboss.home" value="../build/output/jboss-${version.major}.${version.minor}.${version.revision}.${version.tag}"/>
-    <property name="server" value="default"/>
-    
-  </target>
-
-  <!-- ================================================================== -->
-  <!-- Compile                                                            -->
-  <!-- ================================================================== -->
-
-  <!-- 
-     | Compile everything.
-     |
-     | This target should depend on other compile-* targets for each 
-     | different type of compile that needs to be performed, short of
-     | documentation compiles.
-   -->
-
-  <target name="compile" depends="_default:compile-etc"
-    description="Compile all source files.">
-    <ant antfile="build-compile.xml" target="compile-classes"/>
-  </target>
-
-
-  <!-- ================================================================== -->
-  <!-- Archives                                                           -->
-  <!-- ================================================================== -->
-
-  <!-- 
-     | Build all jar files.
-   -->
-  <target name="module-jars" depends="compile">
-
-    <!-- Build jboss-common.jar -->
-    <jar jarfile="${build.lib}/${jar.server.name}"
-      manifest="${build.etc}/default.mf">
-      <fileset dir="${build.classes}">
-        <include name="org/jboss/**"/>
-        <include name="org/apache/xerces/**"/>
-        <exclude name="org/jboss/xb/**"/>
-      </fileset>
-    </jar>
-
-    <!-- Build jboss-xml-binding.jar -->
-    <jar jarfile="${build.lib}/jboss-xml-binding.jar"
-      manifest="${build.etc}/default.mf">
-      <fileset dir="${build.classes}">
-        <include name="org/jboss/xb/**"/>
-      </fileset>
-    </jar>
-
-    <!-- Build jboss-common-client.jar -->
-    <jar jarfile="${build.lib}/${jar.client.name}"
-      manifest="${build.etc}/default.mf">
-      <fileset dir="${build.classes}">
-        <include name="org/jboss/**"/>
-        <include name="org/apache/xerces/**"/>
-        <exclude name="org/jboss/deployment/**"/>
-        <exclude name="org/jboss/xb/**"/>
-      </fileset>
-    </jar>
-
-    <!-- Build namespace.jar -->
-    <jar jarfile="${build.lib}/namespace.jar"
-      manifest="${build.etc}/default.mf">
-      <fileset dir="${build.classes}">
-        <include name="javax/xml/namespace/*"/>
-      </fileset>
-    </jar>
-
-     <!-- Build browsing.jar -->
-     <jar jarfile="${build.lib}/jboss-archive-browsing.jar"
-       manifest="${build.etc}/default.mf">
-       <fileset dir="${build.classes}">
-         <include name="org/jboss/util/file/*"/>
-       </fileset>
-     </jar>
-
-    <!--
-       | JBoss/Testsuite Support
-     -->
-
-    <!-- testsuite-support.jar -->
-    <jar jarfile="${build.lib}/testsuite-support.jar" manifest="${build.etc}/default.mf">
-      <fileset dir="${build.classes}">
-        <include name="org/jboss/logging/**"/>
-      </fileset>
-    </jar>
-  </target>
-
-  <target name="deploy" depends="module-jars" >
-    <copy todir="${jboss.home}/client" overwrite="true">
-      <fileset dir="${build.lib}">
-        <include name="jboss-xml-binding.jar"/>
-        <include name="jboss-common-client.jar"/>
-        <include name="namespace.jar"/>
-      </fileset>
-    </copy>
-    <copy todir="${jboss.home}/lib" overwrite="true">
-      <fileset dir="${build.lib}">
-        <include name="jboss-xml-binding.jar"/>
-        <include name="namespace.jar"/>
-      </fileset>
-    </copy>
-    <copy todir="${jboss.home}/server/${server}/lib" overwrite="true">
-      <fileset dir="${build.lib}">
-        <include name="jboss.jar"/>
-      </fileset>
-    </copy>
-  </target>
-  
-  <target name="build" depends="createthirdparty, main"/>
-  
-   <!-- create the thirdparty folder from items in the repository -->
-   <!-- then generate a new libraries.ent file and include it in  -->
-   <!-- the build                                                 -->
-   <target name="createthirdparty" unless="inhibit.downloads"
-      depends="check.inhibit.downloads, set.proxy">
-      
-      <ant antfile="build-thirdparty.xml" target="generate-lib-file"/>
-   </target>
-
-   <!-- check if thirdparty libraries are to be downloaded -->
-   <target name="check.inhibit.downloads">
-      <condition property="inhibit.downloads">
-         <or>
-            <uptodate property="dependencies.current"
- 	      srcfile="build-thirdparty.xml"
-               targetfile="thirdparty/libraries.ent"/>
-            <istrue value="${nodownload}"/>
-         </or>
-      </condition>
-  </target>
-
-  <!-- check if the the user has specied proxy settings -->
-  <target name="check.proxy">
-    <condition property="hasproxy">
-        <and>
-            <isset property="proxy.host"/>
-            <isset property="proxy.port"/>
-            <not>
-                <equals arg1="" arg2="${proxy.host}" trim="true"/>
-            </not>
-            <not>
-                <equals arg1="" arg2="${proxy.port}" trim="true"/>
-            </not>
-        </and>
-    </condition>
-  </target>
-
-  <!-- set proxy settings -->
-  <condition property="hasproxyauth">
-        <and>
-            <isset property="hasproxy"/>
-            <isset property="proxy.username"/>
-            <isset property="proxy.password"/>
-            <not>
-                <equals arg1="" arg2="${proxy.username}" trim="true"/>
-            </not>
-            <not>
-                <equals arg1="" arg2="${proxy.password}" trim="true"/>
-            </not>
-        </and>
-    </condition>
-  <target name="set.proxy" depends="set.proxy.withoutauth, set.proxy.auth"/>
-
-  <!-- set proxy settings without auth -->
-  <target name="set.proxy.withoutauth" if="hasproxy" unless="hasproxyauth" depends="check.proxy">
-    <echo>Proxy is set to ${proxy.host}:${proxy.port}</echo>
-    <setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}"/>
-  </target>
-
-  <!-- set proxy settings using auth -->
-  <target name="set.proxy.auth" if="hasproxyauth" depends="check.proxy">
-    <echo>Auth Proxy is set to ${proxy.host}:${proxy.port} username=[${proxy.username}]</echo>
-    <setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}" proxyuser="${proxy.username}" proxypassword="${proxy.password}"/>
-  </target>  
-  
-</project>

Copied: tags/JBossCommon-1.0.2/build.xml (from rev 1934, tags/JBossCommon-1.0.1/build.xml)

Deleted: tags/JBossCommon-1.0.2/src/main/org/jboss/util/xml/DOMUtils.java
===================================================================
--- tags/JBossCommon-1.0.1/src/main/org/jboss/util/xml/DOMUtils.java	2006-08-10 16:19:33 UTC (rev 1932)
+++ tags/JBossCommon-1.0.2/src/main/org/jboss/util/xml/DOMUtils.java	2006-08-10 16:43:17 UTC (rev 1935)
@@ -1,466 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.util.xml;
-
-import org.jboss.logging.Logger;
-import org.w3c.dom.*;
-import org.xml.sax.SAXException;
-
-import javax.xml.namespace.QName;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-
-/**
- * DOM2 utilites
- *
- * @author Thomas.Diesler at jboss.org
- * @version $Revision$
- */
-public final class DOMUtils
-{
-    private static Logger log = Logger.getLogger(DOMUtils.class);
-
-    // All elements created by the same thread are created by the same builder and belong to the same doc
-    private static ThreadLocal documentThreadLocal = new ThreadLocal();
-    private static ThreadLocal builderThreadLocal = new ThreadLocal() {
-        protected Object initialValue() {
-            try
-            {
-                DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
-                factory.setValidating(false);
-                factory.setNamespaceAware(true);
-                DocumentBuilder builder = factory.newDocumentBuilder();
-                builder.setEntityResolver(new JBossEntityResolver());
-                return builder;
-            }
-            catch (ParserConfigurationException e)
-            {
-                throw new RuntimeException("Failed to create DocumentBuilder", e);
-            }
-        }
-    };
-
-    // Hide the constructor
-    private DOMUtils()
-    {
-    }
-
-    /** Initialise the the DocumentBuilder
-     */
-    public static DocumentBuilder getDocumentBuilder()
-    {
-        DocumentBuilder builder = (DocumentBuilder)builderThreadLocal.get();
-        return builder;
-    }
-
-    /** Parse the given XML string and return the root Element
-     */
-    public static Element parse(String xmlString) throws IOException
-    {
-        try
-        {
-            return parse(new ByteArrayInputStream(xmlString.getBytes("UTF-8")));
-        }
-        catch (IOException e)
-        {
-            log.error("Cannot parse: " + xmlString);
-            throw e;
-        }
-    }
-
-    /** Parse the given XML stream and return the root Element
-     */
-    public static Element parse(InputStream xmlStream) throws IOException
-    {
-        try
-        {
-            Document doc = getDocumentBuilder().parse(xmlStream);
-            Element root = doc.getDocumentElement();
-            return root;
-        }
-        catch (SAXException e)
-        {
-            throw new IOException(e.toString());
-        }
-    }
-
-    /** Create an Element for a given name
-     */
-    public static Element createElement(String localPart)
-    {
-        Document doc = getOwnerDocument();
-        log.trace("createElement {}" + localPart);
-        return doc.createElement(localPart);
-    }
-
-    /** Create an Element for a given name and prefix
-     */
-    public static Element createElement(String localPart, String prefix)
-    {
-        Document doc = getOwnerDocument();
-        log.trace("createElement {}" + prefix + ":" + localPart);
-        return doc.createElement(prefix + ":" + localPart);
-    }
-
-    /** Create an Element for a given name, prefix and uri
-     */
-    public static Element createElement(String localPart, String prefix, String uri)
-    {
-        Document doc = getOwnerDocument();
-        if (prefix == null || prefix.length() == 0)
-        {
-            log.trace("createElement {" + uri + "}" + localPart);
-            return doc.createElementNS(uri, localPart);
-        }
-        else
-        {
-            log.trace("createElement {" + uri + "}" + prefix + ":" + localPart);
-            return doc.createElementNS(uri, prefix + ":" + localPart);
-        }
-    }
-
-    /** Create an Element for a given QName
-     */
-    public static Element createElement(QName qname)
-    {
-        return createElement(qname.getLocalPart(), qname.getPrefix(), qname.getNamespaceURI());
-    }
-
-    /** Create a org.w3c.dom.Text node
-     */
-    public static Text createTextNode(String value)
-    {
-        Document doc = getOwnerDocument();
-        return doc.createTextNode(value);
-    }
-
-    /** Get the qname of the given node.
-     */
-    public static QName getElementQName(Element el)
-    {
-        String qualifiedName = el.getNodeName();
-        return resolveQName(el, qualifiedName);
-    }
-
-    /** Transform the giveen qualified name into a QName
-     */
-    public static QName resolveQName(Element el, String qualifiedName)
-    {
-        QName qname;
-        String prefix = "";
-        String namespaceURI = "";
-        String localPart = qualifiedName;
-
-        int colIndex = qualifiedName.indexOf(":");
-        if (colIndex > 0)
-        {
-            prefix = qualifiedName.substring(0, colIndex);
-            localPart = qualifiedName.substring(colIndex + 1);
-
-            if ("xmlns".equals(prefix))
-            {
-                namespaceURI = "URI:XML_PREDEFINED_NAMESPACE";
-            }
-            else
-            {
-                Element nsElement = el;
-                while (namespaceURI.equals("") && nsElement != null)
-                {
-                    namespaceURI = nsElement.getAttribute("xmlns:" + prefix);
-                    if (namespaceURI.equals(""))
-                        nsElement = getParentElement(nsElement);
-                }
-            }
-
-            if (namespaceURI.equals(""))
-                throw new IllegalArgumentException("Cannot find namespace uri for: " + qualifiedName);
-        }
-
-        qname = new QName(namespaceURI, localPart, prefix);
-        return qname;
-    }
-
-    /** Get the value from the given attribute
-     *
-     * @return null if the attribute value is empty or the attribute is not present
-     */
-    public static String getAttributeValue(Element el, String attrName)
-    {
-        return getAttributeValue(el, new QName(attrName));
-    }
-
-    /** Get the value from the given attribute
-     *
-     * @return null if the attribute value is empty or the attribute is not present
-     */
-    public static String getAttributeValue(Element el, QName attrName)
-    {
-        String attr = null;
-        if ("".equals(attrName.getNamespaceURI()))
-            attr = el.getAttribute(attrName.getLocalPart());
-        else attr = el.getAttributeNS(attrName.getNamespaceURI(), attrName.getLocalPart());
-
-        if ("".equals(attr))
-            attr = null;
-
-        return attr;
-    }
-
-    /** Get the qname value from the given attribute
-     */
-    public static QName getAttributeValueAsQName(Element el, String attrName)
-    {
-        return getAttributeValueAsQName(el, new QName(attrName));
-
-    }
-
-    /** Get the qname value from the given attribute
-     */
-    public static QName getAttributeValueAsQName(Element el, QName attrName)
-    {
-        QName qname = null;
-
-        String qualifiedName = getAttributeValue(el, attrName);
-        if (qualifiedName != null)
-        {
-            qname = resolveQName(el, qualifiedName);
-        }
-
-        return qname;
-    }
-
-    /** Get the boolean value from the given attribute
-     */
-    public static boolean getAttributeValueAsBoolean(Element el, String attrName)
-    {
-        return getAttributeValueAsBoolean(el, new QName(attrName));
-    }
-
-    /** Get the boolean value from the given attribute
-     */
-    public static boolean getAttributeValueAsBoolean(Element el, QName attrName)
-    {
-        String attrVal = getAttributeValue(el, attrName);
-        boolean ret = "true".equalsIgnoreCase(attrVal) || "1".equalsIgnoreCase(attrVal);
-        return ret;
-    }
-
-    /** Get the integer value from the given attribute
-     */
-    public static Integer getAttributeValueAsInteger(Element el, String attrName)
-    {
-        return getAttributeValueAsInteger(el, new QName(attrName));
-    }
-
-    /** Get the integer value from the given attribute
-     */
-    public static Integer getAttributeValueAsInteger(Element el, QName attrName)
-    {
-        String attrVal = getAttributeValue(el, attrName);
-        return (attrVal != null ? new Integer(attrVal) : null);
-    }
-
-    /** Get the attributes as Map<QName, String>
-     */
-    public static Map getAttributes(Element el)
-    {
-        Map attmap = new HashMap();
-        NamedNodeMap attribs = el.getAttributes();
-        for (int i = 0; i < attribs.getLength(); i++)
-        {
-            Attr attr = (Attr)attribs.item(i);
-            String name = attr.getName();
-            QName qname = resolveQName(el, name);
-            String value = attr.getNodeValue();
-            attmap.put(qname, value);
-        }
-        return attmap;
-    }
-
-    /** Copy attributes between elements
-     */
-    public static void copyAttributes(Element destElement, Element srcElement)
-    {
-        NamedNodeMap attribs = srcElement.getAttributes();
-        for (int i = 0; i < attribs.getLength(); i++)
-        {
-            Attr attr = (Attr)attribs.item(i);
-            destElement.setAttributeNS(attr.getNamespaceURI(), attr.getName(), attr.getNodeValue());
-        }
-    }
-
-    /** True if the node has child elements
-     */
-    public static boolean hasChildElements(Node node)
-    {
-        NodeList nlist = node.getChildNodes();
-        for (int i = 0; i < nlist.getLength(); i++)
-        {
-            Node child = nlist.item(i);
-            if (child.getNodeType() == Node.ELEMENT_NODE)
-                return true;
-        }
-        return false;
-    }
-
-    /** Gets child elements
-     */
-    public static Iterator getChildElements(Node node)
-    {
-        ArrayList list = new ArrayList();
-        NodeList nlist = node.getChildNodes();
-        for (int i = 0; i < nlist.getLength(); i++)
-        {
-            Node child = nlist.item(i);
-            if (child.getNodeType() == Node.ELEMENT_NODE)
-                list.add(child);
-        }
-        return list.iterator();
-    }
-
-    /** Get the concatenated text content, or null.
-     */
-    public static String getTextContent(Node node)
-    {
-        boolean hasTextContent = false;
-        StringBuffer buffer = new StringBuffer();
-        NodeList nlist = node.getChildNodes();
-        for (int i = 0; i < nlist.getLength(); i++)
-        {
-            Node child = nlist.item(i);
-            if (child.getNodeType() == Node.TEXT_NODE)
-            {
-                buffer.append(child.getNodeValue());
-                hasTextContent = true;
-            }
-        }
-        return (hasTextContent ? buffer.toString() : null);
-    }
-
-    /** Gets the first child element
-     */
-    public static Element getFirstChildElement(Node node)
-    {
-        return getFirstChildElementIntern(node, null);
-    }
-
-    /** Gets the first child element for a given local name without namespace
-     */
-    public static Element getFirstChildElement(Node node, String nodeName)
-    {
-        return getFirstChildElementIntern(node, new QName(nodeName));
-    }
-
-    /** Gets the first child element for a given qname
-     */
-    public static Element getFirstChildElement(Node node, QName nodeName)
-    {
-        return getFirstChildElementIntern(node, nodeName);
-    }
-
-    private static Element getFirstChildElementIntern(Node node, QName nodeName)
-    {
-        Element childElement = null;
-        Iterator it = getChildElementsIntern(node, nodeName);
-        if (it.hasNext())
-        {
-            childElement = (Element)it.next();
-        }
-        return childElement;
-    }
-
-    /** Gets the child elements for a given local name without namespace
-     */
-    public static Iterator getChildElements(Node node, String nodeName)
-    {
-        return getChildElementsIntern(node, new QName(nodeName));
-    }
-
-    /** Gets the child element for a given qname
-     */
-    public static Iterator getChildElements(Node node, QName nodeName)
-    {
-        return getChildElementsIntern(node, nodeName);
-    }
-
-    private static Iterator getChildElementsIntern(Node node, QName nodeName)
-    {
-        ArrayList list = new ArrayList();
-        NodeList nlist = node.getChildNodes();
-        for (int i = 0; i < nlist.getLength(); i++)
-        {
-            Node child = nlist.item(i);
-            if (child.getNodeType() == Node.ELEMENT_NODE)
-            {
-                if (nodeName == null)
-                {
-                    list.add(child);
-                }
-                else
-                {
-                    QName qname;
-                    if (nodeName.getNamespaceURI().length() > 0)
-                    {
-                        qname = new QName(child.getNamespaceURI(), child.getLocalName());
-                    }
-                    else
-                    {
-                        qname = new QName(child.getLocalName());
-                    }
-                    if (qname.equals(nodeName))
-                    {
-                        list.add(child);
-                    }
-                }
-            }
-        }
-        return list.iterator();
-    }
-
-    /** Gets parent element or null if there is none
-     */
-    public static Element getParentElement(Node node)
-    {
-        Node parent = node.getParentNode();
-        return (parent instanceof Element ? (Element)parent : null);
-    }
-
-    /** Get the owner document that is associated with the current thread */
-    public static Document getOwnerDocument()
-    {
-        Document doc = (Document)documentThreadLocal.get();
-        if (doc == null)
-        {
-            doc = getDocumentBuilder().newDocument();
-            documentThreadLocal.set(doc);
-        }
-        return doc;
-    }
-}

Copied: tags/JBossCommon-1.0.2/src/main/org/jboss/util/xml/DOMUtils.java (from rev 1933, tags/JBossCommon-1.0.1/src/main/org/jboss/util/xml/DOMUtils.java)

Deleted: tags/JBossCommon-1.0.2/src/main/org/jboss/util/xml/DOMWriter.java
===================================================================
--- tags/JBossCommon-1.0.1/src/main/org/jboss/util/xml/DOMWriter.java	2006-08-10 16:19:33 UTC (rev 1932)
+++ tags/JBossCommon-1.0.2/src/main/org/jboss/util/xml/DOMWriter.java	2006-08-10 16:43:17 UTC (rev 1935)
@@ -1,498 +0,0 @@
-/*
- * ====================================================================
- *
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 1999 The Apache Software Foundation.  All rights 
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer. 
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- *    any, must include the following acknowlegement:  
- *       "This product includes software developed by the 
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowlegement may appear in the software itself,
- *    if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
- *    Foundation" must not be used to endorse or promote products derived
- *    from this software without prior written permission. For written 
- *    permission, please contact apache at apache.org.
- *
- * 5. Products derived from this software may not be called "Apache"
- *    nor may "Apache" appear in their names without prior written
- *    permission of the Apache Group.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
-package org.jboss.util.xml;
-
-// $Id$
-
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.io.UnsupportedEncodingException;
-import java.io.Writer;
-
-import org.w3c.dom.Attr;
-import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-/**
- * Traverse a DOM tree in order to print a document that is parsed.
- *
- * @author Andy Clark, IBM
- * @author Thomas.Diesler at jboss.org
- * @version $Revision$
- */
-public class DOMWriter
-{
-   // Print writer
-   private PrintWriter out;
-   // True, if canonical output
-   private boolean canonical;
-   // True, if pretty printing should be used
-   private boolean prettyprint;
-   // True, if the XML declaration should be written
-   private boolean writeXMLDeclaration;
-   // Explicit character set encoding
-   private String charsetName;
-   // indent for the pretty printer
-   private int prettyIndent;
-   // True, if the XML declaration has been written
-   private boolean wroteXMLDeclaration;
-
-   public DOMWriter(Writer w)
-   {
-      this.out = new PrintWriter(w);
-   }
-
-   public DOMWriter(OutputStream stream)
-   {
-      try
-      {
-         this.out = new PrintWriter(new OutputStreamWriter(stream, "UTF-8"));
-      }
-      catch (UnsupportedEncodingException e)
-      {
-         // ignore, UTF-8 should be available
-      }
-   }
-
-   public DOMWriter(OutputStream stream, String charsetName)
-   {
-      try
-      {
-         this.out = new PrintWriter(new OutputStreamWriter(stream, charsetName));
-         this.charsetName = charsetName;
-         this.writeXMLDeclaration = true;
-      }
-      catch (UnsupportedEncodingException e)
-      {
-         throw new IllegalArgumentException("Unsupported encoding: " + charsetName);
-      }
-   }
-
-   /** 
-    * Print a node with explicit prettyprinting.
-    * The defaults for all other DOMWriter properties apply. 
-    *  
-    */
-   public static String printNode(Node node, boolean prettyprint)
-   {
-      StringWriter strw = new StringWriter();
-      new DOMWriter(strw).setPrettyprint(prettyprint).print(node);
-      return strw.toString();
-   }
-
-   public boolean isCanonical()
-   {
-      return canonical;
-   }
-
-   /** 
-    * Set wheter entities should appear in their canonical form.
-    * The default is false.
-    */
-   public DOMWriter setCanonical(boolean canonical)
-   {
-      this.canonical = canonical;
-      return this;
-   }
-
-   public boolean isPrettyprint()
-   {
-      return prettyprint;
-   }
-
-   /** 
-    * Set wheter element should be indented.
-    * The default is false.
-    */
-   public DOMWriter setPrettyprint(boolean prettyprint)
-   {
-      this.prettyprint = prettyprint;
-      return this;
-   }
-
-   public boolean isWriteXMLDeclaration()
-   {
-      return writeXMLDeclaration;
-   }
-
-   /** 
-    * Set wheter the XML declaration should be written.
-    * The default is false.
-    */
-   public DOMWriter setWriteXMLDeclaration(boolean writeXMLDeclaration)
-   {
-      this.writeXMLDeclaration = writeXMLDeclaration;
-      return this;
-   }
-
-   public void print(Node node)
-   {
-      printInternal(node, false);
-   }
-
-   private void printInternal(Node node, boolean indentEndMarker)
-   {
-      // is there anything to do?
-      if (node == null)
-      {
-         return;
-      }
-
-      // JBAS-2117 - Don't skip the DOCUMENT_NODE
-      // if (node instanceof Document) node = ((Document)node).getDocumentElement();
-
-      if (wroteXMLDeclaration == false && writeXMLDeclaration == true && canonical == false)
-      {
-         out.print("<?xml version='1.0'");
-         if (charsetName != null)
-            out.print(" encoding='" + charsetName + "'");
-
-         out.println("?>");
-         wroteXMLDeclaration = true;
-      }
-
-      int type = node.getNodeType();
-      boolean hasChildNodes = node.getChildNodes().getLength() > 0;
-
-      switch (type)
-      {
-         // print document
-         case Node.DOCUMENT_NODE:
-         {
-            NodeList children = node.getChildNodes();
-            for (int iChild = 0; iChild < children.getLength(); iChild++)
-            {
-               printInternal(children.item(iChild), false);
-            }
-            out.flush();
-            break;
-         }
-
-            // print element with attributes
-         case Node.ELEMENT_NODE:
-         {
-            if (prettyprint)
-            {
-               for (int i = 0; i < prettyIndent; i++)
-               {
-                  out.print(' ');
-               }
-               prettyIndent++;
-            }
-
-            out.print('<');
-            out.print(node.getNodeName());
-            Attr attrs[] = sortAttributes(node.getAttributes());
-            for (int i = 0; i < attrs.length; i++)
-            {
-               Attr attr = attrs[i];
-               out.print(' ');
-               out.print(attr.getNodeName());
-               out.print("='");
-               out.print(normalize(attr.getNodeValue()));
-               out.print("'");
-            }
-
-            if (hasChildNodes)
-            {
-               out.print('>');
-            }
-
-            // Find out if the end marker is indented
-            indentEndMarker = isEndMarkerIndented(node);
-
-            if (indentEndMarker)
-            {
-               out.print('\n');
-            }
-
-            NodeList childNodes = node.getChildNodes();
-            int len = childNodes.getLength();
-            for (int i = 0; i < len; i++)
-            {
-               Node childNode = childNodes.item(i);
-               printInternal(childNode, false);
-            }
-            break;
-         }
-
-            // handle entity reference nodes
-         case Node.ENTITY_REFERENCE_NODE:
-         {
-            if (canonical)
-            {
-               NodeList children = node.getChildNodes();
-               if (children != null)
-               {
-                  int len = children.getLength();
-                  for (int i = 0; i < len; i++)
-                  {
-                     printInternal(children.item(i), false);
-                  }
-               }
-            }
-            else
-            {
-               out.print('&');
-               out.print(node.getNodeName());
-               out.print(';');
-            }
-            break;
-         }
-
-            // print cdata sections
-         case Node.CDATA_SECTION_NODE:
-         {
-            if (canonical)
-            {
-               out.print(normalize(node.getNodeValue()));
-            }
-            else
-            {
-               out.print("<![CDATA[");
-               out.print(node.getNodeValue());
-               out.print("]]>");
-            }
-            break;
-         }
-
-            // print text
-         case Node.TEXT_NODE:
-         {
-            String text = normalize(node.getNodeValue());
-            if (prettyprint == false || text.trim().length() > 0)
-               out.print(text);
-            break;
-         }
-
-            // print processing instruction
-         case Node.PROCESSING_INSTRUCTION_NODE:
-         {
-            out.print("<?");
-            out.print(node.getNodeName());
-            String data = node.getNodeValue();
-            if (data != null && data.length() > 0)
-            {
-               out.print(' ');
-               out.print(data);
-            }
-            out.print("?>");
-            break;
-         }
-
-            // print comment
-         case Node.COMMENT_NODE:
-         {
-            for (int i = 0; i < prettyIndent; i++)
-            {
-               out.print(' ');
-            }
-
-            out.print("<!--");
-            String data = node.getNodeValue();
-            if (data != null)
-            {
-               out.print(data);
-            }
-            out.print("-->");
-
-            if (prettyprint)
-            {
-               out.print('\n');
-            }
-
-            break;
-         }
-      }
-
-      if (type == Node.ELEMENT_NODE)
-      {
-         if (prettyprint)
-            prettyIndent--;
-
-         if (hasChildNodes == false)
-         {
-            out.print("/>");
-         }
-         else
-         {
-            if (indentEndMarker)
-            {
-               for (int i = 0; i < prettyIndent; i++)
-               {
-                  out.print(' ');
-               }
-            }
-
-            out.print("</");
-            out.print(node.getNodeName());
-            out.print('>');
-         }
-
-         if (prettyIndent > 0)
-         {
-            out.print('\n');
-         }
-      }
-      out.flush();
-   }
-
-   private boolean isEndMarkerIndented(Node node)
-   {
-      if (prettyprint)
-      {
-         NodeList childNodes = node.getChildNodes();
-         int len = childNodes.getLength();
-         for (int i = 0; i < len; i++)
-         {
-            Node children = childNodes.item(i);
-            if (children.getNodeType() == Node.ELEMENT_NODE)
-            {
-               return true;
-            }
-         }
-      }
-      return false;
-   }
-
-   /** Returns a sorted list of attributes. */
-   private Attr[] sortAttributes(NamedNodeMap attrs)
-   {
-
-      int len = (attrs != null) ? attrs.getLength() : 0;
-      Attr array[] = new Attr[len];
-      for (int i = 0; i < len; i++)
-      {
-         array[i] = (Attr)attrs.item(i);
-      }
-      for (int i = 0; i < len - 1; i++)
-      {
-         String name = array[i].getNodeName();
-         int index = i;
-         for (int j = i + 1; j < len; j++)
-         {
-            String curName = array[j].getNodeName();
-            if (curName.compareTo(name) < 0)
-            {
-               name = curName;
-               index = j;
-            }
-         }
-         if (index != i)
-         {
-            Attr temp = array[i];
-            array[i] = array[index];
-            array[index] = temp;
-         }
-      }
-      return (array);
-   }
-
-   /** Normalizes the given string. */
-   private String normalize(String s)
-   {
-      StringBuffer str = new StringBuffer();
-
-      int len = (s != null) ? s.length() : 0;
-      for (int i = 0; i < len; i++)
-      {
-         char ch = s.charAt(i);
-         switch (ch)
-         {
-            case '<':
-            {
-               str.append("&lt;");
-               break;
-            }
-            case '>':
-            {
-               str.append("&gt;");
-               break;
-            }
-            case '&':
-            {
-               str.append("&amp;");
-               break;
-            }
-            case '"':
-            {
-               str.append("&quot;");
-               break;
-            }
-            case '\r':
-            case '\n':
-            {
-               if (canonical)
-               {
-                  str.append("&#");
-                  str.append(Integer.toString(ch));
-                  str.append(';');
-                  break;
-               }
-               // else, default append char
-            }
-            default:
-            {
-               str.append(ch);
-            }
-         }
-      }
-      return (str.toString());
-   }
-}
\ No newline at end of file

Copied: tags/JBossCommon-1.0.2/src/main/org/jboss/util/xml/DOMWriter.java (from rev 1933, tags/JBossCommon-1.0.1/src/main/org/jboss/util/xml/DOMWriter.java)

Deleted: tags/JBossCommon-1.0.2/tools/etc/buildmagic/buildmagic.ent
===================================================================
--- tags/JBossCommon-1.0.1/tools/etc/buildmagic/buildmagic.ent	2006-08-10 16:19:33 UTC (rev 1932)
+++ tags/JBossCommon-1.0.2/tools/etc/buildmagic/buildmagic.ent	2006-08-10 16:43:17 UTC (rev 1935)
@@ -1,1135 +0,0 @@
-<!-- $Id: buildmagic.ent,v 1.44 2006/03/23 02:34:20 rcampbell Exp $ -->
-
-<!-- ================================================================== -->
-<!-- Initialization                                                     -->
-<!-- ================================================================== -->
-
-<!-- Initialize the build system. -->
-<target name="_buildmagic:init" unless="init.disable">
-
-  <!-- Make sure we have the right version of Ant -->
-  <property name="buildmagic.ant15.baseversion" value="1.5"/>
-  <property name="buildmagic.ant16.baseversion" value="1.6"/>
-
-  <!--
-     | Add new conditions for other supported Ant versions when they
-     | become avaialble.
-   -->
-
-  <condition property="buildmagic.ant.compatible">
-    <or>
-      <contains string="${ant.version}"
-        substring="Ant version ${buildmagic.ant15.baseversion}"/>
-      <contains string="${ant.version}"
-        substring="Ant version ${buildmagic.ant16.baseversion}"/>
-    </or>
-  </condition>
-
-  <fail unless="buildmagic.ant.compatible">
-
-  Unsupported Ant version:
-
-    ${ant.version}
-
-  Please install a version which is compatible with Ant ${buildmagic.ant15.baseversion} or ${buildmagic.ant16.baseversion}.
-
-  </fail>
-
-  <!-- JDK Detection -->
-  <available classname="java.lang.StackTraceElement" property="HAVE_JDK_1.4"/>
-  <available classname="java.lang.Enum" property="HAVE_JDK_1.5"/>
-  <fail unless="HAVE_JDK_1.4">
-  Unsupported Java version: You need at least JDK1.4 to build JBoss5
-  </fail>
-
-  <!-- Setup the project environment. -->
-  <dirname property="project.root" file="${basedir}"/>
-   <echo message="${basedir}"/>
-  <property name="project.build" value="${basedir}/build"/>
-  <property name="project.tools" value="${basedir}/tools"/>
-  <property name="project.thirdparty" value="${basedir}/thirdparty"/>
-
-  <!-- Setup the module environment. -->
-  <property name="module.root" value="${basedir}"/>
-  <property file="${module.root}/local.properties"/>
-  <property name="module.source" value="${module.root}/src"/>
-  <property name="module.output" value="${module.root}/output"/>
-  <property name="module.tools" value="${module.root}/tools"/>
-  <property name="module.thirdparty" value="${module.root}/thirdparty"/>
-
-  <!-- Load Buildmagic extention tasks. -->
-  <property name="buildmagic.local.classpath" value="."/>
-  <path id="buildmagic.task.classpath">
-    <fileset dir="${project.tools}/lib">
-      <include name="*.jar"/>
-    </fileset>
-    <pathelement location="${project.tools}/lib"/>
-    <pathelement location="${project.tools}/etc"/>
-    <pathelement location="${project.tools}"/>
-    <pathelement path="${buildmagic.local.classpath}"/>
-  </path>
-  <echo message="${project.tools}"/>
-  <taskdef file="${project.tools}/etc/buildmagic/autoload.properties"
-    classpathref="buildmagic.task.classpath"/>
-  <taskdef name="property" classname="org.jboss.tools.buildmagic.task.Property"
-    classpathref="buildmagic.task.classpath"/>
-
-  
-
-  <!-- Include user and project property overrides. -->
-  <property file="${project.build}/local.properties"/>
-  <property file="${user.home}/.buildmagic.properties"/>
-  <property file="${user.home}/.ant.properties"/>
-
-  <call target="_buildmagic:init:local-properties">
-    <available file="${module.root}/etc/local.properties-example"
-      property="init.have-local-properties"/>
-  </call>
-
-  <!-- Setup the build.log -->
-  <call target="_buildmagic:init:buildlog" unless="init-buildlog.disable"/>
-
-  <!-- Load common properties -->
-  <property file="${project.tools}/etc/buildmagic/common.properties"/>
-
-  <!-- Setup the build timestamp & build identifer properties -->
-  <tstamp>
-    <format property="build.number" pattern="yyyyMMddHHmm"/>
-    <format property="YEAR" pattern="yyyy"/>
-  </tstamp>
-  <property name="build.id" value="${build.number}"/>
-
-  <!-- Version identifiers for the server. -->
-  <property name="version.major" value="5"/>
-  <property name="version.minor" value="0"/>
-  <property name="version.revision" value="0"/>
-  <property name="version.tag" value="Alpha"/>
-  <property name="version.name" value="Morpheus"/>
-  <!-- This must be set to the CVS tag for any release -->
-  <property name="version.cvstag" value="HEAD"/>
-
-  <!-- Manifest version info -->
-  <property name="specification.title" value="JBoss"/>
-  <property name="specification.version" value="${version.major}.${version.minor}.${version.revision}.${version.tag}"/>
-  <property name="specification.vendor" value="JBoss (http://www.jboss.org/)"/>
-
-  <property name="implementation.title" value="JBoss [${version.name}]"/>
-  <property name="implementation.url" value="http://www.jboss.org/"/>
-  <property name="implementation.version"
-    value="${version.major}.${version.minor}.${version.revision}.${version.tag} (build: CVSTag=${version.cvstag} date=${build.id})"/>
-  <property name="implementation.vendor" value="JBoss.org"/>
-  <property name="implementation.vendor.id" value="${implementation.url}"/>
-
-  <!-- Invoke the configure task -->
-  <call target="configure" unless="configure.disable"/>
-
-  <!-- Load common task properties -->
-  <property file="${project.tools}/etc/buildmagic/task.properties"/>
-
-  <!-- Marker to disable build -->
-  <property name="build-bypass.marker" value="${module.output}/build-marker"/>
-
-  <!-- Marker to disable mbeans -->
-  <property name="mbean-bypass.marker" value="${module.output}/mbean-marker"/>
-
-  <!-- Install filters -->
-  <propertyfilter all="${buildmagic.propertyfilter.all}"/>
-
-  <call target="_buildmagic:init:show-environment" if="init.verbose"/>
-
-  <!-- Finish up -->
-  <property name="init.disable" value="true"/>
-</target>
-
-<!-- Install the local.properties example if it is there -->
-<target name="_buildmagic:init:local-properties">
-  <!-- Setup the local.properties file as needed -->
-  <copy file="${module.root}/etc/local.properties-example"
-    tofile="${module.root}/local.properties" filtering="yes"/>
-  <property file="${module.root}/local.properties"/>
-</target>
-
-<!-- Initialize the build.log -->
-<target name="_buildmagic:init:buildlog">
-  <property name="buildlog.level" value="info"/>
-  <record name="${basedir}/build.log" append="no" loglevel="${buildlog.level}"/>
-  <property name="init-buildlog.disable" value="true" system="true"/>
-</target>
-
-<!-- Show the running environment if -Dinit.verbose=true -->
-<target name="_buildmagic:init:show-environment">
-  <echo><![CDATA[
-project.root:    ${project.root}
-module.root:     ${module.root}
-user.home:       ${user.home}
-build.compiler:  ${build.compiler}
-java.home:       ${java.home}
-java.class.path: ${java.class.path}
-java.version:    ${java.version}
-java.vendor:     ${java.vendor}
-java.vm.version: ${java.vm.version}
-java.vm.name:    ${java.vm.name}
-java.vm.info:    ${java.vm.info}
-os.name:         ${os.name}
-os.arch:         ${os.arch}
-os.version:      ${os.version}
-    ]]></echo>
-</target>
-
-<!-- ================================================================== -->
-<!-- Build Bypass                                                       -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:build-bypass-checker" depends="init" unless="build-bypass.disabled">
-
-  <uptodate property="build-bypass.on" targetfile="${build-bypass.marker}">
-    <srcfiles dir="${module.source}" includes="**/*"/>
-    <srcfiles dir="${module.root}" includes="build.xml,local.properties"/>
-    <srcfiles dir="${project.root}" includes="build/build.xml,build/local.properties"/>
-    <srcfiles dir="${project.thirdparty}" includes="**/*"/>
-    <srcfiles dir="${project.tools}" includes="**/*"/>
-  </uptodate>
-
-</target>
-
-<target name="_buildmagic:build-bypass-notice" if="build-bypass.on">
-  <echo>
-Build disabled because module is already built. To force the module
-to build define build-bypass.disabled=true.
-  </echo>
-</target>
-
-<target name="_buildmagic:build-bypass-check" depends="_buildmagic:build-bypass-checker, _buildmagic:build-bypass-notice"/>
-
-
-<!-- ================================================================== -->
-<!-- Cleaning                                                           -->
-<!-- ================================================================== -->
-
-<!-- Clean up all build output -->
-<target name="_buildmagic:clean" depends="init">
-   <call target="_buildmagic:clean-internal">
-      <available file="${module.output}" property="module.output.present"/>   
-   </call>   
-</target>
-
-<!-- Actuall cleanup, fails if ${module.output} is missing -->
-<target name="_buildmagic:clean-internal">
-   <delete includeEmptyDirs="true">
-      <fileset dir="${module.output}">
-         <exclude name="eclipse-classes*/**"/>
-      </fileset>
-   </delete>
-</target>
-
-<!-- Clean up all generated files -->
-<target name="_buildmagic:clobber" depends="init">
-  <delete file="${module.root}/local.properties"/>
-  <delete dir="${module.output}"/>
-
-  <!-- Try to stop the build log before we delete the file. -->
-  <record name="${module.root}/build.log" action="stop"/>
-
-  <!--
-     | This file may be opened still due and fail to be removed on win32
-     | systems, so lets just ignore those errors for now.
-   -->
-  <delete file="${module.root}/build.log" quiet="true" failonerror="false"/>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Help                                                               -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:help:standard" depends="init">
-  <projecthelp taskname="help">
-    <header><![CDATA[
-  The ${module.Name} module.
-      ]]></header>
-    <footer><![CDATA[
-    -projecthelp for all targets
-    -help for full options
-      ]]></footer>
-  </projecthelp>
-</target>
-
-<target name="_buildmagic:help:build" depends="init">
-  <projecthelp taskname="help">
-    <header><![CDATA[
-  The ${module.Name} module.
-      ]]></header>
-    <footer><![CDATA[
-    -Dgroups=<group>[(,<group>)*]      Specify the module groups.
-    -Dmodules=<module>[(,<module>)*]   Specify the modules.
-                                       (overrides groups).
-    -projecthelp for all targets
-    -help for full options
-      ]]></footer>
-  </projecthelp>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Release                                                            -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:release:zip" depends="init">
-  <zip zipfile="${module.output}/${release.id}.zip">
-    <fileset dir="${module.output}">
-      <include name="${release.id}/**"/>
-    </fileset>
-  </zip>
-</target>
-
-<target name="_buildmagic:release:tar" depends="init">
-  <tar tarfile="${module.output}/${release.id}.tar" longfile="gnu"
-    basedir="${module.output}"
-    includes="${release.id}/**">
-  </tar>
-</target>
-
-<target name="_buildmagic:release:tgz" depends="_buildmagic:release:tar">
-  <gzip src="${module.output}/${release.id}.tar"
-    zipfile="${module.output}/${release.id}.tgz"/>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Install                                                            -->
-<!-- ================================================================== -->
-
-<target name="_buildmagic:install:default" depends="init">
-  <!-- Copy the output directory to the install directory -->
-  <mkdir dir="${install.root}"/>
-  <copy todir="${install.root}" filtering="no">
-    <fileset dir="${module.output}">
-      <include name="**/*"/>
-      <exclude name="build-marker"/>
-      <exclude name="classes/**"/>
-      <exclude name="eclipse-classes*/**"/>
-      <exclude name="etc/**"/>
-      <exclude name="gen-src/**"/>
-      <exclude name="mbean-marker"/>
-      <exclude name="resources/**"/>
-      <exclude name="${install.id}/**"/>
-      <exclude name="${install.id}.zip"/>
-      <exclude name="${install.id}.tar"/>
-      <exclude name="${install.id}.tgz"/>
-    </fileset>
-  </copy>
-</target>
-
-<!-- ================================================================== -->
-<!-- Initialization                                                     -->
-<!-- ================================================================== -->
-
-<!--
-   | Initialize the build system.  Must depend on '_buildmagic:init'.
-   | Other targets should depend on 'init' or things will mysteriously fail.
- -->
-
-<target name="_default:init" unless="init.disable" depends="_buildmagic:init">
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Tasks                                                              -->
-<!-- ================================================================== -->
-
-<target name="_default:task-init">
-
-  <!-- Where source files live -->
-  <property name="source.java" value="${module.source}/main"/>
-  <property name="source.etc" value="${module.source}/etc"/>
-  <property name="source.bin" value="${module.source}/bin"/>
-  <property name="source.docs" value="${module.source}/docs"/>
-  <property name="source.resources" value="${module.source}/resources"/>
-  <property name="source.examples" value="${module.source}/examples"/>
-
-  <!-- Where build generated files will go -->
-  <property name="build.classes" value="${module.output}/classes"/>
-  <property name="build.classes.retro.src" value="${build.classes}"/>
-  <property name="build.classes.retro" value="${module.output}/classes-retro"/>
-  <property name="build.lib" value="${module.output}/lib"/>
-  <property name="build.api" value="${module.output}/api"/>
-  <property name="build.etc" value="${module.output}/etc"/>
-  <property name="build.bin" value="${module.output}/bin"/>
-  <property name="build.docs" value="${module.output}/docs"/>
-  <property name="build.parsers" value="${module.output}/gen-parsers"/>
-  <property name="build.resources" value="${module.output}/resources"/>
-  <property name="build.examples" value="${module.output}/examples"/>
-  <property name="build.reports" value="${module.output}/reports"/>
-  <property name="build.gen" value="${module.output}/gen"/>
-  <property name="build.gen-src" value="${module.output}/gen-src"/>
-  <property name="build.todo" value="${module.output}/todo"/>
-
-  <!-- Install/Release structure -->
-  <property name="install.id" value="${module.name}-${module.version}"/>
-  <property name="release.id" value="${install.id}"/>
-  <property name="install.root" value="${module.output}/${install.id}"/>
-
-  <!-- The combined thirdparty classpath -->
-  <path id="thirdparty.classpath">
-    <path refid="library.classpath"/>
-    <path refid="dependentmodule.classpath"/>
-  </path>
-
-  <!-- This module is based on Java 1.4 -->
-  <property name="javac.target" value="1.4"/>
-  <property name="javac.source" value="1.4"/>
-
-  <!-- RMIC should generate stubs compatible with Java 1.2+ -->
-  <property name="rmic.stubVersion" value="1.2"/>
-
-  <!-- classpath and local.classpath must have a value using with a path -->
-  <property name="classpath" value=""/>
-  <property name="local.classpath" value=""/>
-
-  <!-- The classpath required to build classes. -->
-  <path id="javac.classpath">
-    <pathelement path="${classpath}"/>
-    <pathelement path="${local.classpath}"/>
-    <path refid="thirdparty.classpath"/>
-  </path>
-  <!-- The bootstrap classpath used to override jdk classes -->
-  <path id="javac.bootclasspath">
-    <!-- Optional module override boot classpath -->
-    <pathelement path="${local.bootclasspath}"/>
-    <!-- The sun jdk boot classpath property -->
-    <pathelement path="${sun.boot.classpath}"/>
-  </path>
-
-  <!-- The classpath required to build javadocs. -->
-  <path id="javadoc.classpath">
-    <path refid="javac.classpath"/>
-  </path>
-
-  <!-- The default prefix -->
-  <property name="jar.prefix" value="jboss-${module.name}"/>
-
-  <!-- The default server and client jar name -->
-  <property name="jar.server.name" value="${jar.prefix}.jar"/>
-  <property name="jar.client.name" value="${jar.prefix}-client.jar"/>
-
-  <!-- Packages to include when generating api documentation -->
-  <property name="javadoc.packages" value="org.jboss.*"/>
-</target>
-
-<!-- ================================================================== -->
-<!-- Compile                                                            -->
-<!-- ================================================================== -->
-
-<!-- Compile all class files -->
-<target name="_default:compile-classes" depends="init" unless="compile.disable">
-  <mkdir dir="${build.classes}"/>
-
-  <!-- Hack, required to avoid duplicate javac targets -->
-  <mkdir dir="${build.gen-src}"/>
-
-  <!-- Remove classes which depend on changed files, so they will rebuild. -->
-  <depend srcdir="${source.java}:${build.gen-src}"
-    destdir="${build.classes}"
-    dump="${javac.depend.dump}"
-    closure="${javac.depend.closure}">
-    <include name="${javac.includes}"/>
-    <exclude name="${javac.excludes}"/>
-  </depend>
-
-
-  <javac destdir="${build.classes}"
-    optimize="on"
-    target="${javac.target}"
-    source="${javac.source}"
-    debug="on"
-    depend="${javac.depend}"
-    verbose="${javac.verbose}"
-    deprecation="${javac.deprecation}"
-    includeAntRuntime="${javac.include.ant.runtime}"
-    includeJavaRuntime="${javac.include.java.runtime}"
-    includes="${javac.includes}"
-    excludes="${javac.excludes}"
-    failonerror="${javac.fail.onerror}">
-    <bootclasspath>
-      <path refid="javac.bootclasspath"/>
-    </bootclasspath>
-    <src path="${source.java}:${build.gen-src}"/>
-    <classpath refid="javac.classpath"/>
-  </javac>
-</target>
-
-<!--
-   | Compile mbeans
- -->
-
-<target name="_buildmagic:mbean-bypass-checker" depends="init" unless="mbean-bypass.disabled">
-  <uptodate property="mbean-bypass.on" targetfile="${mbean-bypass.marker}">
-    <srcfiles dir="${source.java}" includes="${mbean.includes}"/>
-  </uptodate>
-
-</target>
-<target name="_default:compile-mbean-sources"
-  depends="_buildmagic:mbean-bypass-checker"
-  unless="mbean-bypass.on">
-
-  <taskdef name="jmxdoclet"
-    classname="xdoclet.modules.jmx.JMXDocletTask"
-    classpathref="xdoclet.task.classpath"/>
-
-  <mkdir dir="${build.gen-src}"/>
-
-  <jmxdoclet destdir="${build.gen-src}"
-    excludedtags="@version, at author">
-    <fileset dir="${source.java}"
-      includes="${mbean.includes}"/>
-    <mbeaninterface mergedir="${project.tools}/etc/xdoclet/templates"/>
-  </jmxdoclet>
-
-  <touch file="${mbean-bypass.marker}"/>
-</target>
-<target name="_default:compile-xmbean-sources"
-  depends="_buildmagic:mbean-bypass-checker"
-  unless="mbean-bypass.on">
-
-  <taskdef name="jmxdoclet"
-    classname="xdoclet.modules.jmx.JMXDocletTask"
-    classpathref="xdoclet.task.classpath"/>
-
-  <mkdir dir="${build.gen-src}"/>
-
-  <jmxdoclet destdir="${build.gen-src}"
-    excludedtags="@version, at author">
-    <fileset dir="${source.java}"
-      includes="${mbean.includes}"/>
-    <mbeaninterface mergedir="${project.tools}/etc/xdoclet/templates"/>
-    <jbossxmbean/>
-  </jmxdoclet>
-
-  <touch file="${mbean-bypass.marker}"/>
-</target>
-
-<!-- Compile all module test class files -->
-<target name="_default:compile-test-classes" depends="init" unless="compile.disable">
-
-  <mkdir dir="${build.test}"/>
-
-  <!-- Hack, required to avoid duplicate javac targets -->
-  <mkdir dir="${build.gen.test}"/>
-
-  <!-- Remove classes which depend on changed files, so they will rebuild. -->
-  <depend srcdir="${source.test}:${build.gen.test}"
-    destdir="${build.test}"
-    dump="${javac.depend.dump}"
-    closure="${javac.depend.closure}">
-    <include name="${javac.includes}"/>
-    <exclude name="${javac.excludes}"/>
-  </depend>
-
-  <javac destdir="${build.test}"
-    optimize="${javac.optimize}"
-    target="${javac.target}"
-    source="${javac.source}"
-    debug="${javac.debug}"
-    depend="${javac.depend}"
-    verbose="${javac.verbose}"
-    deprecation="${javac.deprecation}"
-    includeAntRuntime="${javac.include.ant.runtime}"
-    includeJavaRuntime="${javac.include.java.runtime}"
-    includes="${javac.includes}"
-    excludes="${javac.excludes}"
-    failonerror="${javac.fail.onerror}">
-    <src path="${source.test}:${build.gen.test}"/>
-    <classpath>
-      <path refid="javac.classpath"/>
-      <pathelement location="${build.classes}"/>
-    </classpath>
-  </javac>
-</target>
-
-<!-- Compile manifests -->
-<target name="_default:compile-etc" depends="init" unless="compile.disable">
-  <mkdir dir="${build.etc}"/>
-  <copy todir="${build.etc}" filtering="yes">
-    <fileset dir="${source.etc}">
-      <include name="**"/>
-    </fileset>
-  </copy>
-</target>
-
-<!-- Compile resource files -->
-<target name="_default:compile-resources" depends="init" unless="compile.disable">
-  <mkdir dir="${build.resources}"/>
-  <copy todir="${build.resources}" filtering="yes">
-    <fileset dir="${source.resources}">
-      <patternset refid="compile-resources.filter.pattern"/>
-    </fileset>
-  </copy>
-  <copy todir="${build.resources}" filtering="no">
-    <fileset dir="${source.resources}">
-      <patternset refid="compile-resources.pattern"/>
-    </fileset>
-  </copy>
-</target>
-
-<patternset id="compile-resources.filter.pattern">
-  <include name="**/*"/>
-</patternset>
-
-<patternset id="compile-resources.pattern">
-  <exclude name="INVALID_FILE_DOES_NOT_EXISTS"/>
-</patternset>
-
-<!-- Compile stylesheets files -->
-<target name="_default:compile-stylesheets" depends="init" unless="compile.disable">
-  <mkdir dir="${build.stylesheets}"/>
-  <copy todir="${build.stylesheets}" filtering="yes">
-    <fileset dir="${source.stylesheets}">
-      <include name="**/*"/>
-    </fileset>
-  </copy>
-</target>
-
-<!-- Compile bin scripts -->
-<target name="_default:compile-bin" depends="init" unless="compile.disable">
-  <mkdir dir="${build.bin}"/>
-  <copy todir="${build.bin}" filtering="yes">
-    <fileset dir="${source.bin}">
-      <include name="**/*"/>
-    </fileset>
-  </copy>
-
-  <call target="_default:fix-bin"/>
-</target>
-
-<target name="_default:fix-bin" depends="init">
-  <fixcrlf srcdir="${build.bin}"
-    eol="lf" eof="remove"
-    includes="**/*.sh, **/*.conf"/>
-
-  <fixcrlf srcdir="${build.bin}"
-    eol="crlf" eof="remove"
-    includes="**/*.bat, **/*.cmd"/>
-
-  <chmod perm="+x">
-    <fileset dir="${build.bin}">
-      <include name="**/*.sh"/>
-    </fileset>
-  </chmod>
-</target>
-
-<target name="_default:compile-web" depends="init" unless="compile.disable">
-  <mkdir dir="${build.web}"/>
-  <copy todir="${build.web}" filtering="yes">
-    <fileset dir="${source.web}">
-      <patternset refid="compile-web.filter.pattern"/>
-    </fileset>
-  </copy>
-  <copy todir="${build.web}" filtering="no">
-    <fileset dir="${source.web}">
-      <patternset refid="compile-web.pattern"/>
-    </fileset>
-  </copy>
-</target>
-
-<patternset id="compile-web.pattern">
-  <exclude name="INVALID_FILE_DOES_NOT_EXISTS"/>
-</patternset>
-
-<patternset id="compile-web.filter.pattern">
-  <include name="**/*"/>
-</patternset>
-
-<target name="_default:compile-checksums" depends="init" unless="compile.disable">
-  <checksum>
-    <fileset dir="${build.lib}">
-      <include name="*.jar"/>
-      <include name="*.zip"/>
-    </fileset>
-  </checksum>
-</target>
-
-<!-- Compile RMI stubs -->
-<target name="_default:compile-rmi" depends="init" unless="compile.disable">
-  <rmic base="${build.classes}"
-    verify="${rmic.verify}"
-    iiop="${rmic.iiop}"
-    iiopopts="${rmic.iiopops}"
-    idl="${rmic.idl}"
-    idlopts="${rmic.idlops}"
-    debug="${rmic.debug}"
-    stubVersion="${rmic.stubVersion}">
-    <classpath refid="javac.classpath"/>
-    <patternset refid="compile-rmi.pattern"/>
-  </rmic>
-</target>
-
-<patternset id="compile-rmi.pattern">
-  <exclude name="INVALID_FILE_DOES_NOT_EXISTS"/>
-</patternset>
-
-<!-- ================================================================== -->
-<!-- Jars                                                               -->
-<!-- ================================================================== -->
-
-<target name="_default:server-client-jars">
-
-  <!-- Build the server jar -->
-  <jar jarfile="${build.lib}/${jar.server.name}"
-    manifest="${build.etc}/default.mf">
-    <fileset dir="${build.classes}"
-      includes="${jar.server.includes}"/>
-  </jar>
-
-  <!-- Build jbossmq-client.jar -->
-  <jar jarfile="${build.lib}/${jar.client.name}"
-    manifest="${build.etc}/default.mf">
-    <fileset dir="${build.classes}"
-      includes="${jar.client.includes}"/>
-  </jar>
-
-</target>
-
-
-<!-- ================================================================== -->
-<!-- JBossRetro                                                         -->
-<!-- ================================================================== -->
-
-<target name="_default:init-jbossretro" depends="init">
-  <path id="jbossretro.classpath">
-    <path refid="apache.ant.classpath"/>
-    <path refid="javassist.classpath"/>
-    <path refid="jboss.jbossretro.classpath"/>
-  </path>
-
-  <path id="jbossretrort.classpath">
-    <path refid="jboss/backport.concurrent.classpath"/>
-    <pathelement path="${jboss.jbossretro.lib}/jbossretro-rt.jar"/>
-  </path>
- 
-  <mkdir dir="${build.classes.retro}"/>
-
-</target>
-
-
-<target name="_default:jbossretro" depends="_default:init-jbossretro">
-
-  <!-- Weave the build.classes to build.classes14 -->
-  <taskdef name="retro" classname="org.jboss.ant.tasks.retro.Retro" classpathref="jbossretro.classpath"/>
-
-  <retro compilerclasspathref="jbossretro.classpath" destdir="${build.classes.retro}">
-    <classpath refid="jbossretrort.classpath"/>
-    <classpath>
-      <pathelement path="${build.classes.retro.src}"/>
-    </classpath>
-    <classpath refid="javac.classpath"/>
-    <src path="${build.classes.retro.src}"/>
-  </retro>
-</target>
-
-<target name="_default:jbossretro-check" depends="_default:init-jbossretro">
-
-  <!-- Are the retroweaved classes valid jdk 1.4 bytecode? -->
-  <!-- The tests must be run with jdk1.4.x -->
-  <condition property="jdk14x">
-    <equals arg1="${ant.java.version}" arg2="1.4"/>
-  </condition>
-  <fail message="jdk1.4.x must be used for the checks" unless="jdk14x"/>
-
-  <taskdef name="retrocheck" classname="org.jboss.ant.tasks.retrocheck.RetroCheck" classpathref="jbossretro.classpath"/>
-
-
-  <retrocheck compilerclasspathref="jbossretro.classpath">
-    <classpath refid="jbossretro.classpath"/>
-    <src path="${build.classes.retro}"/>
-    <classpath>
-      <pathelement path="${build.classes.retro}"/>
-      <path refid="jbossretrort.classpath"/>
-      <path refid="javac.classpath"/>
-    </classpath>
-  </retrocheck>
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Documents                                                          -->
-<!-- ================================================================== -->
-
-<target name="docs" description="Builds all documentation."
-  depends="docs-api"/>
-
-<!-- ======== -->
-<!-- JavaDocs -->
-<!-- ======== -->
-
-<target name="docs-javadocs-check" depends="init">
-
-  <!-- if index.html is newer than the sources we are up to date -->
-  <uptodate property="docs-javadocs.disable"
-    targetfile="${build.api}/index.html">
-    <srcfiles dir="${source.java}"> 
-       <include name="**/*.java"/>
-       <include name="**/*.html"/>
-    </srcfiles>
-  </uptodate>
-</target>
-<target name="docs-javadocs" depends="init" unless="docs-javadocs.disable">
-  <call target="docs-javadocs_1_4" if="HAVE_JDK_1.4"/>
-</target>
-<!-- Generate Javadoc if we are out of date -->
-<target name="docs-javadocs_1_4"
-  depends="docs-javadocs-check"
-  unless="docs-javadocs.disable">
-
-  <mkdir dir="${build.api}"/>
-  <mkdir dir="${module.output}/gen-src"/>
-  <javadoc packagenames="org.jboss.*,${javadoc.packages}"
-    excludepackagenames="${javadoc.excludes}"
-    sourcepath="${source.java}:${module.output}/gen-src"
-    destdir="${build.api}"
-    classpathref="javac.classpath"
-    windowtitle="${javadoc.windowtitle}"
-    splitindex="${javadoc.splitindex}"
-    author="${javadoc.author}"
-    version="${javadoc.version}"
-    public="${javadoc.public}"
-    package="${javadoc.package}"
-    protected="${javadoc.protected}"
-    private="${javadoc.private}"
-    use="${javadoc.use}"
-    verbose="${javadoc.verbose}">
-    <doctitle><![CDATA[<h1>${module.Name} API Documentation</h1>]]></doctitle>
-    <bottom><![CDATA[
-      <i>
-      <div align="center">
-        <font size="-1">Copyright &#169; 2004 JBoss Inc. All Rights Reserved.</font>
-      </div>
-      </i>
-    ]]></bottom>
-
-    <!--
-    <link href="http://java.sun.com/j2se/1.3/docs/api"/>
-      -->
-
-    <!-- Added links and tags by Yanik Crepeau <yanik at exScriptis.com> 2003-05-13 -->
-    <!--Thes tag declarations will shut down the Unknown tag warning during the javadoc process -->
-    <link href="http://java.sun.com/j2se/1.4.1/docs/api/"/>
-    <tag name="ejb.interface-method" description="ejb interface method delcaration" enabled="false"/>
-    <tag name="ejb.persistence" description="ejb persistence declaration" enabled="false"/>
-    <tag name="ejb.pk-field" description="ejb primary-key field declaration" enabled="false"/>
-    <tag name="ejb.pk" description="ejb" enabled="false"/>
-    <tag name="ejb.bean" description="ejb" enabled="false"/>
-    <tag name="ejb.transaction" description="ejb" enabled="false"/>
-    <tag name="ejb.finder" description="ejb" enabled="false"/>
-    <tag name="ejb.relation" description="ejb" enabled="false"/>
-    <tag name="ejb.create-method" description="ejb" enabled="false"/>
-
-    <tag name="jboss.query" description="jboss" enabled="false"/>
-    <tag name="jboss.lazy-load-group" description="jboss" enabled="false"/>
-    <tag name="jboss.load-group" description="jboss" enabled="false"/>
-    <tag name="jboss.persistence" description="jboss" enabled="false"/>
-    <tag name="jboss.entity-command" description="jboss" enabled="false"/>
-    <tag name="jboss.method-attribute" description="jboss" enabled="false"/>
-    <tag name="jboss.relation" description="jboss" enabled="false"/>
-    <tag name="jboss.method-attribute" description="jboss" enabled="false"/>
-    <tag name="jboss.relation-read-ahead" description="jboss" enabled="false"/>
-    <tag name="jboss.relation-table" description="jboss" enabled="false"/>
-    <tag name="jboss.table-attribute" description="jboss" enabled="false"/>
-
-    <tag name="jmx.managed-attribute" description="jmx" enabled="false"/>
-    <tag name="jmx.managed-constructor" description="jmx" enabled="false"/>
-    <tag name="jboss.method-attributes" description="jboss" enabled="false"/>
-
-    <tag name="todo" description="todo" enabled="false"/>
-
-  </javadoc>
-</target>
-
-<target name="docs-api" depends="docs-javadocs"/>
-
-<target name="javadocs" depends="docs-javadocs"/>
-
-<!-- ========= -->
-<!-- TODO Docs -->
-<!-- ========= -->
-
-<target name="docs-todo-check" depends="init">
-
-  <!-- if index.html is newer than the sources we are up to date -->
-  <uptodate property="docs-todo.disable"
-    targetfile="${build.todo}/index.html">
-    <srcfiles dir="${source.java}" includes="**/*.java"/>
-  </uptodate>
-</target>
-
-<!-- Generate TODO list from @todo tags -->
-<target name="docs-todo"
-  depends="docs-todo-check"
-  unless="docs-todo.disable">
-
-  <!-- tdi: todo task not defined
-  <mkdir dir="${build.todo}"/>
-  <todo destdir="${build.todo}">
-    <fileset dir="${source.java}">
-      <include name="**/*.java"/>
-    </fileset>
-    <info/>
-  </todo>
-  -->
-</target>
-
-<target name="todo" depends="docs-todo"/>
-
-<!-- ============== -->
-<!-- JMX MBean Docs -->
-<!-- ============== -->
-
-<target name="jmx-docs" depends="init">
-  <taskdef name="jmxdoclet" classname="xdoclet.modules.jmx.JMXDocletTask" classpathref="xdoclet.task.classpath"/>
-
-  <mkdir dir="${build.jmx-doc}"/>
-  <jmxdoclet
-    destdir="${build.jmx-doc}"
-    force="false"
-    excludedtags="@version, at author">
-    <fileset dir="${source.java}">
-      <include name="**/*.java"/>
-    </fileset>
-    <jbossXmlDoc/>
-  </jmxdoclet>
-
-</target>
-
-<!-- Generate the plain HTML jmx docs -->
-<target name="jmx-docs-html-plain" depends="jmx-docs">
-
-
-  <!-- Force the use of SAXON XSLT -->
-  <property system="true"
-    name="javax.xml.transform.TransformerFactory"
-    value="com.icl.saxon.TransformerFactoryImpl"/>
-
-  <mkdir dir="${build.jmx-api}"/>
-  <style style="${project.thirdparty}/oasis/docbook-xsl/html/docbook.xsl"
-    processor="trax"
-    extension=".html"
-    basedir="${build.jmx-doc}"
-    destdir="${build.jmx-api}">
-    <include name="**/*.xml"/>
-    <param name="quiet" expression="${oasis.docbook.xsl.chunker.quiet}"/>
-    <param name="base.dir" expression="${build.jmx-api}${file.separator}"/>
-  </style>
-
-</target>
-
-
-<!-- ================================================================== -->
-<!-- Cleaning                                                           -->
-<!-- ================================================================== -->
-
-<!-- Clean up all build output -->
-<target name="_default:clean"
-  depends="_buildmagic:clean">
-</target>
-
-<!-- Clean up all generated files -->
-<target name="_default:clobber"
-  depends="_buildmagic:clobber, clean">
-</target>
-
-<target name="rebuild" depends="clean,most" description="clean and rebuild"/>
-
-
-<!-- ================================================================== -->
-<!-- Install & Release                                                  -->
-<!-- ================================================================== -->
-
-<!-- ================================================================== -->
-<!-- Project (build module) Targets                                     -->
-<!-- ================================================================== -->
-
-<!-- jason: this needs to be cleaned up -->
-
-<target name="configure-project" unless="configure-project.disable">
-
-  <!-- Bits for building source archives -->
-  <patternset id="source.ignore">
-    <exclude name="**/output/**"/>
-  </patternset>
-  <patternset id="source.free">
-    <exclude name="tools/**"/>
-    <exclude name="thirdparty/**"/>
-    <include name="**"/>
-  </patternset>
-  <patternset id="source.external">
-    <include name="tools/**"/>
-    <include name="thirdparty/**"/>
-  </patternset>
-
-  <!-- Skip any missing modules and issue a warning -->
-  <property name="executemodules.skipmissing" value="true"/>
-
-  <!-- The header and footer displayed during each module execution -->
-  <property name="executemodules.header"><![CDATA[
- ==============================================================
- ==
- ==  Executing '@TARGET@' in module '@MODULE@'...
- ==
- ==]]></property>
-
-  <property name="executemodules.footer"><![CDATA[
- ==
- ==
- ==  Finished '@TARGET@' in module '@MODULE@'.
- ==
- ==============================================================
-  ]]></property>
-
-  <property name="executemodules.exportproperties">
-       version.major,
-       version.minor,
-       version.revision,
-       version.tag,
-       version.name,
-       version.cvstag,
-
-       specification.title,
-       specification.version,
-       specification.vendor,
-
-       implementation.title,
-       implementation.version,
-       implementation.vendor,
-       implementation.vendor.id,
-       implementation.url
-  </property>
-
-  <!-- Show the module configuration -->
-  <echo>groups:  ${groups}</echo>
-  <echo>modules: ${modules}</echo>
-
-  <property name="configure-project.disable" value="true" system="true"/>
-
-</target>
-
-<!-- ================================================================== -->
-<!-- Module Pass-through Targets                                        -->
-<!-- ================================================================== -->
-
-<!-- Invoke the 'all' on all configured modules -->
-<target name="_buildmagic:modules:all" depends="init">
-  <execmodules target="all"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}"
-    exportproperties="${executemodules.exportproperties}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'most' on all configured modules -->
-<target name="_buildmagic:modules:most" depends="init">
-  <execmodules target="most"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}"
-    exportproperties="${executemodules.exportproperties}">
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'main' on all configured modules -->
-<target name="_buildmagic:modules:main" depends="init">
-  <execmodules target="main"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}"
-    exportproperties="${executemodules.exportproperties}">
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'release' on all configured modules -->
-<target name="_buildmagic:modules:release" depends="init">
-  <execmodules target="release"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}"
-    exportproperties="${executemodules.exportproperties}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'tests' on all configured modules -->
-<target name="_buildmagic:modules:tests" depends="init">
-  <execmodules target="tests"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}"
-    exportproperties="${executemodules.exportproperties}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-    <property name="build.reports" value="${project.root}/testsuite/output/reports"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'clean' on all configured modules -->
-<target name="_buildmagic:modules:clean" depends="init">
-  <execmodules target="clean"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'clobber' on all configured modules -->
-<target name="_buildmagic:modules:clobber" depends="init">
-  <execmodules target="clobber"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-
-<!-- Invoke the 'docs' on all configured modules -->
-<target name="_buildmagic:modules:docs" depends="init">
-  <execmodules target="docs"
-    modules="${modules}"
-    root="${project.root}/@MODULE@"
-    skipmissing="${executemodules.skipmissing}">
-    <before target="_module- at MODULE@- at TARGET@-prepare"/>
-    <header message="${executemodules.header}"/>
-    <footer message="${executemodules.footer}"/>
-    <after target="_module- at MODULE@- at TARGET@"/>
-    <property name="init.have-parent" value="true"/>
-  </execmodules>
-</target>
-

Copied: tags/JBossCommon-1.0.2/tools/etc/buildmagic/buildmagic.ent (from rev 1934, tags/JBossCommon-1.0.1/tools/etc/buildmagic/buildmagic.ent)




More information about the jboss-svn-commits mailing list