Skip to content

Commit b804a3d

Browse files
Upgrade: apache-commons-collections4 version to 4.4 (#13802)
1 parent c5b7006 commit b804a3d

7 files changed

+185
-82
lines changed
Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<project name="commons-collections4" default="package" basedir=".">
4+
5+
<!-- ====================================================================== -->
6+
<!-- Build environment properties -->
7+
<!-- ====================================================================== -->
8+
9+
<property file="build.properties"/>
10+
<property name="project.groupId" value="org.apache.commons"/>
11+
<property name="project.artifactId" value="commons-collections4"/>
12+
<property name="project.version" value="4.4"/>
13+
<property name="bundle.version" value="${project.version}.0"/>
14+
15+
<property name="compiler.release" value="8"/>
16+
<property name="compiler.source" value="1.${compiler.release}"/>
17+
<property name="compiler.target" value="${compiler.source}"/>
18+
19+
<property name="build.finalName" value="${project.artifactId}-${project.version}"/>
20+
<property name="build.dir" value="target"/>
21+
<property name="build.outputDir" value="${build.dir}/classes"/>
22+
<property name="build.srcDir" value="src/main/java"/>
23+
<property name="build.resourceDir" value="."/>
24+
25+
<property name="reporting.outputDirectory" value="${build.dir}/site"/>
26+
27+
<!-- ====================================================================== -->
28+
<!-- Defining classpaths -->
29+
<!-- ====================================================================== -->
30+
31+
<path id="build.classpath"/>
32+
33+
<!-- ====================================================================== -->
34+
<!-- Cleaning up target -->
35+
<!-- ====================================================================== -->
36+
37+
<target name="clean" description="Clean the output directory">
38+
<delete dir="${build.dir}"/>
39+
</target>
40+
41+
<!-- ====================================================================== -->
42+
<!-- Compilation target -->
43+
<!-- ====================================================================== -->
44+
45+
<target name="compile" description="Compile the code">
46+
<mkdir dir="${build.outputDir}"/>
47+
<javac destdir="${build.outputDir}"
48+
encoding="iso-8859-1"
49+
nowarn="false"
50+
debug="true"
51+
optimize="false"
52+
deprecation="true"
53+
release="${compiler.release}"
54+
target="${compiler.target}"
55+
verbose="false"
56+
fork="false"
57+
source="${compiler.source}">
58+
<src>
59+
<pathelement location="${build.srcDir}"/>
60+
</src>
61+
<classpath refid="build.classpath"/>
62+
</javac>
63+
<mkdir dir="${build.outputDir}/META-INF"/>
64+
<copy todir="${build.outputDir}/META-INF">
65+
<fileset dir="${build.resourceDir}">
66+
<include name="NOTICE.txt"/>
67+
<include name="LICENSE.txt"/>
68+
<include name="NOTICE"/>
69+
<include name="LICENSE"/>
70+
</fileset>
71+
</copy>
72+
</target>
73+
74+
<!-- ====================================================================== -->
75+
<!-- Javadoc target -->
76+
<!-- ====================================================================== -->
77+
78+
<target name="javadoc" description="Generates the Javadoc of the application">
79+
<javadoc sourcepath="${build.srcDir}"
80+
packagenames="*"
81+
destdir="${reporting.outputDirectory}/apidocs"
82+
access="protected"
83+
verbose="false"
84+
encoding="iso-8859-1"
85+
version="true"
86+
use="true"
87+
author="true"
88+
splitindex="false"
89+
nodeprecated="false"
90+
nodeprecatedlist="false"
91+
notree="false"
92+
noindex="false"
93+
nohelp="false"
94+
nonavbar="false"
95+
serialwarn="false"
96+
source="${compiler.source}"
97+
linksource="true"
98+
breakiterator="false">
99+
</javadoc>
100+
</target>
101+
102+
<!-- ====================================================================== -->
103+
<!-- Package target -->
104+
<!-- ====================================================================== -->
105+
106+
<target name="package" depends="compile" description="Package the application">
107+
<jar jarfile="${build.dir}/${build.finalName}.jar"
108+
compress="true"
109+
index="false"
110+
basedir="${build.outputDir}"
111+
excludes="**/package.html">
112+
<manifest>
113+
<attribute name="Automatic-Module-Name" value="org.apache.commons.collections4"/>
114+
<attribute name="Bundle-Description" value="The Apache Commons Collections package contains types that extend and augment the Java Collections Framework."/>
115+
<attribute name="Bundle-DocURL" value="https://commons.apache.org/proper/commons-collections/"/>
116+
<attribute name="Bundle-License" value="https://www.apache.org/licenses/LICENSE-2.0.txt"/>
117+
<attribute name="Bundle-ManifestVersion" value="2"/>
118+
<attribute name="Bundle-Name" value="Apache Commons Collections"/>
119+
<attribute name="Bundle-SymbolicName" value="${project.groupId}.${project.artifactId}"/>
120+
<attribute name="Bundle-Vendor" value="The Apache Software Foundation"/>
121+
<attribute name="Bundle-Version" value="${bundle.version}"/>
122+
<attribute name="Export-Package" value="org.apache.commons.collections4.bag;version=&quot;${project.version}&quot;,org.apache.commons.collections4.bidimap;version=&quot;${project.version}&quot;,org.apache.commons.collections4.collection;version=&quot;${project.version}&quot;,org.apache.commons.collections4.comparators;version=&quot;${project.version}&quot;,org.apache.commons.collections4.functors;version=&quot;${project.version}&quot;,org.apache.commons.collections4.iterators;version=&quot;${project.version}&quot;,org.apache.commons.collections4.keyvalue;version=&quot;${project.version}&quot;,org.apache.commons.collections4.list;version=&quot;${project.version}&quot;,org.apache.commons.collections4.map;version=&quot;${project.version}&quot;,org.apache.commons.collections4.multimap;version=&quot;${project.version}&quot;,org.apache.commons.collections4.multiset;version=&quot;${project.version}&quot;,org.apache.commons.collections4.properties;version=&quot;${project.version}&quot;,org.apache.commons.collections4.queue;version=&quot;${project.version}&quot;,org.apache.commons.collections4.sequence;version=&quot;${project.version}&quot;,org.apache.commons.collections4.set;version=&quot;${project.version}&quot;,org.apache.commons.collections4.splitmap;version=&quot;${project.version}&quot;,org.apache.commons.collections4.trie.analyzer;version=&quot;${project.version}&quot;,org.apache.commons.collections4.trie;version=&quot;${project.version}&quot;,org.apache.commons.collections4;version=&quot;${project.version}&quot;"/>
123+
<attribute name="Implementation-Title" value="Apache Commons Collections"/>
124+
<attribute name="Implementation-Vendor" value="The Apache Software Foundation"/>
125+
<attribute name="Implementation-Version" value="${project.version}"/>
126+
<attribute name="Import-Package" value="org.w3c.dom"/>
127+
<attribute name="Include-Resource" value="META-INF/LICENSE.txt=LICENSE.txt,META-INF/NOTICE.txt=NOTICE.txt"/>
128+
<attribute name="Require-Capability" value="osgi.ee;filter:=&quot;(&amp;(osgi.ee=JavaSE)(version=${compiler.target}))&quot;"/>
129+
<attribute name="Specification-Title" value="Apache Commons Collections"/>
130+
<attribute name="Specification-Vendor" value="The Apache Software Foundation"/>
131+
<attribute name="Specification-Version" value="${project.version}"/>
132+
</manifest>
133+
</jar>
134+
</target>
135+
136+
<!-- ====================================================================== -->
137+
<!-- A dummy target for the package named after the type it creates -->
138+
<!-- ====================================================================== -->
139+
140+
<target name="jar" depends="package" description="Builds the jar for the application"/>
141+
142+
</project>
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
{
22
"Signatures": {
3-
"commons-collections4-4.1-src.tar.gz": "94839a0620a0fb1999aa94d490cd8d6919f79dc206be33b722f856ffde862ecf"
3+
"apache-commons-collections4-build.xml": "2ffa4c6ef0bea386eb38c8009022f7a1cd008402821b73ee04dc89fb2410cb5a",
4+
"commons-collections4-4.4-src.tar.gz": "2af935fa71a47c3bcd43ae8fb49526ca2035ae027bfeb758d16fee2d8b010a60"
45
}
56
}
7+

SPECS-EXTENDED/apache-commons-collections4/apache-commons-collections4.spec

Lines changed: 38 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
Vendor: Microsoft Corporation
22
Distribution: Azure Linux
33
#
4-
# spec file for package apache-commons-collections4
4+
# spec file
55
#
6-
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
6+
# Copyright (c) 2023 SUSE LLC
77
#
88
# All modifications and additions to the file contributed by third parties
99
# remain the property of their copyright owners, unless otherwise agreed
@@ -22,24 +22,19 @@ Distribution: Azure Linux
2222
%define short_name commons-%{base_name}
2323
%bcond_with tests
2424
Name: apache-%{short_name}
25-
Version: 4.1
26-
Release: 2%{?dist}
25+
Version: 4.4
26+
Release: 1%{?dist}
2727
Summary: Extension of the Java Collections Framework
2828
License: Apache-2.0
2929
Group: Development/Libraries/Java
30-
URL: http://commons.apache.org/proper/commons-collections/
31-
Source0: http://archive.apache.org/dist/commons/collections/source/commons-collections4-%{version}-src.tar.gz
32-
Patch0: commons-collections4-4.1-jdk11.patch
33-
Patch1: commons-collections4-4.1-bundle.patch
34-
Patch2: commons-collections4-4.1-javadoc.patch
30+
URL: https://commons.apache.org/proper/commons-collections/
31+
Source0: https://archive.apache.org/dist/commons/collections/source/commons-collections4-%{version}-src.tar.gz
32+
Source1: %{name}-build.xml
3533
BuildRequires: ant
3634
BuildRequires: fdupes
37-
BuildRequires: javapackages-local-bootstrap
35+
BuildRequires: java-devel >= 1.8
36+
BuildRequires: javapackages-local-bootstrap >= 6
3837
BuildArch: noarch
39-
%if %{with tests}
40-
BuildRequires: ant-junit
41-
BuildRequires: easymock
42-
%endif
4338

4439
%description
4540
Commons-Collections seek to build upon the JDK classes by providing
@@ -53,22 +48,11 @@ Group: Documentation/HTML
5348
This package provides %{summary}.
5449

5550
%prep
56-
%setup -q -n commons-collections4-%{version}-src
57-
%patch 0 -p1
58-
%patch 1 -p1
59-
%patch 2 -p1
60-
61-
%pom_remove_parent
51+
%autosetup -n commons-collections4-%{version}-src
52+
cp %{SOURCE1} build.xml
6253

6354
%build
64-
%{ant} \
65-
%if %{with tests}
66-
-Djunit.jar=$(build-classpath junit) \
67-
-Dhamcrest.jar=$(build-classpath hamcrest/core) \
68-
-Deasymock.jar=$(build-classpath easymock) \
69-
test \
70-
%endif
71-
jar javadoc
55+
%{ant} jar javadoc
7256

7357
%install
7458
# jar
@@ -77,23 +61,47 @@ install -pm 0644 target/%{short_name}-%{version}.jar %{buildroot}%{_javadir}/%{n
7761
ln -sf %{name}.jar %{buildroot}%{_javadir}/%{short_name}.jar
7862
# pom
7963
install -dm 0755 %{buildroot}%{_mavenpomdir}
80-
install -pm 0644 pom.xml %{buildroot}%{_mavenpomdir}/%{name}.pom
64+
install -pm 644 pom.xml %{buildroot}%{_mavenpomdir}/%{name}.pom
8165
%add_maven_depmap %{name}.pom %{name}.jar
8266
# javadoc
8367
install -dm 0755 %{buildroot}%{_javadocdir}/%{name}
84-
cp -pr target/apidocs/* %{buildroot}%{_javadocdir}/%{name}/
68+
cp -pr target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}/
69+
# Remove LICENSE from javadoc directory to avoid duplicate license warning
70+
mv %{buildroot}%{_javadocdir}/%{name}/legal/ADDITIONAL_LICENSE_INFO .
71+
mv %{buildroot}%{_javadocdir}/%{name}/legal/LICENSE .
8572
%fdupes -s %{buildroot}%{_javadocdir}
8673

8774
%files -f .mfiles
8875
%doc RELEASE-NOTES.txt
8976
%license LICENSE.txt NOTICE.txt
77+
%license ADDITIONAL_LICENSE_INFO
9078
%{_javadir}/%{short_name}.jar
9179

9280
%files javadoc
9381
%license LICENSE.txt NOTICE.txt
9482
%{_javadocdir}/%{name}
9583

9684
%changelog
85+
* Thu May 15 2025 Durga Jagadeesh Palli <[email protected]> - 4.4-1
86+
- Initial Azure Linux import from openSUSE Tumbleweed (license: same as "License" tag).
87+
- License verified
88+
89+
+ Updates the platform requirement from Java 6 to 8
90+
+ Add Automatic-Module-Name MANIFEST entry for Java 9
91+
compatibility
92+
+ Added a few new APIs.
93+
* Builds with java 21 out of the box
94+
* Generated ant build system with maven-ant-plugin in order to
95+
build with ant like before.
96+
- Removed patches:
97+
* commons-collections4-4.1-bundle.patch
98+
* commons-collections4-4.1-javadoc.patch
99+
* commons-collections4-4.1-jdk11.patch
100+
+ All changes factored into the generated build.xml
101+
102+
* Fri Mar 18 18:14:43 UTC 2022 - Fridrich Strba <[email protected]>
103+
- Build with source/target levels 8
104+
97105
* Thu Oct 14 2021 Pawel Winogrodzki <[email protected]> - 4.1-2
98106
- Converting the 'Release' tag to the '[number].[distribution]' format.
99107

SPECS-EXTENDED/apache-commons-collections4/commons-collections4-4.1-bundle.patch

Lines changed: 0 additions & 19 deletions
This file was deleted.

SPECS-EXTENDED/apache-commons-collections4/commons-collections4-4.1-javadoc.patch

Lines changed: 0 additions & 19 deletions
This file was deleted.

SPECS-EXTENDED/apache-commons-collections4/commons-collections4-4.1-jdk11.patch

Lines changed: 0 additions & 11 deletions
This file was deleted.

cgmanifest.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,8 +325,8 @@
325325
"type": "other",
326326
"other": {
327327
"name": "apache-commons-collections4",
328-
"version": "4.1",
329-
"downloadUrl": "http://archive.apache.org/dist/commons/collections/source/commons-collections4-4.1-src.tar.gz"
328+
"version": "4.4",
329+
"downloadUrl": "https://archive.apache.org/dist/commons/collections/source/commons-collections4-4.4-src.tar.gz"
330330
}
331331
}
332332
},

0 commit comments

Comments
 (0)