#3 Build with default Java version
Merged 10 months ago by jerboaa. Opened 10 months ago by yselkowitz.
rpms/ yselkowitz/byteman rawhide  into  rawhide

file modified
+10 -3
@@ -15,7 +15,7 @@ 

  

  Name:             byteman

  Version:          4.0.16

- Release:          9%{?dist}

+ Release:          10%{?dist}

  Summary:          Java agent-based bytecode injection tool

  License:          LGPLv2+

  URL:              http://www.jboss.org/byteman
@@ -26,7 +26,7 @@ 

  ExclusiveArch:  %{java_arches} noarch

  

  # Byteman 4.x requires JDK 9+ to build. Require JDK 10 explicitly.

- BuildRequires:    java-11-openjdk-devel

+ BuildRequires:    java-17-openjdk-devel

  BuildRequires:    maven-local

  BuildRequires:    maven-shade-plugin

  BuildRequires:    maven-source-plugin
@@ -124,6 +124,10 @@ 

  %pom_xpath_remove "pom:build/pom:plugins/pom:plugin[pom:artifactId='maven-surefire-plugin']/pom:executions" contrib/bmunit

  %pom_xpath_set "pom:build/pom:plugins/pom:plugin[pom:artifactId='maven-surefire-plugin']/pom:configuration" '<skip>true</skip>' contrib/bmunit

  

+ # source/target 1.6 is not supported by 17; default is now 1.8

+ %pom_xpath_remove "pom:build/pom:plugins/pom:plugin[pom:artifactId='maven-compiler-plugin']/pom:configuration/pom:source" pom.xml

+ %pom_xpath_remove "pom:build/pom:plugins/pom:plugin[pom:artifactId='maven-compiler-plugin']/pom:configuration/pom:target" pom.xml

+ 

  # Don't build download, docs modules

  %pom_disable_module download

  %pom_disable_module docs
@@ -144,7 +148,7 @@ 

  %mvn_package ":byteman-dtest" dtest

  

  %build

- export JAVA_HOME=/usr/lib/jvm/java-11-openjdk

+ export JAVA_HOME=/usr/lib/jvm/java-17-openjdk

  # Use --xmvn-javadoc so as to avoid maven-javadoc-plugin issue

  # (fixed in 3.1.0, fedora has 3.0.1):

  # See https://issues.apache.org/jira/browse/MJAVADOC-555
@@ -216,6 +220,9 @@ 

  %{homedir}/lib/byteman-dtest.jar

  

  %changelog

+ * Wed Jul 19 2023 Yaakov Selkowitz <yselkowi@redhat.com> - 4.0.16-10

+ - Build with Java 17

+ 

  * Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.16-9

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild

  

Presumably the explicit java-11-openjdk requirement dates back to when 1.8.0 was the default. 11 was the default version since Fedora 33 and RHEL 9, 17 is now the default since Fedora 36 and RHEL 10, and older versions are unwanted in RHEL 10.

Please use the old style for JDK 17. I.e.

BuildRequires: java-17-openjdk-devel

java-devel is only being provided by the default JDK so >= 1:11 is sort-of meaningless as no other JDK than 17 provides it.

Instead of this tiny patch could we pass -Dmaven.compiler.source=1.8 and -Dmaven.compiler.target=1.8 to the xmvn invocation instead, please?

Please use JAVA_HOME=/usr/lib/jvm/java-17-openjdk here.

rebased onto 4e92174

10 months ago

Instead of this tiny patch could we pass -Dmaven.compiler.source=1.8 and -Dmaven.compiler.target=1.8 to the xmvn invocation instead, please?

It wasn't quite this simple, but this version avoids the patch.

rebased onto 8d1e10f

10 months ago

Pull-Request has been merged by jerboaa

10 months ago
Metadata