From 9b06d977b84499462163e4a2183b91c3a52638a3 Mon Sep 17 00:00:00 2001 From: Peter Donald Date: Sat, 15 Dec 2001 13:35:49 +0000 Subject: [PATCH] Delete deprecated tasks. git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@270156 13f79535-47bb-0310-9956-ffa450edef68 --- .../ant/taskdefs/optional/AdaptxLiaison.java | 60 ------------- .../tools/ant/taskdefs/optional/Test.java | 84 ------------------- .../ant/taskdefs/optional/XslpLiaison.java | 71 ---------------- .../ant/taskdefs/optional/AdaptxLiaison.java | 60 ------------- .../tools/ant/taskdefs/optional/Test.java | 84 ------------------- .../ant/taskdefs/optional/XslpLiaison.java | 71 ---------------- 6 files changed, 430 deletions(-) delete mode 100644 proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/AdaptxLiaison.java delete mode 100644 proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/Test.java delete mode 100644 proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/XslpLiaison.java delete mode 100644 proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/AdaptxLiaison.java delete mode 100644 proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/Test.java delete mode 100644 proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/XslpLiaison.java diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/AdaptxLiaison.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/AdaptxLiaison.java deleted file mode 100644 index 53d6d80ed..000000000 --- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/AdaptxLiaison.java +++ /dev/null @@ -1,60 +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.taskdefs.optional; -import java.io.File; -import java.io.FileOutputStream; -import java.io.OutputStreamWriter; -import org.apache.tools.ant.BuildException; -import org.apache.tools.ant.taskdefs.XSLTLiaison; -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 setOutputtype( String type ) - throws Exception - { - if( !type.equals( "xml" ) ) - throw new BuildException( "Unsupported output type: " + type ); - } - - public void setStylesheet( File fileName ) - throws Exception - { - XSLTReader xslReader = new XSLTReader(); - xslSheet = xslReader.read( fileName.getAbsolutePath() ); - } - - public void addParam( String name, String expression ) - { - processor.setProperty( name, expression ); - } - - 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 ); - } - -}//-- AdaptxLiaison diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/Test.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/Test.java deleted file mode 100644 index 3f248fdc4..000000000 --- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/Test.java +++ /dev/null @@ -1,84 +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.taskdefs.optional; -import java.util.Vector; -import org.apache.tools.ant.BuildException; -import org.apache.tools.ant.taskdefs.Java; - -/** - * @author Peter Donald - */ -public class Test - extends Java -{ - - protected Vector m_tests = new Vector(); - - public Test() - { - setClassname( "org.apache.testlet.engine.TextTestEngine" ); - } - - public void setForceShowTrace( final boolean forceShowTrace ) - { - createArg().setValue( "-f=" + forceShowTrace ); - } - - public void setShowBanner( final String showBanner ) - { - createArg().setValue( "-b=" + showBanner ); - } - - public void setShowSuccess( final boolean showSuccess ) - { - createArg().setValue( "-s=" + showSuccess ); - } - - public void setShowTrace( final boolean showTrace ) - { - createArg().setValue( "-t=" + showTrace ); - } - - public TestletEntry createTestlet() - { - final TestletEntry entry = new TestletEntry(); - m_tests.addElement( entry ); - return entry; - } - - public void execute() - throws BuildException - { - - final int size = m_tests.size(); - - for( int i = 0; i < size; i++ ) - { - createArg().setValue( m_tests.elementAt( i ).toString() ); - } - - super.execute(); - } - - protected final static class TestletEntry - { - - protected String m_testname = ""; - - public void addText( final String testname ) - { - m_testname += testname; - } - - public String toString() - { - return m_testname; - } - } -} - diff --git a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/XslpLiaison.java b/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/XslpLiaison.java deleted file mode 100644 index 7ae71c808..000000000 --- a/proposal/myrmidon/src/main/org/apache/tools/ant/taskdefs/optional/XslpLiaison.java +++ /dev/null @@ -1,71 +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.taskdefs.optional; -import com.kvisco.xsl.XSLProcessor; -import com.kvisco.xsl.XSLReader; -import com.kvisco.xsl.XSLStylesheet; -import java.io.File; -import java.io.FileOutputStream; -import java.io.OutputStreamWriter; -import org.apache.tools.ant.BuildException; -import org.apache.tools.ant.taskdefs.XSLTLiaison; - - - -/** - * Concrete liaison for XSLP - * - * @author Sam Ruby - * @author Stephane Bailliez - */ -public class XslpLiaison implements XSLTLiaison -{ - - protected XSLProcessor processor; - protected XSLStylesheet xslSheet; - - public XslpLiaison() - { - processor = new XSLProcessor(); - // uh ?! I'm forced to do that otherwise a setProperty crashes with NPE ! - // I don't understand why the property map is static though... - // how can we do multithreading w/ multiple identical parameters ? - processor.getProperty( "dummy-to-init-properties-map" ); - } - - public void setOutputtype( String type ) - throws Exception - { - if( !type.equals( "xml" ) ) - throw new BuildException( "Unsupported output type: " + type ); - } - - public void setStylesheet( File fileName ) - throws Exception - { - XSLReader xslReader = new XSLReader(); - // a file:/// + getAbsolutePath() does not work here - // it is really the pathname - xslSheet = xslReader.read( fileName.getAbsolutePath() ); - } - - public void addParam( String name, String expression ) - { - processor.setProperty( name, expression ); - } - - public void transform( File infile, File outfile ) - throws Exception - { - FileOutputStream fos = new FileOutputStream( outfile ); - // XSLP does not support encoding...we're in hot water. - OutputStreamWriter out = new OutputStreamWriter( fos, "UTF8" ); - processor.process( infile.getAbsolutePath(), xslSheet, out ); - } - -}//-- XSLPLiaison diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/AdaptxLiaison.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/AdaptxLiaison.java deleted file mode 100644 index 53d6d80ed..000000000 --- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/AdaptxLiaison.java +++ /dev/null @@ -1,60 +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.taskdefs.optional; -import java.io.File; -import java.io.FileOutputStream; -import java.io.OutputStreamWriter; -import org.apache.tools.ant.BuildException; -import org.apache.tools.ant.taskdefs.XSLTLiaison; -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 setOutputtype( String type ) - throws Exception - { - if( !type.equals( "xml" ) ) - throw new BuildException( "Unsupported output type: " + type ); - } - - public void setStylesheet( File fileName ) - throws Exception - { - XSLTReader xslReader = new XSLTReader(); - xslSheet = xslReader.read( fileName.getAbsolutePath() ); - } - - public void addParam( String name, String expression ) - { - processor.setProperty( name, expression ); - } - - 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 ); - } - -}//-- AdaptxLiaison diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/Test.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/Test.java deleted file mode 100644 index 3f248fdc4..000000000 --- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/Test.java +++ /dev/null @@ -1,84 +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.taskdefs.optional; -import java.util.Vector; -import org.apache.tools.ant.BuildException; -import org.apache.tools.ant.taskdefs.Java; - -/** - * @author Peter Donald - */ -public class Test - extends Java -{ - - protected Vector m_tests = new Vector(); - - public Test() - { - setClassname( "org.apache.testlet.engine.TextTestEngine" ); - } - - public void setForceShowTrace( final boolean forceShowTrace ) - { - createArg().setValue( "-f=" + forceShowTrace ); - } - - public void setShowBanner( final String showBanner ) - { - createArg().setValue( "-b=" + showBanner ); - } - - public void setShowSuccess( final boolean showSuccess ) - { - createArg().setValue( "-s=" + showSuccess ); - } - - public void setShowTrace( final boolean showTrace ) - { - createArg().setValue( "-t=" + showTrace ); - } - - public TestletEntry createTestlet() - { - final TestletEntry entry = new TestletEntry(); - m_tests.addElement( entry ); - return entry; - } - - public void execute() - throws BuildException - { - - final int size = m_tests.size(); - - for( int i = 0; i < size; i++ ) - { - createArg().setValue( m_tests.elementAt( i ).toString() ); - } - - super.execute(); - } - - protected final static class TestletEntry - { - - protected String m_testname = ""; - - public void addText( final String testname ) - { - m_testname += testname; - } - - public String toString() - { - return m_testname; - } - } -} - diff --git a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/XslpLiaison.java b/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/XslpLiaison.java deleted file mode 100644 index 7ae71c808..000000000 --- a/proposal/myrmidon/src/todo/org/apache/tools/ant/taskdefs/optional/XslpLiaison.java +++ /dev/null @@ -1,71 +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.taskdefs.optional; -import com.kvisco.xsl.XSLProcessor; -import com.kvisco.xsl.XSLReader; -import com.kvisco.xsl.XSLStylesheet; -import java.io.File; -import java.io.FileOutputStream; -import java.io.OutputStreamWriter; -import org.apache.tools.ant.BuildException; -import org.apache.tools.ant.taskdefs.XSLTLiaison; - - - -/** - * Concrete liaison for XSLP - * - * @author Sam Ruby - * @author Stephane Bailliez - */ -public class XslpLiaison implements XSLTLiaison -{ - - protected XSLProcessor processor; - protected XSLStylesheet xslSheet; - - public XslpLiaison() - { - processor = new XSLProcessor(); - // uh ?! I'm forced to do that otherwise a setProperty crashes with NPE ! - // I don't understand why the property map is static though... - // how can we do multithreading w/ multiple identical parameters ? - processor.getProperty( "dummy-to-init-properties-map" ); - } - - public void setOutputtype( String type ) - throws Exception - { - if( !type.equals( "xml" ) ) - throw new BuildException( "Unsupported output type: " + type ); - } - - public void setStylesheet( File fileName ) - throws Exception - { - XSLReader xslReader = new XSLReader(); - // a file:/// + getAbsolutePath() does not work here - // it is really the pathname - xslSheet = xslReader.read( fileName.getAbsolutePath() ); - } - - public void addParam( String name, String expression ) - { - processor.setProperty( name, expression ); - } - - public void transform( File infile, File outfile ) - throws Exception - { - FileOutputStream fos = new FileOutputStream( outfile ); - // XSLP does not support encoding...we're in hot water. - OutputStreamWriter out = new OutputStreamWriter( fos, "UTF8" ); - processor.process( infile.getAbsolutePath(), xslSheet, out ); - } - -}//-- XSLPLiaison