diff --git a/BuildFileTest.java b/BuildFileTest.java deleted file mode 100644 index 03a013c..0000000 --- a/BuildFileTest.java +++ /dev/null @@ -1,524 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -package org.apache.tools.ant; - -import junit.framework.TestCase; -import java.io.File; -import java.io.PrintStream; -import java.net.URL; - -/** - * A BuildFileTest is a TestCase which executes targets from an Ant buildfile - * for testing. - * - * This class provides a number of utility methods for particular build file - * tests which extend this class. - * - */ -public abstract class BuildFileTest extends TestCase { - - protected Project project; - - private StringBuffer logBuffer; - private StringBuffer fullLogBuffer; - private StringBuffer outBuffer; - private StringBuffer errBuffer; - private BuildException buildException; - - /** - * Default constructor for the BuildFileTest object. - */ - public BuildFileTest() { - super(); - } - - /** - * Constructor for the BuildFileTest object. - * - * @param name string to pass up to TestCase constructor - */ - public BuildFileTest(String name) { - super(name); - } - - /** - * Automatically calls the target called "tearDown" - * from the build file tested if it exits. - * - * This allows to use Ant tasks directly in the build file - * to clean up after each test. Note that no "setUp" target - * is automatically called, since it's trivial to have a - * test target depend on it. - */ - protected void tearDown() throws Exception { - final String tearDown = "tearDown"; - if (project.getTargets().containsKey(tearDown)) { - project.executeTarget(tearDown); - } - } - - /** - * run a target, expect for any build exception - * - * @param target target to run - * @param cause information string to reader of report - */ - public void expectBuildException(String target, String cause) { - expectSpecificBuildException(target, cause, null); - } - - /** - * Assert that only the given message has been logged with a - * priority <= INFO when running the given target. - */ - public void expectLog(String target, String log) { - executeTarget(target); - String realLog = getLog(); - assertEquals(log, realLog); - } - - /** - * Assert that the given substring is in the log messages. - */ - public void assertLogContaining(String substring) { - String realLog = getLog(); - assertTrue("expecting log to contain \"" + substring + "\" log was \"" - + realLog + "\"", - realLog.indexOf(substring) >= 0); - } - - /** - * Assert that the given substring is in the output messages. - * @since Ant1.7 - */ - public void assertOutputContaining(String substring) { - String realOutput = getOutput(); - assertTrue("expecting output to contain \"" + substring - + "\" output was \"" + realOutput + "\"", - realOutput.indexOf(substring) >= 0); - } - - /** - * Assert that the given message has been logged with a priority - * <= INFO when running the given target. - */ - public void expectLogContaining(String target, String log) { - executeTarget(target); - assertLogContaining(log); - } - - /** - * Gets the log the BuildFileTest object. - * Only valid if configureProject() has been called. - * - * @pre logBuffer!=null - * @return The log value - */ - public String getLog() { - return logBuffer.toString(); - } - - /** - * Assert that the given message has been logged with a priority - * >= VERBOSE when running the given target. - */ - public void expectDebuglog(String target, String log) { - executeTarget(target); - String realLog = getFullLog(); - assertEquals(log, realLog); - } - - /** - * Assert that the given substring is in the log messages. - */ - public void assertDebuglogContaining(String substring) { - String realLog = getFullLog(); - assertTrue("expecting debug log to contain \"" + substring - + "\" log was \"" - + realLog + "\"", - realLog.indexOf(substring) >= 0); - } - - /** - * Gets the log the BuildFileTest object. - * - * Only valid if configureProject() has been called. - * - * @pre fullLogBuffer!=null - * @return The log value - */ - public String getFullLog() { - return fullLogBuffer.toString(); - } - - /** - * execute the target, verify output matches expectations - * - * @param target target to execute - * @param output output to look for - */ - public void expectOutput(String target, String output) { - executeTarget(target); - String realOutput = getOutput(); - assertEquals(output, realOutput.trim()); - } - - /** - * Executes the target, verify output matches expectations - * and that we got the named error at the end - * - * @param target target to execute - * @param output output to look for - * @param error Description of Parameter - */ - public void expectOutputAndError(String target, String output, String error) { - executeTarget(target); - String realOutput = getOutput(); - assertEquals(output, realOutput); - String realError = getError(); - assertEquals(error, realError); - } - - public String getOutput() { - return cleanBuffer(outBuffer); - } - - public String getError() { - return cleanBuffer(errBuffer); - } - - public BuildException getBuildException() { - return buildException; - } - - private String cleanBuffer(StringBuffer buffer) { - StringBuffer cleanedBuffer = new StringBuffer(); - boolean cr = false; - for (int i = 0; i < buffer.length(); i++) { - char ch = buffer.charAt(i); - if (ch == '\r') { - cr = true; - continue; - } - - if (!cr) { - cleanedBuffer.append(ch); - } else { - cleanedBuffer.append(ch); - } - } - return cleanedBuffer.toString(); - } - - /** - * Sets up to run the named project - * - * @param filename name of project file to run - */ - public void configureProject(String filename) throws BuildException { - configureProject(filename, Project.MSG_DEBUG); - } - - /** - * Sets up to run the named project - * - * @param filename name of project file to run - */ - public void configureProject(String filename, int logLevel) - throws BuildException { - logBuffer = new StringBuffer(); - fullLogBuffer = new StringBuffer(); - project = new Project(); - project.init(); - File antFile = new File(System.getProperty("root"), filename); - project.setUserProperty("ant.file" , antFile.getAbsolutePath()); - project.addBuildListener(new AntTestListener(logLevel)); - ProjectHelper.configureProject(project, antFile); - } - - /** - * Executes a target we have set up - * - * @pre configureProject has been called - * @param targetName target to run - */ - public void executeTarget(String targetName) { - PrintStream sysOut = System.out; - PrintStream sysErr = System.err; - try { - sysOut.flush(); - sysErr.flush(); - outBuffer = new StringBuffer(); - PrintStream out = new PrintStream(new AntOutputStream(outBuffer)); - System.setOut(out); - errBuffer = new StringBuffer(); - PrintStream err = new PrintStream(new AntOutputStream(errBuffer)); - System.setErr(err); - logBuffer = new StringBuffer(); - fullLogBuffer = new StringBuffer(); - buildException = null; - project.executeTarget(targetName); - } finally { - System.setOut(sysOut); - System.setErr(sysErr); - } - - } - - /** - * Get the project which has been configured for a test. - * - * @return the Project instance for this test. - */ - public Project getProject() { - return project; - } - - /** - * Gets the directory of the project. - * - * @return the base dir of the project - */ - public File getProjectDir() { - return project.getBaseDir(); - } - - /** - * Runs a target, wait for a build exception. - * - * @param target target to run - * @param cause information string to reader of report - * @param msg the message value of the build exception we are waiting - * for set to null for any build exception to be valid - */ - public void expectSpecificBuildException(String target, String cause, String msg) { - try { - executeTarget(target); - } catch (org.apache.tools.ant.BuildException ex) { - buildException = ex; - if ((null != msg) && (!ex.getMessage().equals(msg))) { - fail("Should throw BuildException because '" + cause - + "' with message '" + msg - + "' (actual message '" + ex.getMessage() + "' instead)"); - } - return; - } - fail("Should throw BuildException because: " + cause); - } - - /** - * run a target, expect an exception string - * containing the substring we look for (case sensitive match) - * - * @param target target to run - * @param cause information string to reader of report - * @param contains substring of the build exception to look for - */ - public void expectBuildExceptionContaining(String target, String cause, String contains) { - try { - executeTarget(target); - } catch (org.apache.tools.ant.BuildException ex) { - buildException = ex; - if ((null != contains) && (ex.getMessage().indexOf(contains) == -1)) { - fail("Should throw BuildException because '" + cause + "' with message containing '" + contains + "' (actual message '" + ex.getMessage() + "' instead)"); - } - return; - } - fail("Should throw BuildException because: " + cause); - } - - /** - * call a target, verify property is as expected - * - * @param target build file target - * @param property property name - * @param value expected value - */ - public void expectPropertySet(String target, String property, String value) { - executeTarget(target); - assertPropertyEquals(property, value); - } - - /** - * assert that a property equals a value; comparison is case sensitive. - * - * @param property property name - * @param value expected value - */ - public void assertPropertyEquals(String property, String value) { - String result = project.getProperty(property); - assertEquals("property " + property,value,result); - } - - /** - * assert that a property equals "true". - * - * @param property property name - */ - public void assertPropertySet(String property) { - assertPropertyEquals(property, "true"); - } - - /** - * assert that a property is null. - * - * @param property property name - */ - public void assertPropertyUnset(String property) { - assertPropertyEquals(property, null); - } - - /** - * call a target, verify named property is "true". - * - * @param target build file target - * @param property property name - */ - public void expectPropertySet(String target, String property) { - expectPropertySet(target, property, "true"); - } - - /** - * Call a target, verify property is null. - * - * @param target build file target - * @param property property name - */ - public void expectPropertyUnset(String target, String property) { - expectPropertySet(target, property, null); - } - - /** - * Retrieve a resource from the caller classloader to avoid - * assuming a vm working directory. The resource path must be - * relative to the package name or absolute from the root path. - * - * @param resource the resource to retrieve its url. - * @throws junit.framework.AssertionFailedError if the resource is not found. - */ - public URL getResource(String resource){ - URL url = getClass().getResource(resource); - assertNotNull("Could not find resource :" + resource, url); - return url; - } - - /** - * an output stream which saves stuff to our buffer. - */ - private static class AntOutputStream extends java.io.OutputStream { - private StringBuffer buffer; - - public AntOutputStream( StringBuffer buffer ) { - this.buffer = buffer; - } - - public void write(int b) { - buffer.append((char)b); - } - } - - /** - * Our own personal build listener. - */ - private class AntTestListener implements BuildListener { - private int logLevel; - - /** - * Constructs a test listener which will ignore log events - * above the given level. - */ - public AntTestListener(int logLevel) { - this.logLevel = logLevel; - } - - /** - * Fired before any targets are started. - */ - public void buildStarted(BuildEvent event) { - } - - /** - * Fired after the last target has finished. This event - * will still be thrown if an error occurred during the build. - * - * @see BuildEvent#getException() - */ - public void buildFinished(BuildEvent event) { - } - - /** - * Fired when a target is started. - * - * @see BuildEvent#getTarget() - */ - public void targetStarted(BuildEvent event) { - //System.out.println("targetStarted " + event.getTarget().getName()); - } - - /** - * Fired when a target has finished. This event will - * still be thrown if an error occurred during the build. - * - * @see BuildEvent#getException() - */ - public void targetFinished(BuildEvent event) { - //System.out.println("targetFinished " + event.getTarget().getName()); - } - - /** - * Fired when a task is started. - * - * @see BuildEvent#getTask() - */ - public void taskStarted(BuildEvent event) { - //System.out.println("taskStarted " + event.getTask().getTaskName()); - } - - /** - * Fired when a task has finished. This event will still - * be throw if an error occurred during the build. - * - * @see BuildEvent#getException() - */ - public void taskFinished(BuildEvent event) { - //System.out.println("taskFinished " + event.getTask().getTaskName()); - } - - /** - * Fired whenever a message is logged. - * - * @see BuildEvent#getMessage() - * @see BuildEvent#getPriority() - */ - public void messageLogged(BuildEvent event) { - if (event.getPriority() > logLevel) { - // ignore event - return; - } - - if (event.getPriority() == Project.MSG_INFO || - event.getPriority() == Project.MSG_WARN || - event.getPriority() == Project.MSG_ERR) { - logBuffer.append(event.getMessage()); - } - fullLogBuffer.append(event.getMessage()); - } - } - -} diff --git a/LICENSE-2.0.txt b/LICENSE-2.0.txt new file mode 100644 index 0000000..81fbaf6 --- /dev/null +++ b/LICENSE-2.0.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/ant-contrib-1.0b2-enable-for-task.patch b/ant-contrib-1.0b2-enable-for-task.patch deleted file mode 100644 index 34d9612..0000000 --- a/ant-contrib-1.0b2-enable-for-task.patch +++ /dev/null @@ -1,11 +0,0 @@ -Index: ant-contrib-1.0b2/ant-contrib/src/net/sf/antcontrib/antcontrib.properties -=================================================================== ---- ant-contrib-1.0b2.orig/ant-contrib/src/net/sf/antcontrib/antcontrib.properties 2005-02-04 01:04:10.000000000 +0100 -+++ ant-contrib-1.0b2/ant-contrib/src/net/sf/antcontrib/antcontrib.properties 2010-10-08 11:37:40.608761967 +0200 -@@ -35,5 +35,5 @@ - remoteant=net.sf.antcontrib.antserver.client.ClientTask - - # Tasks Requiring Ant 1.6 or higher --#for=net.sf.antcontrib.logic.For -+for=net.sf.antcontrib.logic.For - math=net.sf.antcontrib.math.MathTask diff --git a/ant-contrib-1.0b2-src.tar.bz2 b/ant-contrib-1.0b2-src.tar.bz2 deleted file mode 100644 index 077898c..0000000 --- a/ant-contrib-1.0b2-src.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:29bdd00ee0df1d7b24e55b08bfff5641edf3f805e45a278641d42c0bf0ce9269 -size 118216 diff --git a/ant-contrib-1.0b3-src.tar.gz b/ant-contrib-1.0b3-src.tar.gz new file mode 100644 index 0000000..899119d --- /dev/null +++ b/ant-contrib-1.0b3-src.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6f3b3afb9c84aef59be1d35410b58c4906fc12f49a2a930c30e14cc4f084b5d7 +size 3327007 diff --git a/ant-contrib-1.0b3.pom b/ant-contrib-1.0b3.pom new file mode 100644 index 0000000..ff77b9a --- /dev/null +++ b/ant-contrib-1.0b3.pom @@ -0,0 +1,25 @@ + + 4.0.0 + ant-contrib + ant-contrib + jar + Ant-Contrib Tasks + 1.0b3 + http://ant-contrib.sourceforge.net + + + http://ant-contrib.sourceforge.net/tasks/LICENSE.txt + + + + https://svn.sourceforge.net/svnroot/ant-contrib ant-contrib + + A collection of tasks (and at one point maybe types and other tools) for Apache Ant + + + ant + ant + 1.5 + + + diff --git a/ant-contrib-BuildFileTest_java.patch b/ant-contrib-BuildFileTest_java.patch deleted file mode 100644 index 941c57d..0000000 --- a/ant-contrib-BuildFileTest_java.patch +++ /dev/null @@ -1,18 +0,0 @@ ---- ant-contrib/build.xml -+++ ant-contrib/build.xml -@@ -385,12 +385,9 @@ - - - -- -- -- -- -- -+ -+ - - - - -- -+ - - - - -- -@@ -409,7 +409,7 @@ - - -+ value="1.7.0" /> - - + +- +- ++ ++ + + + +@@ -124,11 +124,11 @@ + + + +- ++ + + + +- ++ + + + diff --git a/ant-contrib-build_xml.patch b/ant-contrib-build_xml.patch deleted file mode 100644 index df390da..0000000 --- a/ant-contrib-build_xml.patch +++ /dev/null @@ -1,50 +0,0 @@ ---- ant-contrib/build.xml -+++ ant-contrib/build.xml -@@ -348,9 +348,10 @@ - - - -- -+ - - - -@@ -373,7 +374,7 @@ - - - -- -+ - - - -@@ -416,10 +417,12 @@ - - - -+ - - -@@ -444,10 +447,10 @@ - - - -- -+ - - -- -+ - - - diff --git a/ant-contrib-pom.patch b/ant-contrib-pom.patch new file mode 100644 index 0000000..44d1bab --- /dev/null +++ b/ant-contrib-pom.patch @@ -0,0 +1,13 @@ +diff --git a/ant-contrib-1.0b3.pom b/ant-contrib-1.0b3.pom +index 59dea4a..ca99233 100644 +--- a/ant-contrib-1.0b3.pom ++++ b/ant-contrib-1.0b3.pom +@@ -17,7 +17,7 @@ + A collection of tasks (and at one point maybe types and other tools) for Apache Ant + + +- ant ++ org.apache.ant + ant + 1.5 + diff --git a/ant-contrib.changes b/ant-contrib.changes index 97cfa88..b19dd89 100644 --- a/ant-contrib.changes +++ b/ant-contrib.changes @@ -1,3 +1,22 @@ +------------------------------------------------------------------- +Wed Nov 6 14:17:45 UTC 2013 - mvyskocil@suse.com + +- upgrade to 1.0b3 + * no upstream changelog available +- removed patches: + * ant-contrib-1.0b2-enable-for-task.patch + there is no for task in beta3 + * ant-contrib-ant-1.7.0.patch + no longer needed + * ant-contrib-build_xml.patch + fixed upstream +- added patches: + * ant-contrib-antservertest.patch + * ant-contrib-pom.patch + * local-ivy.patch +- add pom file +- add ant.d configuration + ------------------------------------------------------------------- Mon Sep 9 11:04:08 UTC 2013 - tchvatal@suse.com diff --git a/ant-contrib.spec b/ant-contrib.spec index d23a1db..0f68d93 100644 --- a/ant-contrib.spec +++ b/ant-contrib.spec @@ -14,38 +14,37 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # -# icecream 0 -%define with_junit 0 -%define section free -%define ant_minimal_version 1.7.1 +Name: ant-contrib +Version: 1.0b3 +Release: 0 Summary: Collection of tasks for Ant License: Apache-2.0 Group: Development/Libraries/Java - -Name: ant-contrib -Version: 1.0b2 -Release: 0 Url: http://ant-contrib.sourceforge.net/ -Source0: http://prdownloads.sourceforge.net/ant-contrib/ant-contrib-1.0b2-src.tar.bz2 -#Is from apache-ant-1.7.0-src.zip -Source1: BuildFileTest.java -Patch0: ant-contrib-build_xml.patch -Patch1: ant-contrib-ant-1.7.0.patch -Patch2: ant-contrib-BuildFileTest_java.patch -#PATCH-FIX-OPENSUSE: bnc#644661 -Patch3: ant-contrib-1.0b2-enable-for-task.patch -BuildRequires: ant >= %{ant_minimal_version} +Source0: http://prdownloads.sourceforge.net/ant-contrib/ant-contrib-%{version}-src.tar.gz +Source1: http://mirrors.ibiblio.org/pub/mirrors/maven2/%{name}/%{name}/1.0b3/%{name}-1.0b3.pom +# ASL 2.0 Licence text +# Upstream bug at https://sourceforge.net/tracker/?func=detail&aid=3590371&group_id=36177&atid=416920 +Source2: http://www.apache.org/licenses/LICENSE-2.0.txt +Patch0: local-ivy.patch +Patch1: ant-contrib-antservertest.patch +Patch2: ant-contrib-pom.patch + +BuildRequires: ant >= 1.7.1 +BuildRequires: ant-junit >= 1.7.1 +BuildRequires: apache-ivy BuildRequires: bcel >= 5.1 -BuildRequires: java-1_5_0-gcj-compat-devel +BuildRequires: commons-httpclient +BuildRequires: commons-logging +BuildRequires: java-devel BuildRequires: javapackages-tools -%if %{with_junit} -BuildRequires: ant-junit >= %{ant_minimal_version} -Requires: junit >= 3.8.1 -%endif +BuildRequires: xerces-j2 + %requires_eq ant -Requires: bcel >= 5.1 +Requires: junit >= 3.8.1 +Requires: xerces-j2 BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -54,62 +53,69 @@ The Ant-Contrib project is a collection of tasks (and at one point maybe types and other tools) for Apache Ant. %package manual -Summary: Collection of tasks for Ant -Group: Development/Libraries/Java +Summary: Manual for %{name} +Group: Documentation/Other %description manual -The Ant-Contrib project is a collection of tasks (and at one point -maybe types and other tools) for Apache Ant. +Documentation for %{name} tasks. + +%package javadoc +Summary: Javadoc for %{name} +Group: Documentation/HTML +Requires: jpackage-utils + +%description javadoc +Api documentation for %{name}. %prep -%setup -q -c -n %{name}-%{version} -for j in $(find . -name "*.jar"); do - mv $j $j.no -done +%setup -q -n %{name} +cp %{SOURCE1} %{name}-1.0b3.pom +cp %{SOURCE2} LICENSE-2.0.txt +%patch0 -p0 +%patch1 -p0 +%patch2 -p1 -mv ant-contrib/manual/LICENSE.txt . +find . -name '*.jar' -or -name '*.class' -exec rm -rf {} + -# TODO: this test fails -#rm ant-contrib/test/src/net/sf/antcontrib/logic/TryCatchTaskTest.java -%patch0 -b .sav -%patch1 -b .sav1 -%patch2 -b .sav2 -%patch3 -p1 -b .sav2 +sed -i "s|xercesImpl|xerces-j2|g" ivy.xml ||: +# needs porting to latest ivy +rm -fr src/java/net/sf/antcontrib/net/URLImportTask.java %build -pushd ant-contrib/lib -ln -s $(build-classpath bcel) bcel-5.1.jar -popd -pushd ant-contrib/test/lib -ln -s $(build-classpath junit) junit-3.8.2 -popd -mkdir -p ant-contrib/build/ant -cp %{SOURCE1} ant-contrib/build/ant/ -cd ant-contrib -%if %defined suse_version -export CLASSPATH=$(build-classpath bcel junit) -%endif -ant \ - jar \ -%if %{with_junit} - test -%endif +ant dist %install # jars -install -Dpm 644 %{name}/build/lib/%{name}.jar \ - $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar -ln -s %{name}-%{version}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar -# manual -install -dm 755 $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} +install -Dpm 644 target/%{name}.jar %{buildroot}%{_javadir}/ant/%{name}.jar + +# javadoc +install -dm 755 %{buildroot}%{_javadocdir}/%{name} +cp -pr target/docs/api/* %{buildroot}%{_javadocdir}/%{name} + +mkdir -p %{buildroot}%{_sysconfdir}/ant.d +echo "ant/ant-contrib" > %{buildroot}%{_sysconfdir}/ant.d/ant-contrib + +install -d -m 755 %{buildroot}%{_mavenpomdir} +install -pm 644 %{name}-1.0b3.pom %{buildroot}/%{_mavenpomdir}/JPP.ant-%{name}.pom + +echo "call add_maven_depmap JPP.ant-%{name}.pom ant/%{name}.jar" +%add_maven_depmap JPP.ant-%{name}.pom ant/%{name}.jar %files %defattr(0644,root,root,0755) -%doc LICENSE.txt -%{_javadir}/*.jar +%doc target/docs/LICENSE.txt LICENSE-2.0.txt +%config %{_sysconfdir}/ant.d/%{name} +%{_javadir}/ant/%{name}.jar +%{_mavenpomdir}/JPP.ant-%{name}.pom +%{_mavendepmapfragdir}/%{name} %files manual %defattr(-,root,root,-) -%doc %{name}/manual +%doc target/docs/manual/tasks/* + +%files javadoc +%defattr(-,root,root,-) +%doc target/docs/LICENSE.txt LICENSE-2.0.txt +%doc %{_javadocdir}/%{name} %changelog diff --git a/local-ivy.patch b/local-ivy.patch new file mode 100644 index 0000000..114a7ac --- /dev/null +++ b/local-ivy.patch @@ -0,0 +1,43 @@ +--- build.xml.sav 2006-11-02 18:44:02.000000000 +0200 ++++ build.xml 2011-12-15 13:36:38.630460824 +0200 +@@ -20,22 +20,7 @@ + + + +- +- +- +- +- +- +- +- +- +- +- +- +- +- ++ + + + +--- ivy-conf.xml.sav 2006-10-28 14:57:58.000000000 +0300 ++++ ivy-conf.xml 2011-12-15 14:35:15.155840710 +0200 +@@ -5,11 +5,11 @@ + + + +- +- ++ ++ + + +- ++ + + +