Permalink
Browse files

Update all third-party Jars, junit passes (but build.xmls are broken)

Remove xml-api, jakarta-regex, xalan - instead rely on Java built-ins.
Update ant, junit, xerces, jaxen
Question - isorelax in contrib?
  • Loading branch information...
1 parent 2ce8a11 commit dd9d2ce8a487b5f0e3221623520cd51cbce25dec @rolfl rolfl committed Aug 2, 2011
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file not shown.
@@ -1,66 +0,0 @@
-This product includes Jakarta-Regexp software developed by the Apache
-Software Foundation (http://www.apache.org/). It is redistributed in
-accordance with the license below. For more information, see
-http://jakarta.apache.org
-
-/*
- * $Header: /home/cvspublic/jdom-contrib/lib/jakarta-regexp.readme,v 1.2 2001/02/26 07:01:11 jhunter Exp $
- * $Revision: 1.2 $
- * $Date: 2001/02/26 07:01:11 $
- *
- * ====================================================================
- *
- * 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", "Jakarta-Regexp", 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@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 JDOM AUTHORS OR THE PROJECT
- * 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/>.
- *
- */
-
@@ -59,7 +59,9 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
package org.jdom2.contrib.beans;
import java.util.*;
-import org.apache.regexp.*;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import java.util.regex.PatternSyntaxException;
import java.text.*;
import java.io.PrintStream;
@@ -165,20 +167,21 @@ public static ISO8601 parseISO8601(String s) {
// e.g. 1997-07-16T19:20:30.45+01:00
// additions: "T" can be a space, TZ can be a three-char code, TZ can be missing
try {
- RE re = new RE(reISO8601);
- if (re.match(s)) {
+ Pattern pat = Pattern.compile(reISO8601);
+ Matcher re = pat.matcher(s);
+ if (re.matches()) {
if (debug)
showParens(re);
ISO8601 iso = new ISO8601();
- iso.year = toInt(re.getParen(1));
- iso.month = toInt(re.getParen(3));
- iso.day = toInt(re.getParen(5));
- iso.hour = toInt(re.getParen(7));
- iso.min = toInt(re.getParen(8));
- iso.sec = toInt(re.getParen(11));
- iso.frac = toInt(re.getParen(13));
- iso.tz = re.getParen(14);
+ iso.year = toInt(re.group(1));
+ iso.month = toInt(re.group(3));
+ iso.day = toInt(re.group(5));
+ iso.hour = toInt(re.group(7));
+ iso.min = toInt(re.group(8));
+ iso.sec = toInt(re.group(11));
+ iso.frac = toInt(re.group(13));
+ iso.tz = re.group(14);
if (debug) {
System.out.println("year='" + iso.year + "'");
@@ -194,7 +197,7 @@ public static ISO8601 parseISO8601(String s) {
return iso;
}
} // try
- catch (RESyntaxException ree) {
+ catch (PatternSyntaxException ree) {
ree.printStackTrace();
}
return null;
@@ -214,13 +217,13 @@ public static int toInt(String x) {
* Dump parenthesized subexpressions found by a regular expression matcher object
* @param r Matcher object with results to show
*/
- static void showParens(RE r)
+ static void showParens(Matcher r)
{
// Loop through each paren
- for (int i = 0; i < r.getParenCount(); i++)
+ for (int i = 0; i < r.groupCount(); i++)
{
// Show paren register
- System.out.println("$" + i + " = " + r.getParen(i));
+ System.out.println("$" + i + " = " + r.group(i));
}
}
@@ -57,22 +57,22 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
package org.jdom2.contrib.input.scanner;
+import java.util.regex.Pattern;
+import java.util.regex.PatternSyntaxException;
+
import org.jdom2.Element;
import org.jdom2.JDOMException;
import org.jdom2.xpath.XPath;
import org.xml.sax.Attributes;
-import org.apache.regexp.RE;
-import org.apache.regexp.RESyntaxException;
-
/* package */ class JakartaRegExpXPathMatcher extends XPathMatcher {
/**
* The compiled regular expression this matcher matches.
*/
- private final RE re;
+ private final Pattern re;
private final XPath test;
@@ -94,7 +94,7 @@ public JakartaRegExpXPathMatcher(
try {
String pathPattern = getPathPatternAsRE(expression);
- this.re = new RE(pathPattern);
+ this.re = Pattern.compile(pathPattern);
String testPattern = getTestPattern(expression);
if (testPattern != null) {
@@ -114,7 +114,7 @@ public JakartaRegExpXPathMatcher(
" -> XPath = " + testPattern);
}
}
- catch (RESyntaxException ex1) {
+ catch (PatternSyntaxException ex1) {
throw (new JDOMException(
"Illegal XPath expression: " + expression, ex1));
}
@@ -137,7 +137,7 @@ public JakartaRegExpXPathMatcher(
* expression, <code>false</code> otherwise.
*/
public boolean match(String path, Attributes attrs) {
- return (this.re.match(path));
+ return (this.re.matcher(path).matches());
}
/**
View
@@ -1,53 +0,0 @@
-The following is a description of the JARs included with JDOM.
-More information about the JARs can be found by reading the files
-accompanying the JARs. Note that the build scripts (build*) take
-care of adding the proper JARs to the path for building. However
-you need to set your classpath properly for runtime execution.
-
-
-Short summary:
-
-JDK 1.4 includes XML parser and transformation classes, so if you're
-using JDK 1.4+ you don't really need to worry about most of the JARs
-in this directory. However, you might want to add xerces.jar and
-xml-apis.jar to your classpath so JDOM will use Xerces 2.4.0 instead
-of the default JDK parser Crimson 1.1. You can also use xalan.jar to
-use Xalan 2.5_D1 instead of the older Xalan that comes with the JDK.
-See below.
-
-For JDK 1.3 and earlier users, you'll want to add xerces.jar,
-xml-apis.jar, and xalan.jar to your classpath. Or you can use any
-third party parser too.
-
-All users should add jaxen-core.jar, jaxen-jdom.jar, and saxpath.jar
-to their classpath to use the XPath features in JDOM.
-
-
-Full explanation:
-
-ant.jar
- Used for building JDOM. The build scripts include it automatically.
- Don't include it in your runtime path.
-
-xerces.jar
-xml-apis.jar
- The popular Xerces XML parser. Place these two JARs at the head of
- your classpath and Xerces will be used as your parser.
-
-xalan.jar
- An XSLT processor. Included in J2SE 1.4+. Put this in your
- classpath if you're doing transforms on older J2SE versions. To use
- the newer Xalan with J2SE 1.4+ see
- http://xml.apache.org/xalan-j/faq.html#faq-N100CB.
-
-jaxen.jar
- This JAR supports the XPath feature of JDOM. Put it in your classpath
- if you're using XPath.
-
---
-
-jdom.jar
- This JAR is created during the build process and put in the "build"
- directory. This contains the org.jdom.* classes, and you should add this
- JAR to your classpath when using JDOM.
-
View
Binary file not shown.
View
@@ -1,54 +0,0 @@
-This is Ant 1.5.2.
-
-This product includes Ant software developed by the Apache Software
-Foundation (http://www.apache.org/). It is redistributed in accordance with
-the license below. For more information, see http://jakarta.apache.org.
-
-/*
- * ============================================================================
- * 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 modifica-
- * tion, 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 acknowledgment: "This product includes software
- * developed by the Apache Software Foundation (http://www.apache.org/)."
- * Alternately, this acknowledgment may appear in the software itself, if
- * and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Ant" 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@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache", nor may
- * "Apache" appear in their name, without prior written permission of the
- * Apache Software Foundation.
- *
- * 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 (INCLU-
- * DING, 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/>.
- *
- */
View
@@ -1,13 +0,0 @@
-#! /bin/sh
-
-# Args: DIR command
-cd $1
-CMD=$2
-shift
-shift
-
-if test -f $CMD.sh; then
- CMD="sh $CMD.sh"
-fi
-
-echo $CMD $@ | sh
View
Binary file not shown.
@@ -1,3 +0,0 @@
-This is Jaxen 1.1.1 from http://jaxen.codehaus.org.
-
-The single jaxen.jar replaces the older jaxen-core.jar and jaxen-jdom.jar.
View
Binary file not shown.
@@ -1,55 +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 acknowledgment:
- * "This product includes software developed by the
- * Apache Software Foundation (http://www.apache.org/)."
- * Alternately, this acknowledgment may appear in the software itself,
- * if and wherever such third-party acknowledgments normally appear.
- *
- * 4. The names "Xalan" 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@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache",
- * nor may "Apache" appear in their name, without prior written
- * permission of the Apache Software Foundation.
- *
- * 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 and was
- * originally based on software copyright (c) 1999, Lotus
- * Development Corporation., http://www.lotus.com. For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- */
@@ -1,2 +0,0 @@
-This is Xalan 2.5.D1, distributed from http://xml.apache.org.
-It's designed to go with Xerces 2.4.0.
View
Binary file not shown.
Oops, something went wrong.

0 comments on commit dd9d2ce

Please sign in to comment.