Accepting request 1120322 from Java:packages
4.4 == fix build with jdk 21 OBS-URL: https://build.opensuse.org/request/show/1120322 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/apache-commons-collections4?expand=0&rev=3
This commit is contained in:
commit
7661331c36
142
apache-commons-collections4-build.xml
Normal file
142
apache-commons-collections4-build.xml
Normal file
@ -0,0 +1,142 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<project name="commons-collections4" default="package" basedir=".">
|
||||
|
||||
<!-- ====================================================================== -->
|
||||
<!-- Build environment properties -->
|
||||
<!-- ====================================================================== -->
|
||||
|
||||
<property file="build.properties"/>
|
||||
<property name="project.groupId" value="org.apache.commons"/>
|
||||
<property name="project.artifactId" value="commons-collections4"/>
|
||||
<property name="project.version" value="4.4"/>
|
||||
<property name="bundle.version" value="${project.version}.0"/>
|
||||
|
||||
<property name="compiler.release" value="8"/>
|
||||
<property name="compiler.source" value="1.${compiler.release}"/>
|
||||
<property name="compiler.target" value="${compiler.source}"/>
|
||||
|
||||
<property name="build.finalName" value="${project.artifactId}-${project.version}"/>
|
||||
<property name="build.dir" value="target"/>
|
||||
<property name="build.outputDir" value="${build.dir}/classes"/>
|
||||
<property name="build.srcDir" value="src/main/java"/>
|
||||
<property name="build.resourceDir" value="."/>
|
||||
|
||||
<property name="reporting.outputDirectory" value="${build.dir}/site"/>
|
||||
|
||||
<!-- ====================================================================== -->
|
||||
<!-- Defining classpaths -->
|
||||
<!-- ====================================================================== -->
|
||||
|
||||
<path id="build.classpath"/>
|
||||
|
||||
<!-- ====================================================================== -->
|
||||
<!-- Cleaning up target -->
|
||||
<!-- ====================================================================== -->
|
||||
|
||||
<target name="clean" description="Clean the output directory">
|
||||
<delete dir="${build.dir}"/>
|
||||
</target>
|
||||
|
||||
<!-- ====================================================================== -->
|
||||
<!-- Compilation target -->
|
||||
<!-- ====================================================================== -->
|
||||
|
||||
<target name="compile" description="Compile the code">
|
||||
<mkdir dir="${build.outputDir}"/>
|
||||
<javac destdir="${build.outputDir}"
|
||||
encoding="iso-8859-1"
|
||||
nowarn="false"
|
||||
debug="true"
|
||||
optimize="false"
|
||||
deprecation="true"
|
||||
release="${compiler.release}"
|
||||
target="${compiler.target}"
|
||||
verbose="false"
|
||||
fork="false"
|
||||
source="${compiler.source}">
|
||||
<src>
|
||||
<pathelement location="${build.srcDir}"/>
|
||||
</src>
|
||||
<classpath refid="build.classpath"/>
|
||||
</javac>
|
||||
<mkdir dir="${build.outputDir}/META-INF"/>
|
||||
<copy todir="${build.outputDir}/META-INF">
|
||||
<fileset dir="${build.resourceDir}">
|
||||
<include name="NOTICE.txt"/>
|
||||
<include name="LICENSE.txt"/>
|
||||
<include name="NOTICE"/>
|
||||
<include name="LICENSE"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
<!-- ====================================================================== -->
|
||||
<!-- Javadoc target -->
|
||||
<!-- ====================================================================== -->
|
||||
|
||||
<target name="javadoc" description="Generates the Javadoc of the application">
|
||||
<javadoc sourcepath="${build.srcDir}"
|
||||
packagenames="*"
|
||||
destdir="${reporting.outputDirectory}/apidocs"
|
||||
access="protected"
|
||||
verbose="false"
|
||||
encoding="iso-8859-1"
|
||||
version="true"
|
||||
use="true"
|
||||
author="true"
|
||||
splitindex="false"
|
||||
nodeprecated="false"
|
||||
nodeprecatedlist="false"
|
||||
notree="false"
|
||||
noindex="false"
|
||||
nohelp="false"
|
||||
nonavbar="false"
|
||||
serialwarn="false"
|
||||
source="${compiler.source}"
|
||||
linksource="true"
|
||||
breakiterator="false">
|
||||
</javadoc>
|
||||
</target>
|
||||
|
||||
<!-- ====================================================================== -->
|
||||
<!-- Package target -->
|
||||
<!-- ====================================================================== -->
|
||||
|
||||
<target name="package" depends="compile" description="Package the application">
|
||||
<jar jarfile="${build.dir}/${build.finalName}.jar"
|
||||
compress="true"
|
||||
index="false"
|
||||
basedir="${build.outputDir}"
|
||||
excludes="**/package.html">
|
||||
<manifest>
|
||||
<attribute name="Automatic-Module-Name" value="org.apache.commons.collections4"/>
|
||||
<attribute name="Bundle-Description" value="The Apache Commons Collections package contains types that extend and augment the Java Collections Framework."/>
|
||||
<attribute name="Bundle-DocURL" value="https://commons.apache.org/proper/commons-collections/"/>
|
||||
<attribute name="Bundle-License" value="https://www.apache.org/licenses/LICENSE-2.0.txt"/>
|
||||
<attribute name="Bundle-ManifestVersion" value="2"/>
|
||||
<attribute name="Bundle-Name" value="Apache Commons Collections"/>
|
||||
<attribute name="Bundle-SymbolicName" value="${project.groupId}.${project.artifactId}"/>
|
||||
<attribute name="Bundle-Vendor" value="The Apache Software Foundation"/>
|
||||
<attribute name="Bundle-Version" value="${bundle.version}"/>
|
||||
<attribute name="Export-Package" value="org.apache.commons.collections4.bag;version="${project.version}",org.apache.commons.collections4.bidimap;version="${project.version}",org.apache.commons.collections4.collection;version="${project.version}",org.apache.commons.collections4.comparators;version="${project.version}",org.apache.commons.collections4.functors;version="${project.version}",org.apache.commons.collections4.iterators;version="${project.version}",org.apache.commons.collections4.keyvalue;version="${project.version}",org.apache.commons.collections4.list;version="${project.version}",org.apache.commons.collections4.map;version="${project.version}",org.apache.commons.collections4.multimap;version="${project.version}",org.apache.commons.collections4.multiset;version="${project.version}",org.apache.commons.collections4.properties;version="${project.version}",org.apache.commons.collections4.queue;version="${project.version}",org.apache.commons.collections4.sequence;version="${project.version}",org.apache.commons.collections4.set;version="${project.version}",org.apache.commons.collections4.splitmap;version="${project.version}",org.apache.commons.collections4.trie.analyzer;version="${project.version}",org.apache.commons.collections4.trie;version="${project.version}",org.apache.commons.collections4;version="${project.version}""/>
|
||||
<attribute name="Implementation-Title" value="Apache Commons Collections"/>
|
||||
<attribute name="Implementation-Vendor" value="The Apache Software Foundation"/>
|
||||
<attribute name="Implementation-Version" value="${project.version}"/>
|
||||
<attribute name="Import-Package" value="org.w3c.dom"/>
|
||||
<attribute name="Include-Resource" value="META-INF/LICENSE.txt=LICENSE.txt,META-INF/NOTICE.txt=NOTICE.txt"/>
|
||||
<attribute name="Require-Capability" value="osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=${compiler.target}))""/>
|
||||
<attribute name="Specification-Title" value="Apache Commons Collections"/>
|
||||
<attribute name="Specification-Vendor" value="The Apache Software Foundation"/>
|
||||
<attribute name="Specification-Version" value="${project.version}"/>
|
||||
</manifest>
|
||||
</jar>
|
||||
</target>
|
||||
|
||||
<!-- ====================================================================== -->
|
||||
<!-- A dummy target for the package named after the type it creates -->
|
||||
<!-- ====================================================================== -->
|
||||
|
||||
<target name="jar" depends="package" description="Builds the jar for the application"/>
|
||||
|
||||
</project>
|
@ -1,3 +1,21 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Oct 25 14:24:18 UTC 2023 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
- Update to upstream version 4.4
|
||||
* Changes
|
||||
+ Updates the platform requirement from Java 6 to 8
|
||||
+ Add Automatic-Module-Name MANIFEST entry for Java 9
|
||||
compatibility
|
||||
+ Added a few new APIs.
|
||||
* Builds with java 21 out of the box
|
||||
* Generated ant build system with maven-ant-plugin in order to
|
||||
build with ant like before.
|
||||
- Removed patches:
|
||||
* commons-collections4-4.1-bundle.patch
|
||||
* commons-collections4-4.1-javadoc.patch
|
||||
* commons-collections4-4.1-jdk11.patch
|
||||
+ All changes factored into the generated build.xml
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Mar 18 18:14:43 UTC 2022 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file
|
||||
#
|
||||
# Copyright (c) 2022 SUSE LLC
|
||||
# Copyright (c) 2023 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -20,24 +20,19 @@
|
||||
%define short_name commons-%{base_name}
|
||||
%bcond_with tests
|
||||
Name: apache-%{short_name}
|
||||
Version: 4.1
|
||||
Version: 4.4
|
||||
Release: 0
|
||||
Summary: Extension of the Java Collections Framework
|
||||
License: Apache-2.0
|
||||
Group: Development/Libraries/Java
|
||||
URL: http://commons.apache.org/proper/commons-collections/
|
||||
URL: https://commons.apache.org/proper/commons-collections/
|
||||
Source0: http://archive.apache.org/dist/commons/collections/source/commons-collections4-%{version}-src.tar.gz
|
||||
Patch0: commons-collections4-4.1-jdk11.patch
|
||||
Patch1: commons-collections4-4.1-bundle.patch
|
||||
Patch2: commons-collections4-4.1-javadoc.patch
|
||||
Source1: %{name}-build.xml
|
||||
BuildRequires: ant
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: javapackages-local
|
||||
BuildRequires: java-devel >= 1.8
|
||||
BuildRequires: javapackages-local >= 6
|
||||
BuildArch: noarch
|
||||
%if %{with tests}
|
||||
BuildRequires: ant-junit
|
||||
BuildRequires: easymock
|
||||
%endif
|
||||
|
||||
%description
|
||||
Commons-Collections seek to build upon the JDK classes by providing
|
||||
@ -52,22 +47,10 @@ This package provides %{summary}.
|
||||
|
||||
%prep
|
||||
%setup -q -n commons-collections4-%{version}-src
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
|
||||
%pom_remove_parent
|
||||
cp %{SOURCE1} build.xml
|
||||
|
||||
%build
|
||||
%{ant} \
|
||||
-Dcompile.source=8 -Dcompile.target=8 \
|
||||
%if %{with tests}
|
||||
-Djunit.jar=$(build-classpath junit) \
|
||||
-Dhamcrest.jar=$(build-classpath hamcrest/core) \
|
||||
-Deasymock.jar=$(build-classpath easymock) \
|
||||
test \
|
||||
%endif
|
||||
jar javadoc
|
||||
%{ant} jar javadoc
|
||||
|
||||
%install
|
||||
# jar
|
||||
@ -76,11 +59,11 @@ install -pm 0644 target/%{short_name}-%{version}.jar %{buildroot}%{_javadir}/%{n
|
||||
ln -sf %{name}.jar %{buildroot}%{_javadir}/%{short_name}.jar
|
||||
# pom
|
||||
install -dm 0755 %{buildroot}%{_mavenpomdir}
|
||||
install -pm 0644 pom.xml %{buildroot}%{_mavenpomdir}/%{name}.pom
|
||||
%{mvn_install_pom} pom.xml %{buildroot}%{_mavenpomdir}/%{name}.pom
|
||||
%add_maven_depmap %{name}.pom %{name}.jar
|
||||
# javadoc
|
||||
install -dm 0755 %{buildroot}%{_javadocdir}/%{name}
|
||||
cp -pr target/apidocs/* %{buildroot}%{_javadocdir}/%{name}/
|
||||
cp -pr target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}/
|
||||
%fdupes -s %{buildroot}%{_javadocdir}
|
||||
|
||||
%files -f .mfiles
|
||||
|
@ -1,19 +0,0 @@
|
||||
--- commons-collections4-4.1-src/build.xml 2019-02-25 13:03:20.651249023 +0100
|
||||
+++ commons-collections4-4.1-src/build.xml 2019-02-25 13:11:55.393720267 +0100
|
||||
@@ -146,6 +146,16 @@
|
||||
<attribute name="Implementation-Vendor-Id" value="org.apache"/>
|
||||
<attribute name="X-Compile-Source-JDK" value="${compile.source}"/>
|
||||
<attribute name="X-Compile-Target-JDK" value="${compile.target}"/>
|
||||
+ <attribute name="Bundle-Description" value="The Apache Commons Collections package contains types that extend and augment the Java Collections Framework."/>
|
||||
+ <attribute name="Bundle-DocURL" value="http://commons.apache.org/proper/commons-collections/"/>
|
||||
+ <attribute name="Bundle-License" value="https://www.apache.org/licenses/LICENSE-2.0.txt"/>
|
||||
+ <attribute name="Bundle-ManifestVersion" value="2"/>
|
||||
+ <attribute name="Bundle-Name" value="Commons Collections"/>
|
||||
+ <attribute name="Bundle-SymbolicName" value="org.apache.commons.${component.name}"/>
|
||||
+ <attribute name="Bundle-Vendor" value="The Apache Software Foundation"/>
|
||||
+ <attribute name="Bundle-Version" value="4.1.0"/>
|
||||
+ <attribute name="Export-Package" value="org.apache.commons.collections4;version="${component.version}",org.apache.commons.collections4.bag;version="${component.version}",org.apache.commons.collections4.bidimap;version="${component.version}",org.apache.commons.collections4.collection;version="${component.version}",org.apache.commons.collections4.comparators;version="${component.version}",org.apache.commons.collections4.functors;version="${component.version}",org.apache.commons.collections4.iterators;version="${component.version}",org.apache.commons.collections4.keyvalue;version="${component.version}",org.apache.commons.collections4.list;version="${component.version}",org.apache.commons.collections4.map;version="${component.version}",org.apache.commons.collections4.multimap;version="${component.version}",org.apache.commons.collections4.multiset;version="${component.version}",org.apache.commons.collections4.queue;version="${component.version}",org.apache.commons.collections4.sequence;version="${component.version}",org.apache.commons.collections4.set;version="${component.version}",org.apache.commons.collections4.splitmap;version="${component.version}",org.apache.commons.collections4.trie;version="${component.version}",org.apache.commons.collections4.trie.analyzer;version="${component.version}""/>
|
||||
+ <attribute name="Import-Package" value="org.w3c.dom"/>
|
||||
</manifest>
|
||||
<fileset dir="${build.home}/classes">
|
||||
<include name="**/*.class"/>
|
@ -1,19 +0,0 @@
|
||||
--- commons-collections4-4.1-src/build.xml 2015-11-25 22:52:41.000000000 +0100
|
||||
+++ commons-collections4-4.1-src/build.xml 2019-02-25 13:29:35.562798645 +0100
|
||||
@@ -29,7 +29,6 @@
|
||||
<property file="${user.home}/build.properties"/>
|
||||
<property file="${basedir}/build.properties"/>
|
||||
<property file="${basedir}/default.properties"/>
|
||||
- <property name="jdk.javadoc" value="http://download.oracle.com/javase/1.5.0/docs/api/"/>
|
||||
|
||||
<!-- ========== Construct compile classpath =============================== -->
|
||||
<path id="compile.classpath">
|
||||
@@ -125,8 +124,6 @@
|
||||
encoding="${compile.encoding}"
|
||||
source="${compile.source}">
|
||||
<classpath refid="compile.classpath"/>
|
||||
- <link href="${jdk.javadoc}"/>
|
||||
- <link href="${collections.javadoc}"/>
|
||||
</javadoc>
|
||||
</target>
|
||||
|
@ -1,11 +0,0 @@
|
||||
--- commons-collections4-4.1-src/src/test/java/org/apache/commons/collections4/collection/AbstractCollectionTest.java 2015-11-25 22:52:42.000000000 +0100
|
||||
+++ commons-collections4-4.1-src/src/test/java/org/apache/commons/collections4/collection/AbstractCollectionTest.java 2018-11-19 09:48:39.052536491 +0100
|
||||
@@ -1085,7 +1085,7 @@
|
||||
verify();
|
||||
|
||||
try {
|
||||
- array = getCollection().toArray(null);
|
||||
+ array = getCollection().toArray((Object[])null);
|
||||
fail("toArray(null) should raise NPE");
|
||||
} catch (final NullPointerException e) {
|
||||
// expected
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:94839a0620a0fb1999aa94d490cd8d6919f79dc206be33b722f856ffde862ecf
|
||||
size 704671
|
BIN
commons-collections4-4.4-src.tar.gz
(Stored with Git LFS)
Normal file
BIN
commons-collections4-4.4-src.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user