diff --git a/.gitignore b/.gitignore index 55a56c7..89e515c 100644 --- a/.gitignore +++ b/.gitignore @@ -33,3 +33,4 @@ /apache-maven-3.9.1-src.tar.gz /apache-maven-3.9.4-src.tar.gz /apache-maven-3.9.6-src.tar.gz +/apache-maven-3.9.9-src.tar.gz diff --git a/gating.yaml b/gating.yaml index 05bf13a..54c4549 100644 --- a/gating.yaml +++ b/gating.yaml @@ -6,4 +6,5 @@ decision_contexts: rules: - !PassingTestCaseRule {test_case_name: osci.brew-build./plans/matrix/jdk21/full.functional} - !PassingTestCaseRule {test_case_name: osci.brew-build./plans/matrix/jdk21/headless.functional} + - !PassingTestCaseRule {test_case_name: osci.brew-build./plans/matrix/unbound/jlink.functional} - !PassingTestCaseRule {test_case_name: osci.brew-build./plans/javapackages.functional} diff --git a/maven.spec b/maven.spec index cf2bc07..78a24c8 100644 --- a/maven.spec +++ b/maven.spec @@ -6,8 +6,8 @@ Name: maven Epoch: 1 -Version: 3.9.6 -Release: 9%{?dist} +Version: 3.9.9 +Release: 1%{?dist} Summary: Java project management and project comprehension tool # maven itself is Apache-2.0 # bundled slf4j is MIT @@ -20,15 +20,15 @@ Source0: https://archive.apache.org/dist/maven/maven-3/%{version}/source/ Source1: maven-bash-completion Source2: mvn.1 -Patch1: 0001-Adapt-mvn-script.patch +Patch: 0001-Adapt-mvn-script.patch # Downstream-specific, avoids build-dependency on logback -Patch2: 0002-Invoke-logback-via-reflection.patch -Patch3: 0003-Remove-dependency-on-powermock.patch +Patch: 0002-Invoke-logback-via-reflection.patch +Patch: 0003-Remove-dependency-on-powermock.patch %if %{with bootstrap} BuildRequires: javapackages-bootstrap %else -BuildRequires: maven-local +BuildRequires: maven-local >= 6.4.0 BuildRequires: mvn(com.google.guava:failureaccess) BuildRequires: mvn(com.google.guava:guava) BuildRequires: mvn(com.google.inject:guice) @@ -38,7 +38,6 @@ BuildRequires: mvn(commons-jxpath:commons-jxpath) BuildRequires: mvn(javax.annotation:javax.annotation-api) BuildRequires: mvn(javax.inject:javax.inject) BuildRequires: mvn(junit:junit) -BuildRequires: mvn(org.apache.commons:commons-lang3) BuildRequires: mvn(org.apache.maven.plugins:maven-assembly-plugin) BuildRequires: mvn(org.apache.maven.plugins:maven-dependency-plugin) BuildRequires: mvn(org.apache.maven.plugins:maven-enforcer-plugin) @@ -85,7 +84,7 @@ BuildRequires: mvn(org.slf4j:slf4j-simple::sources:) %endif Requires: %{name}-lib = %{epoch}:%{version}-%{release} -Requires: %{name}-jdk-binding = %{epoch}:%{version}-%{release} +Requires: %{name}-jdk-binding Suggests: %{name}-openjdk21 = %{epoch}:%{version}-%{release} Requires(post): alternatives @@ -108,32 +107,22 @@ OrderWithRequires: xmvn-minimal # maven-slf4j-provider.jar, together with Maven-specific additions. Provides: bundled(slf4j) = %{bundled_slf4j_version} +# Remove in Fedora 45 +Obsoletes: maven-openjdk8 < 3.9.9-2 +Obsoletes: maven-openjdk11 < 3.9.9-2 +Obsoletes: maven-openjdk17 < 3.9.9-2 + %description lib Core part of Apache Maven that can be used as a library. -%package openjdk21 -Summary: OpenJDK 21 binding for Maven -RemovePathPostfixes: -openjdk21 -Provides: %{name}-jdk-binding = %{epoch}:%{version}-%{release} -Requires: %{name} = %{epoch}:%{version}-%{release} -Requires: java-21-openjdk-headless -Recommends: java-21-openjdk-devel -Conflicts: %{name}-jdk-binding - -%description openjdk21 -Configures Maven to run with OpenJDK 21. - %{?javadoc_package} %prep -%setup -q -n apache-maven-%{version} +%autosetup -p1 -n apache-maven-%{version} find -name '*.java' -exec sed -i 's/\r//' {} + find -name 'pom.xml' -exec sed -i 's/\r//' {} + -%patch -P 1 -p1 -%patch -P 2 -p1 -%patch -P 3 -p1 sed -i "s/@{maven_version_suffix}/%{?maven_version_suffix}/" apache-maven/src/bin/mvn # not really used during build, but a precaution @@ -226,8 +215,11 @@ ln -s %{homedir}/bin/mvnDebug.1.gz %{buildroot}%{_mandir}/man1/mvnDebug%{maven_v # JDK bindings install -d -m 755 %{buildroot}%{_javaconfdir}/ -echo JAVA_HOME=%{_jvmlibdir}/jre-21-openjdk >%{buildroot}%{_javaconfdir}/maven%{?maven_version_suffix}.conf-openjdk21 - +ln -sf %{_jpbindingdir}/maven%{?maven_version_suffix}.conf %{buildroot}%{_javaconfdir}/maven%{?maven_version_suffix}.conf +echo JAVA_HOME=%{_jvmdir}/jre-21-openjdk >%{buildroot}%{_javaconfdir}/maven%{?maven_version_suffix}-openjdk21.conf +%jp_binding --verbose --variant openjdk21 --ghost maven%{?maven_version_suffix}.conf --target %{_javaconfdir}/maven%{?maven_version_suffix}-openjdk21.conf --provides %{name}-jdk-binding --requires java-21-openjdk-headless --recommends java-21-openjdk-devel +touch %{buildroot}%{_javaconfdir}/maven%{?maven_version_suffix}-unbound.conf +%jp_binding --verbose --variant unbound --ghost maven%{?maven_version_suffix}.conf --target %{_javaconfdir}/maven%{?maven_version_suffix}-unbound.conf --provides %{name}-jdk-binding %post update-alternatives --install %{_bindir}/mvn mvn %{homedir}/bin/mvn %{?maven_alternatives_priority}0 \ @@ -245,6 +237,7 @@ if [[ $1 -eq 0 ]]; then update-alternatives --remove mvn %{homedir}/bin/mvn; fi %exclude %{homedir}/bin/mvn* %dir %{confdir} %dir %{confdir}/logging +%config %{_javaconfdir}/maven%{?maven_version_suffix}*.conf %config(noreplace) %{_sysconfdir}/m2%{?maven_version_suffix}.conf %config(noreplace) %{confdir}/settings.xml %config(noreplace) %{confdir}/logging/simplelogger.properties @@ -263,10 +256,10 @@ if [[ $1 -eq 0 ]]; then update-alternatives --remove mvn %{homedir}/bin/mvn; fi %{_mandir}/man1/mvnDebug%{maven_version_suffix}.1.gz %endif -%files openjdk21 -%config %{_javaconfdir}/maven%{?maven_version_suffix}.conf-openjdk21 - %changelog +* Wed Dec 18 2024 Mikolaj Izdebski - 1:3.9.9-1 +- Update to upstream version 3.9.9 + * Tue Oct 29 2024 Troy Dawson - 1:3.9.6-9 - Bump release for October 2024 mass rebuild: Resolves: RHEL-64018 diff --git a/plans/matrix.fmf b/plans/matrix.fmf index 67e2075..fc934f4 100644 --- a/plans/matrix.fmf +++ b/plans/matrix.fmf @@ -5,9 +5,16 @@ discover: execute: how: tmt +environment: + MAVEN_IT_GIT_REF: maven-3.9.x + /jdk21: - environment: + environment+: OPENJDK_VERSION: 21 + prepare: + - how: install + exclude: + - maven-unbound /full: summary: Maven matrix tests - OpenJDK 21 full @@ -25,3 +32,21 @@ execute: script: | dnf -y remove java-*-openjdk +/unbound: + prepare: + - how: install + exclude: + - maven-openjdk21 + + /jlink: + summary: Maven matrix tests - unbound jlink-based Java + discover+: + filter: tag:unbound & tier:0,1 + prepare+: + - how: shell + script: | + test -d /opt/java && test -x /usr/local/bin/java && exit 0 + dnf -y install java-21-openjdk-jmods + jlink --add-modules java.base,java.logging,java.xml,java.naming --output /opt/java + ln -s /opt/java/bin/java /usr/local/bin/java + dnf -y remove java-21-openjdk-jmods diff --git a/sources b/sources index 9756c0b..25260b9 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (apache-maven-3.9.6-src.tar.gz) = c14b97703082af495225cec652ad1ec58cbcd069040cdfa16a7b9270058574c73524ce15217e83153fe23b2449ef1afd73a4ef42bd05abd3cfdfadfc3da7f7bf +SHA512 (apache-maven-3.9.9-src.tar.gz) = 2f395661e7a48c454dd526f2800df209169a253e7980f6fbfbf5f63546fe726a45935f14b151a2737159c9574b5b0f223ea8cd0f62232dd47b47a6863df790d5