[packages/ant-contrib] Up to 1.0b3

arekm arekm at pld-linux.org
Sat Nov 28 18:25:03 CET 2026


commit 0b546cc29b3b1f5eafa960afb2ba9ace25c68d74
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Fri Nov 27 17:36:06 2026 +0100

    Up to 1.0b3

 ant-contrib.spec    |  69 +++++-----
 antservertest.patch |  27 ----
 build_xml.patch     | 368 +++++++++++++++++++++++++++++++++++++++-------------
 3 files changed, 317 insertions(+), 147 deletions(-)
---
diff --git a/ant-contrib.spec b/ant-contrib.spec
index 248f66d..fcb3ca0 100644
--- a/ant-contrib.spec
+++ b/ant-contrib.spec
@@ -1,9 +1,12 @@
+%{?use_default_jdk:%use_default_jdk 8}
+
 #
 # Conditional build:
 %bcond_without	javadoc		# don't build javadoc
+%bcond_with	tests		# unit tests (upstream suite fails: bcel 5.2, relentless/outofdate missing from antlib.xml)
 
-%define		subver	b2
-%define		rel		3
+%define		subver	b3
+%define		rel		1
 Summary:	Collection of tasks for Ant
 Name:		ant-contrib
 Version:	1.0
@@ -11,21 +14,28 @@ Release:	0.%{subver}.%{rel}
 License:	ASL 2.0
 Group:		Development/Libraries
 URL:		http://ant-contrib.sourceforge.net/
-Source0:	http://downloads.sourceforge.net/ant-contrib/%{name}-%{version}%{subver}-src.tar.gz
-# Source0-md5:	66511dddcef3dc9798db33dbaca0d3de
+Source0:	https://downloads.sourceforge.net/project/ant-contrib/ant-contrib/%{version}%{subver}/%{name}-%{version}%{subver}-src.tar.gz
+# Source0-md5:	f703cf9eb3e7e908e7d198afe2b92aac
 Patch0:		build_xml.patch
-Patch1:		antservertest.patch
 BuildRequires:	ant >= 1.6
 BuildRequires:	ant-junit >= 1.6.2
 BuildRequires:	java-bcel >= 5.0
+BuildRequires:	java-commons-codec
+BuildRequires:	java-commons-httpclient
+BuildRequires:	java-commons-logging
 BuildRequires:	java-junit >= 3.8.0
-BuildRequires:	java-xerces
-BuildRequires:	jdk >= 1.4.2
+Requires:	jre
+%buildrequires_jdk
 BuildRequires:	jpackage-utils >= 1.5
 BuildRequires:	rpmbuild(macros) >= 1.553
 Requires:	ant >= 1.6.2
 Requires:	java(jaxp_parser_impl)
+Requires:	java-bcel >= 5.0
+Requires:	java-commons-codec
+Requires:	java-commons-httpclient
+Requires:	java-commons-logging
 Requires:	java-junit >= 3.8.0
+Requires:	jre
 BuildArch:	noarch
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -42,43 +52,40 @@ API documentation for Ant contrib tasks.
 
 %prep
 %setup -q -n %{name}
-%patch -P0
-%patch -P1
-%undos manual/tasks/foreach.html manual/tasks/for.html
-
-%{__rm} -r test/src/net/sf/antcontrib/antclipse
+%patch -P0 -p1
 
