From 7cbd5df0177f449706fe1ad6f84fa401ca264e18 Mon Sep 17 00:00:00 2001
From: Stefan Bodewig
Date: Wed, 9 Jan 2002 09:08:39 +0000
Subject: [PATCH] Remove code that has never been used in any released version
of Ant.
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@270645 13f79535-47bb-0310-9956-ffa450edef68
---
build.xml | 10 -
docs/manual/CoreTasks/style.html | 20 +-
docs/manual/install.html | 4 +-
src/main/org/apache/tools/ant/Constants.java | 16 -
.../org/apache/tools/ant/DesirableFilter.java | 132 -------
src/main/org/apache/tools/ant/Launcher.java | 204 -----------
.../tools/ant/taskdefs/CompileTask.java | 118 -------
.../tools/ant/taskdefs/JavacOutputStream.java | 127 -------
.../tools/ant/taskdefs/XSLTProcess.java | 18 +-
.../ant/taskdefs/optional/AdaptxLiaison.java | 103 ------
.../ant/taskdefs/optional/ManifestFile.java | 332 ------------------
.../taskdefs/optional/AdaptxLiaisonTest.java | 72 ----
12 files changed, 15 insertions(+), 1141 deletions(-)
delete mode 100644 src/main/org/apache/tools/ant/Constants.java
delete mode 100644 src/main/org/apache/tools/ant/DesirableFilter.java
delete mode 100644 src/main/org/apache/tools/ant/Launcher.java
delete mode 100644 src/main/org/apache/tools/ant/taskdefs/CompileTask.java
delete mode 100644 src/main/org/apache/tools/ant/taskdefs/JavacOutputStream.java
delete mode 100644 src/main/org/apache/tools/ant/taskdefs/optional/AdaptxLiaison.java
delete mode 100644 src/main/org/apache/tools/ant/taskdefs/optional/ManifestFile.java
delete mode 100644 src/testcases/org/apache/tools/ant/taskdefs/optional/AdaptxLiaisonTest.java
diff --git a/build.xml b/build.xml
index ae786cd21..c5be1b18e 100644
--- a/build.xml
+++ b/build.xml
@@ -174,9 +174,6 @@
classname="javax.servlet.Servlet"
classpathref="classpath"/>
-
@@ -269,7 +266,6 @@
unless="trax.present" />
-
@@ -813,8 +809,6 @@
unless="xslp.present"/>
-
@@ -897,10 +891,6 @@
-
-
diff --git a/docs/manual/CoreTasks/style.html b/docs/manual/CoreTasks/style.html
index 5eb2dc21d..fab38f434 100644
--- a/docs/manual/CoreTasks/style.html
+++ b/docs/manual/CoreTasks/style.html
@@ -84,17 +84,17 @@ inclusion/exclusion of files works, and how to write patterns.
processor |
+
name of the XSLT processor to use. Permissible values are
- "trax" for a TraX compliant processor, "xslp" for the
- XSL:P processor, "xalan" for the Apache XML Xalan (version 1)
- processor, "adaptx" for the Exolab Adaptx processor
- or the name of an arbitrary XSLTLiaison class. Defaults to trax,
- followed by xalan, then adaptx and then xslp (in that
- order). The first one found in your class path is the one that
- is used.
- DEPRECATED - XSL:P and Adaptx are
- deprecated and will be removed in the next version. Use trax or
- xalan instead..
+ "trax" for a TraX compliant processor,
+ "xslp" for the XSL:P processor, "xalan" for
+ the Apache XML Xalan (version 1) processor the name of an
+ arbitrary XSLTLiaison class. Defaults to trax, followed by xalan
+ and then xslp (in that order). The first one found in your class
+ path is the one that is used.
+
+ DEPRECATED - XSL:P is deprecated and will
+ be removed in the next version. Use trax or xalan instead..
|
No |
diff --git a/docs/manual/install.html b/docs/manual/install.html
index 8f7a6b48e..7d0267a78 100644
--- a/docs/manual/install.html
+++ b/docs/manual/install.html
@@ -264,12 +264,10 @@ Installing Ant / Optional Tasks section above.
Available At |
- An XSL transformer like Xalan, Adaptx or XSL:P |
+ An XSL transformer like Xalan or XSL:P |
style task |
http://xml.apache.org/xalan-j/index.html for Xalan.
- CVS module adaptx from :pserver:anoncvs@virtuals.intalio.com:/cvs/adaptx
- with password anoncvs for AdaptX.
XSL:P used to live at http://www.clc-marketing.com/xslp/, but the link
doesn't work any longer and we are not aware of a replacement site. |
diff --git a/src/main/org/apache/tools/ant/Constants.java b/src/main/org/apache/tools/ant/Constants.java
deleted file mode 100644
index 4bda035c8..000000000
--- a/src/main/org/apache/tools/ant/Constants.java
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * Copyright (C) The Apache Software Foundation. All rights reserved.
- *
- * This software is published under the terms of the Apache Software License
- * version 1.1, a copy of which has been included with this distribution in
- * the LICENSE file.
- */
-package org.apache.tools.ant;
-
-/**
- * Abstract interface to hold constants.
- *
- * @author Peter Donald
- */
-interface Constants {
-}
diff --git a/src/main/org/apache/tools/ant/DesirableFilter.java b/src/main/org/apache/tools/ant/DesirableFilter.java
deleted file mode 100644
index 1c1be0133..000000000
--- a/src/main/org/apache/tools/ant/DesirableFilter.java
+++ /dev/null
@@ -1,132 +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", "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 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
- * .
- */
-
-package org.apache.tools.ant;
-
-import java.io.File;
-import java.io.FilenameFilter;
-
-
-/**
- * Filters filenames to determine whether or not the file is desirable.
- *
- * @author Jason Hunter [jhunter@servlets.com]
- * @author james@x180.com
- */
-public class DesirableFilter implements FilenameFilter {
-
- /**
- * Test the given filename to determine whether or not it's desirable.
- * This helps tasks filter temp files and files used by CVS.
- */
-
- public boolean accept(File dir, String name) {
-
- // emacs save file
- if (name.endsWith("~")) {
- return false;
- }
-
- // emacs autosave file
- if (name.startsWith("#") && name.endsWith("#")) {
- return false;
- }
-
- // openwindows text editor does this I think
- if (name.startsWith("%") && name.endsWith("%")) {
- return false;
- }
-
- /* CVS stuff -- hopefully there won't be a case with
- * an all cap file/dir named "CVS" that somebody wants
- * to keep around...
- */
-
- if (name.equals("CVS")) {
- return false;
- }
-
- /* If we are going to ignore CVS might as well ignore
- * this one as well...
- */
- if (name.equals(".cvsignore")){
- return false;
- }
-
- // CVS merge autosaves.
- if (name.startsWith(".#")) {
- return false;
- }
-
- // SCCS/CSSC/TeamWare:
- if (name.equals("SCCS")) {
- return false;
- }
-
- // Visual Source Save
- if (name.equals("vssver.scc")) {
- return false;
- }
-
- // default
- return true;
- }
-}
-
-
-
-
-
-
-
diff --git a/src/main/org/apache/tools/ant/Launcher.java b/src/main/org/apache/tools/ant/Launcher.java
deleted file mode 100644
index 097c4596e..000000000
--- a/src/main/org/apache/tools/ant/Launcher.java
+++ /dev/null
@@ -1,204 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 2001 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", "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 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
- * .
- */
-
-package org.apache.tools.ant;
-
-import java.io.File;
-import java.io.FilenameFilter;
-import java.util.StringTokenizer;
-import java.util.Properties;
-import java.net.URL;
-import java.net.MalformedURLException;
-import java.lang.reflect.Method;
-
-/**
- * This is the Ant command line front end to end. This front end
- * works out where ant is installed and loads the ant libraries before
- * starting Ant proper.
- *
- * @author Conor MacNeill
- */
-public class Launcher {
- private static File determineAntHome11() {
- String classpath = System.getProperty("java.class.path");
- StringTokenizer tokenizer = new StringTokenizer(classpath, System.getProperty("path.separator"));
- while (tokenizer.hasMoreTokens()) {
- String path = tokenizer.nextToken();
- if (path.endsWith("ant.jar")) {
- File antJarFile = new File(path);
- File libDirectory = new File(antJarFile.getParent());
- File antHome = new File(libDirectory.getParent());
- return antHome;
- }
- }
- return null;
- }
-
- private static File determineAntHome(ClassLoader systemClassLoader) {
- try {
- String className = Launcher.class.getName().replace('.', '/') + ".class";
- URL classResource = systemClassLoader.getResource(className);
- String fileComponent = classResource.getFile();
- if (classResource.getProtocol().equals("file")) {
- // Class comes from a directory of class files rather than
- // from a jar.
- int classFileIndex = fileComponent.lastIndexOf(className);
- if (classFileIndex != -1) {
- fileComponent = fileComponent.substring(0, classFileIndex);
- }
- File classFilesDir = new File(fileComponent);
- File buildDir = new File(classFilesDir.getParent());
- File devAntHome = new File(buildDir.getParent());
- return devAntHome;
- }
- else if (classResource.getProtocol().equals("jar")) {
- // Class is coming from a jar. The file component of the URL
- // is actually the URL of the jar file
- int classSeparatorIndex = fileComponent.lastIndexOf("!");
- if (classSeparatorIndex != -1) {
- fileComponent = fileComponent.substring(0, classSeparatorIndex);
- }
- URL antJarURL = new URL(fileComponent);
- File antJarFile = new File(antJarURL.getFile());
- File libDirectory = new File(antJarFile.getParent());
- File antHome = new File(libDirectory.getParent());
- return antHome;
- }
- }
- catch (MalformedURLException e) {
- e.printStackTrace();
- }
- return null;
- }
-
- private static void addDirJars(AntClassLoader classLoader, File jarDir) {
- String[] fileList = jarDir.list(new FilenameFilter() {
- public boolean accept(File dir, String name) {
- return name.endsWith(".jar");
- }
- });
-
- if (fileList != null) {
- for (int i = 0; i < fileList.length; ++i) {
- File jarFile = new File(jarDir, fileList[i]);
- classLoader.addPathElement(jarFile.getAbsolutePath());
- }
- }
- }
-
- private static void addToolsJar(AntClassLoader antLoader) {
- String javaHome = System.getProperty("java.home");
- if (javaHome.endsWith("jre")) {
- javaHome = javaHome.substring(0, javaHome.length() - 4);
- }
- System.out.println("Java home is " + javaHome);
- File toolsJar = new File(javaHome, "lib/tools.jar");
- if (!toolsJar.exists()) {
- System.out.println("Unable to find tools.jar at " + toolsJar.getPath());
- }
- else {
- antLoader.addPathElement(toolsJar.getAbsolutePath());
- }
- }
-
-
- public static void main(String[] args) {
- File antHome = null;
- ClassLoader systemClassLoader = Launcher.class.getClassLoader();
- if (systemClassLoader == null) {
- antHome = determineAntHome11();
- }
- else {
- antHome = determineAntHome(systemClassLoader);
- }
- if (antHome == null) {
- System.err.println("Unable to determine ANT_HOME");
- System.exit(1);
- }
-
- System.out.println("ANT_HOME is " + antHome);
-
- // We now create the class loader with which we are going to launch ant
- AntClassLoader antLoader = new AntClassLoader(systemClassLoader, false);
-
- // need to find tools.jar
- addToolsJar(antLoader);
-
- // add everything in the lib directory to this classloader
- File libDir = new File(antHome, "lib");
- addDirJars(antLoader, libDir);
-
- File optionalDir = new File(antHome, "lib/optional");
- addDirJars(antLoader, optionalDir);
-
- Properties launchProperties = new Properties();
- launchProperties.put("ant.home", antHome.getAbsolutePath());
-
- try {
- Class mainClass = antLoader.loadClass("org.apache.tools.ant.Main");
- antLoader.initializeClass(mainClass);
-
- final Class[] param = {Class.forName("[Ljava.lang.String;"),
- Properties.class, ClassLoader.class};
- final Method startMethod = mainClass.getMethod("start", param);
- final Object[] argument = {args, launchProperties, systemClassLoader};
- startMethod.invoke(null, argument);
- }
- catch (Exception e) {
- System.out.println("Exception running Ant: " + e.getClass().getName() + ": " + e.getMessage());
- e.printStackTrace();
- }
- }
-}
-
diff --git a/src/main/org/apache/tools/ant/taskdefs/CompileTask.java b/src/main/org/apache/tools/ant/taskdefs/CompileTask.java
deleted file mode 100644
index dad5206c8..000000000
--- a/src/main/org/apache/tools/ant/taskdefs/CompileTask.java
+++ /dev/null
@@ -1,118 +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", "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 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
- * .
- */
-
-package org.apache.tools.ant.taskdefs;
-
-
-import org.apache.tools.ant.types.PatternSet;
-
-import java.util.Vector;
-import java.util.Enumeration;
-
-/**
- * This task will compile and load a new taskdef all in one step.
- * At times, this is useful for eliminating ordering dependencies
- * which otherwise would require multiple executions of Ant.
- *
- * @author Sam Ruby rubys@us.ibm.com
- *
- * @deprecated use <taskdef> elements nested into <target>s instead
- */
-
-public class CompileTask extends Javac {
-
- protected Vector taskList = new Vector();
-
- /**
- * add a new task entry on the task list
- */
- public Taskdef createTaskdef() {
- Taskdef task = new Taskdef();
- taskList.addElement(task);
- return task;
- }
-
- /**
- * do all the real work in init
- */
- public void init() {
- log("!! CompileTask is deprecated. !!");
- log("Use elements nested into s instead");
-
- // create all the include entries from the task defs
- for (Enumeration e=taskList.elements(); e.hasMoreElements(); ) {
- Taskdef task = (Taskdef)e.nextElement();
- String source = task.getClassname().replace('.','/') + ".java";
- PatternSet.NameEntry include = super.createInclude();
- include.setName("**/" + source);
- }
-
- // execute Javac
- super.init();
- super.execute();
-
- // now define all the new tasks
- for (Enumeration e=taskList.elements(); e.hasMoreElements(); ) {
- Taskdef task = (Taskdef)e.nextElement();
- task.init();
- }
-
- }
-
- /**
- * have execute do nothing
- */
- public void execute() {
- }
-}
diff --git a/src/main/org/apache/tools/ant/taskdefs/JavacOutputStream.java b/src/main/org/apache/tools/ant/taskdefs/JavacOutputStream.java
deleted file mode 100644
index e9fd58472..000000000
--- a/src/main/org/apache/tools/ant/taskdefs/JavacOutputStream.java
+++ /dev/null
@@ -1,127 +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", "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 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
- * .
- *
- */
-
-package org.apache.tools.ant.taskdefs;
-
-import org.apache.tools.ant.Task;
-import java.io.OutputStream;
-import java.io.IOException;
-
-/**
- * Serves as an output stream to Javac. This let's us print messages
- * out to the log and detect whether or not Javac had an error
- * while compiling.
- *
- * @author James Duncan Davidson (duncan@x180.com)
- * @deprecated use returnvalue of compile to detect compilation failure.
- */
-
-class JavacOutputStream extends OutputStream {
-
- private Task task;
- private StringBuffer line;
- private boolean errorFlag = false;
-
- /**
- * Constructs a new JavacOutputStream with the given task
- * as the output source for messages.
- */
-
- JavacOutputStream(Task task) {
- this.task = task;
- line = new StringBuffer();
- }
-
- /**
- * Write a character to the output stream. This method looks
- * to make sure that there isn't an error being reported and
- * will flush each line of input out to the project's log stream.
- */
-
- public void write(int c) throws IOException {
- char cc = (char)c;
- if (cc == '\r' || cc == '\n') {
- // line feed
- if (line.length() > 0) {
- processLine();
- }
- } else {
- line.append(cc);
- }
- }
-
- /**
- * Processes a line of input and determines if an error occured.
- */
-
- private void processLine() {
- String s = line.toString();
- if (s.indexOf("error") > -1) {
- errorFlag = true;
- }
- task.log(s);
- line = new StringBuffer();
- }
-
- /**
- * Returns the error status of the compile. If no errors occured,
- * this method will return false, else this method will return true.
- */
-
- boolean getErrorFlag() {
- return errorFlag;
- }
-}
-
diff --git a/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java b/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java
index a5ec7cb5a..88f88eb8c 100644
--- a/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java
+++ b/src/main/org/apache/tools/ant/taskdefs/XSLTProcess.java
@@ -288,11 +288,6 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger {
final Class clazz =
loadClass("org.apache.tools.ant.taskdefs.optional.XalanLiaison");
liaison = (XSLTLiaison)clazz.newInstance();
- } else if (proc.equals("adaptx")) {
- log("DEPRECATED - adaptx processor is deprecated. Use trax or xalan instead.");
- final Class clazz =
- loadClass("org.apache.tools.ant.taskdefs.optional.AdaptxLiaison");
- liaison = (XSLTLiaison) clazz.newInstance();
} else {
liaison = (XSLTLiaison) loadClass(proc).newInstance();
}
@@ -422,16 +417,11 @@ public class XSLTProcess extends MatchingTask implements XSLTLogger {
resolveProcessor("xalan");
} catch (Throwable e2) {
try {
- resolveProcessor("adaptx");
+ resolveProcessor("xslp");
} catch (Throwable e3) {
- try {
- resolveProcessor("xslp");
- } catch (Throwable e4) {
- e4.printStackTrace();
- e3.printStackTrace();
- e2.printStackTrace();
- throw new BuildException(e1);
- }
+ e3.printStackTrace();
+ e2.printStackTrace();
+ throw new BuildException(e1);
}
}
}
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/AdaptxLiaison.java b/src/main/org/apache/tools/ant/taskdefs/optional/AdaptxLiaison.java
deleted file mode 100644
index 4ba4cec47..000000000
--- a/src/main/org/apache/tools/ant/taskdefs/optional/AdaptxLiaison.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 2001 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", "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 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
- * .
- */
-
-package org.apache.tools.ant.taskdefs.optional;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.OutputStreamWriter;
-
-import org.apache.tools.ant.taskdefs.XSLTLiaison;
-import org.apache.tools.ant.BuildException;
-
-import org.exolab.adaptx.xslt.XSLTProcessor;
-import org.exolab.adaptx.xslt.XSLTReader;
-import org.exolab.adaptx.xslt.XSLTStylesheet;
-
-/**
- *
- * @author Arnaud Blandin
- * @version $Revision$ $Date$
- */
-public class AdaptxLiaison implements XSLTLiaison {
-
- protected XSLTProcessor processor;
- protected XSLTStylesheet xslSheet;
-
- public AdaptxLiaison () {
- processor = new XSLTProcessor();
- }
-
- public void setStylesheet(File fileName) throws Exception {
- XSLTReader xslReader = new XSLTReader();
- xslSheet = xslReader.read( fileName.getAbsolutePath() );
- };
-
- public void transform(File infile, File outfile) throws Exception {
- FileOutputStream fos = new FileOutputStream(outfile);
- OutputStreamWriter out = new OutputStreamWriter(fos,"UTF8");
- processor.process(infile.getAbsolutePath(), xslSheet, out);
- }
-
- public void addParam(String name, String expression){
- processor.setProperty(name, expression);
- }
-
- public void setOutputtype(String type) throws Exception {
- if (!type.equals("xml")) {
- throw new BuildException("Unsupported output type: " + type);
- }
- }
-
-} //-- AdaptxLiaison
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ManifestFile.java b/src/main/org/apache/tools/ant/taskdefs/optional/ManifestFile.java
deleted file mode 100644
index 9d674a2c6..000000000
--- a/src/main/org/apache/tools/ant/taskdefs/optional/ManifestFile.java
+++ /dev/null
@@ -1,332 +0,0 @@
-package org.apache.tools.ant.taskdefs.optional;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.util.Vector;
-import java.util.Enumeration;
-import java.util.Comparator;
-import java.util.ListIterator;
-import java.util.StringTokenizer;
-import java.util.ArrayList;
-import org.apache.tools.ant.Task;
-import org.apache.tools.ant.BuildException;
-
-
-/**
- * Task for creating a manifest file for a jar archiv.
- * use:
- *
- *
- *
- *
- *
- *
- *
- *
- *
- *@version 1.0 2001-10-11
- *@author Thomas Kerle
- */
-public class ManifestFile extends Task {
-
- private final static String newLine = System.getProperty("line.separator");
- private final static String keyValueSeparator = ":";
- private final static String UPDATE_ = "update";
- private final static String REPLACEALL_ = "replaceAll";
-
- private File manifestFile;
- private Vector entries;
- private EntryContainer container;
- private String currentMethod;
-
- public ManifestFile() {
- entries = new Vector();
- container = new EntryContainer();
- }
-
- /**
- * execute task
- * @exception BuildException : Failure in building
- */
- public void execute() throws BuildException {
- checkParameters();
- if (isUpdate(currentMethod)) {
- readFile();
- }
-
- executeOperation();
- writeFile();
- }
-
- /**
- * adding entries to a container
- * @exception BuildException
- */
- private void executeOperation() throws BuildException {
- Enumeration enum = entries.elements();
-
- while (enum.hasMoreElements()) {
- Entry entry = (Entry) enum.nextElement();
- entry.addTo (container);
- }
- }
-
- /**
- * creating entries by Ant
- *
- *
- */
- public Entry createEntry() {
- Entry entry = new Entry();
- entries.addElement(entry);
- return entry;
- }
-
-
- private boolean isUpdate (String method) {
- return method.equals(UPDATE_.toUpperCase());
- }
-
- private boolean isReplaceAll (String method) {
- return method.equals(REPLACEALL_.toUpperCase());
- }
-
- /**
- * Setter for the method attribute (update/replaceAll)
- * @param method Method to set task
- */
- public void setMethod (String method) {
- currentMethod = method.toUpperCase();
- }
-
- /**
- * Setter for the file attribute
- * @param filename for the manifest
- */
- public void setFile(File f) {
- manifestFile = f;
- }
-
-
- private StringBuffer buildBuffer () {
- StringBuffer buffer = new StringBuffer ();
-
- ListIterator iterator = container.elements();
-
- while (iterator.hasNext()) {
- Entry entry = (Entry) iterator.next();
-
- String key = (String) entry.getKey();
- String value = (String) entry.getValue();
- String entry_string = key + keyValueSeparator + value;
-
- buffer.append (entry_string + this.newLine);
- }
-
- return buffer;
- }
-
-
- private void writeFile() throws BuildException {
- try {
- manifestFile.delete();
- log ("Replacing or creating new manifest file " + manifestFile.getAbsolutePath());
- if (manifestFile.createNewFile()) {
- FileOutputStream fos = new FileOutputStream(manifestFile);
-
- StringBuffer buffer = buildBuffer();
-
- int size = buffer.length();
-
- for (int i=0; i.
- *
- */
-
-package org.apache.tools.ant.taskdefs.optional;
-
-import org.apache.tools.ant.taskdefs.XSLTLiaison;
-
-/**
- * Adaptx Liaison testcase
- * @author Stefan Bodewig
- */
-public class AdaptxLiaisonTest extends AbstractXSLTLiaisonTest {
- public AdaptxLiaisonTest(String name){
- super(name);
- }
-
- protected XSLTLiaison createLiaison() throws Exception {
- return new AdaptxLiaison();
- }
-}