-install -d test/lib
+# bundled jars, replaced by system ones below
+%{__rm} -r lib/*/jars
 
 %build
-junit_jar=$(find-jar junit)
-xerces_jar=$(find-jar xercesImpl)
-ln -sf $junit_jar test/lib
-ln -sf $xerces_jar lib
+for j in bcel commons-httpclient commons-logging commons-codec; do
+	ln -s $(find-jar $j) lib/$j.jar
+done
+ln -s %{_javadir}/ant.jar lib/ant.jar
+ln -s %{_javadir}/ant/ant-junit.jar lib/ant-junit.jar
+ln -s $(find-jar junit) lib/junit.jar
 
-export OPT_JAR_LIST="ant/ant-junit junit"
-CLASSPATH=build/lib/ant-contrib-%{version}.jar:$CLASSPATH
 %ant jar %{?with_javadoc:docs} \
-	-Djavac.target=1.4 \
-	-Djavac.source=1.4 \
-	-Dversion=%{version} \
-	-Dbcel.jar=file://%{_javadir}/bcel.jar
+	-Dproject.version=%{version}%{subver}
+
+%if %{with tests}
+%ant test
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
-# jars
 install -d $RPM_BUILD_ROOT%{_javadir}/ant
-cp -p build/lib/%{name}.jar $RPM_BUILD_ROOT%{_javadir}/ant/%{name}.jar
+cp -p target/%{name}.jar $RPM_BUILD_ROOT%{_javadir}/ant/%{name}.jar
 
-# javadoc
+%if %{with javadoc}
 install -d $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
-cp -pr build/docs/api/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
+cp -pr target/docs/api/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
 ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}
-rm -rf build/docs/api
+%endif
 
 install -d $RPM_BUILD_ROOT%{_sysconfdir}/ant.d
-echo "ant/ant-contrib" > $RPM_BUILD_ROOT%{_sysconfdir}/ant.d/ant-contrib
+echo "ant/ant-contrib bcel commons-codec commons-httpclient commons-logging" > $RPM_BUILD_ROOT%{_sysconfdir}/ant.d/ant-contrib
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -88,8 +95,8 @@ ln -nfs %{name}-%{version} %{_javadocdir}/%{name}
 
 %files
 %defattr(644,root,root,755)
-%doc build/docs/LICENSE.txt
-%doc build/docs/tasks/*
+%doc docs/LICENSE.txt
+%doc docs/manual/*
 %{_sysconfdir}/ant.d/ant-contrib
 %{_javadir}/ant/*.jar
 
diff --git a/antservertest.patch b/antservertest.patch
deleted file mode 100644
index a486712..0000000
--- a/antservertest.patch
+++ /dev/null
@@ -1,27 +0,0 @@
---- test/resources/antserver/antservertest.xml.orig	2005-02-03 19:04:11.000000000 -0500
-+++ test/resources/antserver/antservertest.xml	2006-06-01 11:57:05.000000000 -0400
-@@ -3,8 +3,8 @@
- 
-     <taskdef resource="net/sf/antcontrib/antcontrib.properties"/>
- 
--    <property name="server.host" value="localhost" />
--    <property name="server.port" value="17000" />
-+    <property name="server.host" value="127.0.0.1" />
-+    <property name="server.port" value="23456" />
- 
-     <target name="default">
-     </target>
-@@ -124,11 +124,11 @@
-                     <try>
-                         <antcall target="${test.target}" />
-                     </try>
--                    <finally>
-+                    <catch>
-                         <remoteant machine="${server.host}" port="${server.port}">
-                             <shutdown />
-                         </remoteant>
--                    </finally>
-+                    </catch>
-                 </trycatch>
-             </sequential>
-         </parallel>
diff --git a/build_xml.patch b/build_xml.patch
index d54b407..7a74e89 100644
--- a/build_xml.patch
+++ b/build_xml.patch
@@ -1,89 +1,279 @@
---- build.xml.old	2006-07-20 14:29:08.000000000 -0400
-+++ build.xml	2006-07-20 14:29:35.000000000 -0400
-@@ -53,6 +53,8 @@
-   <property name="contrib.jar" location="${lib}/${jar.name}"/>
-   <property name="jar.main.class" value="net.sf.antcontrib.AntContribVersion"/>
- 
-+  <property name="bcel.jar" value="http://www.ibiblio.org/maven/bcel/jars/bcel-5.1.jar" />
-+
-   <!--
-   ######################################################
-   ### Build the class and jar file target directories
-@@ -153,7 +155,7 @@
-     <manifest file="${lib}/MANIFEST.MF">
-         <attribute name="Built-By" value="Ant-contrib"/>
-         <attribute name="Main-Class" value="${jar.main.class}"/>
--        <attribute name="Class-Path" value="${jar.name}"/>
-+        <!--<attribute name="Class-Path" value="${jar.name}"/>-->
-         <!--attribute name="Specification-Title" value="${spec.title}"/>
-         <attribute name="Specification-Version" value="${spec.version}"/>
-         <attribute name="Specification-Vendor" value="${spec.vendor}"/-->
-@@ -349,8 +351,8 @@
-       </classpath>
-     </junit>
- 
--      <fail message="JUnit error (${junit.error}) encountered." if="junit.error" />
--      <fail message="JUnit failure (${junit.failure}) encountered." if="junit.failure" />
-+<!--      <fail message="JUnit error (${junit.error}) encountered." if="junit.error" />-->
-+<!--      <fail message="JUnit failure (${junit.failure}) encountered." if="junit.failure" />-->
-   </target>
- 
-   <target name="test-all" depends="compile-tests">
-@@ -373,7 +375,7 @@
- 
-   <target name="get-jar-deps">
-       <antcall target="get-dep-maybe">
--          <param name="dep.src" value="http://www.ibiblio.org/maven/bcel/jars/bcel-5.1.jar" />
-+		  <param name="dep.src" value="${bcel.jar}" />
-           <param name="dep.dest" value="${runlib}/bcel-5.1.jar" />
-       </antcall>
- 
-@@ -384,12 +386,18 @@
-   </target>
- 
-   <target name="build-ant-testutil" unless="ant.build.testutil.available">
--    <unzip src="${build.ant.dir}/${ant.src.file}"
--             dest="${build.ant.dir}">
--          <patternset>
--              <include name="${ant.unzip.dir}/src/testcases/org/apache/tools/ant/BuildFileTest.java"/>
--          </patternset>
--    </unzip>
-+    <gunzip src="${build.ant.dir}/${ant.src.file}"
-+			dest="${build.ant.dir}" />
-+
-+    <delete file="${build.ant.dir}/${ant.src.file}" />
-+
-+    <untar src="${build.ant.dir}/${ant.src.tar.file}"
-+           dest="${build.ant.dir}" />
-+
-+    <delete file="${build.ant.dir}/${ant.src.tar.file}" />
-+    <delete file="${build.ant.dir}/${ant.unzip.dir}/lib/xml-apis.jar" />
-+    <delete file="${build.ant.dir}/${ant.unzip.dir}/lib/xercesImpl.jar" />
-+	
- 
-     <mkdir dir="${testclasses}" />
-     <javac srcdir="${build.ant.dir}/${ant.unzip.dir}/src/testcases"
-@@ -408,9 +416,12 @@
-       <property name="build.ant.dir"
-                 value="build/ant" />
-       <property name="ant.download.version"
--                value="1.6.2" />
-+                value="1.6.5" />
-       <property name="ant.src.file"
--                value="apache-ant-${ant.download.version}-src.zip" />
-+			  value="apache-ant-${ant.download.version}-src.tar.gz" />
-+	  <property name="ant.src.tar.file"
-+			  value="apache-ant-${ant.download.version}-src.tar" />
-+
-       <property name="ant.unzip.dir"
-                 value="apache-ant-${ant.download.version}" />
- 
-@@ -418,7 +429,7 @@
- 
-       <get dest="${build.ant.dir}/${ant.src.file}"
-            usetimestamp="true"
--           src="http://archive.apache.org/dist/ant/source/${ant.src.file}">
-+		   src="file://${basedir}/../../../SOURCES/${ant.src.file}">
-       </get>
- 
-       <available property="ant.build.testutil.available"
+diff -urN a/build.xml b/build.xml
+--- a/build.xml
++++ b/build.xml
+@@ -1,11 +1,11 @@
+ <project
+ 	name="ant-contrib"
+ 	default="dist"
+-	basedir="."
+-	xmlns:ivy="antlib:fr.jayasoft.ivy.ant">
++	basedir=".">
+ 
+ 	<property file="build.properties" />
+ 	
++	<property name="lib.dir" location="lib" />
+ 	<property name="root.dir" location="." />
+ 	<property name="src.dir" location="src" />
+ 	<property name="src.java.dir" location="${src.dir}/java" />
+@@ -20,38 +20,21 @@
+ 	<property name="dist.dir" location="dist" />
+ 	<property name="target.stage.dir" location="${target.dir}/stage" />
+ 	
+-	<target name="init">
+-        <path id="ivy.lib.path">
+-            <fileset dir="lib/ivy/jars" includes="ivy-1.3.1.jar"/>
+-            <fileset dir="lib/commons-cli/jars" includes="commons-cli-1.0.jar"/>
+-            <fileset dir="lib/commons-codec/jars" includes="commons-codec-1.3.jar"/>
+-            <fileset dir="lib/commons-httpclient/jars" includes="commons-httpclient-3.0.1.jar"/>
+-            <fileset dir="lib/commons-logging/jars" includes="commons-logging-1.0.4.jar"/>
+-            <fileset dir="lib/oro/jars" includes="oro-2.0.8.jar"/>
+-        </path>
+-	    
+-        <taskdef resource="fr/jayasoft/ivy/ant/antlib.xml"
+-                 uri="antlib:fr.jayasoft.ivy.ant"
+-       	         classpathref="ivy.lib.path"/>
++	<target name="classpath">
++		<path id="runtime.classpath">
++			<fileset dir="${lib.dir}" includes="bcel.jar commons-httpclient.jar commons-logging.jar commons-codec.jar" />
++		</path>
++		<path id="compile.classpath">
++			<path refid="runtime.classpath" />
++			<fileset dir="${lib.dir}" includes="ant.jar" />
++		</path>
++		<path id="test.classpath">
++			<path refid="compile.classpath" />
++			<fileset dir="${lib.dir}" includes="junit.jar ant-junit.jar" />
++		</path>
++		<fileset id="runtime.fileset" dir="${lib.dir}" includes="bcel.jar commons-httpclient.jar commons-logging.jar commons-codec.jar" />
+ 	</target>
+-	
+-	<target name="configure" depends="init">
+-		<ivy:configure file="ivy-conf.xml" />
+-    </target>
+-		
+-	<target name="resolve" depends="configure">
+-		<ivy:resolve />
+-    </target>
+-    
+-	<target name="classpath" depends="resolve">
+-		<ivy:cachepath id="compile.classpath" type="jar" conf="provided" />
+-		<ivy:cachepath id="runtime.classpath" type="jar" conf="default" />
+-		<ivy:cachepath id="test.classpath" type="jar" conf="test" />
+-		<ivy:cachefileset setid="compile.fileset" type="jar" conf="provided" />
+-		<ivy:cachefileset setid="runtime.fileset" type="jar" conf="default" />
+-		<ivy:cachefileset setid="test.fileset" type="jar" conf="test" />
+-	</target>
+-		
++
+ 	<target name="compile" depends="classpath">
+ 		<mkdir dir="${target.classes.dir}" />
+ 		<javac srcdir="${src.java.dir}"
+@@ -60,6 +43,7 @@
+ 		       classpathref="compile.classpath"
+ 		       source="${jdk.source}"
+ 		       target="${jdk.target}"
++		       excludes="**/URLImportTask.java"
+ 		  />
+ 		
+ 		<copy todir="${target.classes.dir}">
+diff -urN a/docs/manual/tasks/importurl.html b/docs/manual/tasks/importurl.html
+--- a/docs/manual/tasks/importurl.html
++++ b/docs/manual/tasks/importurl.html
+@@ -1,175 +0,0 @@
+-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+-<html>
+-  <head>
+-    <title>Ant-contrib Tasks: Importurl</title>
+-  </head>
+-
+-  <body>
+-    <h1>Importurl</h1>
+-
+-    <p>The Importurl task will download a file, and import it's contents into the
+-       current project.  The file can be in the form of a standard ant .xml project
+-       file, or a .jar/.zip file.
+-    </p>
+-    <p>In the case of an .xml file, the file is downloaded, and imported as
+-       is.  In this case, the file itself is the only thing downloaded (ie.
+-       no corresponding .properties files, or other build files are downloaded).
+-    </p>
+-    <p>In the case of a .jar/.zip file, the file is downloaded and then
+-       decompressed.  After decompression, the file 'build.xml' at the root
+-       level of the jar is imported. By importing a .jar/.zip file, one can package additional resources along with
+-       the build.xml file.  However, you must be careful how you refer to these resources.
+-       The build.xml file must follow the same rules as any other file imported with the
+-       <import> task, in that references relative to the build.xml file must be
+-       made with the property:
+-           ant.file.<projectname>
+-       where <projectname> is the name of the project being imported, as specified
+-       in the project tag.  Example:
+-    </p>
+-    
+-    <pre>    
+-    <code>
+-        <project name="common">
+-            <basedir property="ant.dir.common" file="${ant.file.common}" />
+-            <property file="${ant.dir.common}/build.properties" />
+-        </project>
+-    </code>
+-    </pre>    
+-
+-    <p>
+-       This task should be compatible with older versions of ant, but has only been
+-       tested with Ant 1.6.x.  The underlying implementation is done using the
+-       <a href="http://jayasoft.org/ivy">Ivy</a> dependency resolver software,
+-       and thus, it needs available to the same classloader that loads this task.
+-    </p>
+-    <h2>Parameters</h2>
+-    <table border="1" cellpadding="2" cellspacing="0">
+-      <tr>
+-        <th>Attribute</th>
+-        <th>Description</th>
+-        <th>Required</th>
+-      </tr>
+-      <tr>
+-        <td valign="top">org</td>
+-        <td valign="top">The organization that publishes the script.</td>
+-        <td align="center" valign="top">Yes.</td>
+-      </tr>
+-      <tr>
+-        <td valign="top">module</td>
+-        <td valign="top">The name of the module which is to be fetched.</td>
+-        <td align="center" valign="top">Yes.</td>
+-      </tr>
+-      <tr>
+-        <td valign="top">ref</td>
+-        <td valign="top">The revision of the module to be fetched.</td>
+-        <td align="center" valign="top">No.  Defaults to "latest.integration".
+-           See the ivy details for more information on the possible wildcarding
+-           that can be used for this value.</td>
+-      </tr>
+-      <tr>
+-        <td valign="top">type</td>
+-        <td valign="top">The type of file to be downloaded</td>
+-        <td align="center" valign="top">No.  Defaults to 'jar'.  Can be
+-            any file extension.  However, unless the type is 'xml', the
+-            file is assumed to be a compressed file, expandable by ant's
+-            <expand> task (which is aliased to unjar, unzip).</td>
+-      </tr>
+-      <tr>
+-        <td valign="top">ivyConfUrl</td>
+-        <td valign="top">The URL of an ivy configuration file to use.  We
+-        will use the default resolver in this file to find the requested
+-        resource.</td>
+-        <td align="center" valign="top">No.  Defaults to the IvyRepResolver.</td>
+-      </tr>
+-      <tr>
+-        <td valign="top">ivyConfFile</td>
+-        <td valign="top">The path of an ivy configuration file to use.  We
+-        will use the default resolver in this file to find the requested
+-        resource.</td>
+-        <td align="center" valign="top">No.  Defaults to the IvyRepResolver.</td>
+-      </tr>
+-      <tr>
+-        <td valign="top">repositoryUrl</td>
+-        <td valign="top">The URL base of the repository to use.  This
+-        results in using Ivy's URLResolver to resolve the requested
+-        resource.</td>
+-        <td align="center" valign="top">No.  Defaults to the IvyRepResolver.</td>
+-      </tr>
+-      <tr>
+-        <td valign="top">repositoryDir</td>
+-        <td valign="top">The file base of the repository to use.  This
+-        results in using Ivy's FileSystemResolver to resolve the requested
+-        resource.</td>
+-        <td align="center" valign="top">No.  Defaults to the IvyRepResolver.</td>
+-      </tr>
+-      <tr>
+-        <td valign="top">artifactPattern</td>
+-        <td valign="top">The pattern used to find artifacts in the repository.</td>
+-        <td align="center" valign="top">No.  If repositoryUrl or repositoryDir
+-        are specified, this defaults to the standard repository pattern:
+-        "/[org]/[module]/[ext]s/[module]-[revision].[ext]".  Please see the
+-        ivy documentation for more information on the contents of this pattern.
+-        </td>
+-      </tr>
+-    </table>
+-
+-
+-    <h2>Example</h2>
+-
+-
+-    <pre>
+-    <code>
+-    <antcontrib:importurl org="antcontrib"
+-                             module="common"
+-                             rev="3.2" />
+-    </code>
+-    </pre>
+-    
+-    would look for the file "antcontrib/common/jars/common-3.2.jar" in the IvyRep
+-    repository.
+-    
+-    <pre>
+-    <code>
+-    <antcontrib:importurl org="antcontrib"
+-                             module="common"
+-                             rev="3.2" 
+-                             type="xml" />
+-    </code>
+-    </pre>
+-
+-    would look for the file "antcontrib/common/jars/common-3.2.xml" in the IvyRep
+-    repository.
+-
+-    <pre>
+-    <code>
+-    <antcontrib:importurl repositoryUrl="http://www.antcontrib.org/ivyrep"
+-                             org="antcontrib"
+-                             module="common"
+-                             rev="3.2" />
+-    </code>
+-    </pre>
+-
+-    would look for the located at
+-     "http://www.antcontrib.org/ivyrep/antcontrib/common/jars/common-3.2.jar"
+-
+-<p>    
+-    The following build.xml may be packaged into a .jar with it's corresponding
+-    build.properties file:
+-</p>
+-
+-    <pre>
+-    <code>
+-    <project name="common">
+-    <basedir property="ant.dir.common" file="${ant.file.common}" />
+-    <property file="${ant.dir.common}/build.properties" />
+-    </project>
+-    </code>
+-    </pre>
+-
+-
+-    <hr>
+-    <p align="center">Copyright © 2002-2006 Ant-Contrib Project. All
+-    rights Reserved.</p>
+-
+-  </body>
+-</html>
+diff -urN a/docs/manual/tasks/toc.html b/docs/manual/tasks/toc.html
+--- a/docs/manual/tasks/toc.html
++++ b/docs/manual/tasks/toc.html
+@@ -25,7 +25,6 @@
+     <ul>
+       <li><a href="post_task.html" target="mainFrame">HTTP Post</a></li>
+       <li><a href="server_tasks.html" target="mainFrame">AntServer / RemoteAnt</a></li>
+-      <li><a href="importurl.html" target="mainFrame">ImportURL</a></li>
+     </ul>
+     <h2>Http Tasks and Types</h2>
+     <ul>
+diff -urN a/src/java/net/sf/antcontrib/antlib.xml b/src/java/net/sf/antcontrib/antlib.xml
+--- a/src/java/net/sf/antcontrib/antlib.xml
++++ b/src/java/net/sf/antcontrib/antlib.xml
+@@ -42,7 +42,4 @@
+     <taskdef name="headMethod"
+         classname="net.sf.antcontrib.net.httpclient.HeadMethodTask"
+         onerror="ignore" />
+-    <taskdef name="importurl"
+-             classname="net.sf.antcontrib.net.URLImportTask"
+-             onerror="ignore"/>
+ </antlib>
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/ant-contrib.git/commitdiff/0b546cc29b3b1f5eafa960afb2ba9ace25c68d74



More information about the pld-cvs-commit mailing list