[Git][java-team/maven-javadoc-plugin][master] 3 commits: Bug#1040374: maven-javadoc-plugin: Please support Java 21
Tony Mancill (@tmancill)
gitlab at salsa.debian.org
Mon Jul 31 22:54:57 BST 2023
Tony Mancill pushed to branch master at Debian Java Maintainers / maven-javadoc-plugin
Commits:
9187e4e0 by Vladimir Petko at 2023-07-30T20:07:32-07:00
Bug#1040374: maven-javadoc-plugin: Please support Java 21
Package: maven-javadoc-plugin
Severity: wishlist
Tags: patch
User: ubuntu-devel at lists.ubuntu.com
Usertags: origin-ubuntu mantic ubuntu-patch
X-Debbugs-Cc: vladimir.petko at canonical.com
Dear Maintainer,
Java 21 no longer supports release level 7. The attached patch updates auto-
adjust-language-level.patch to use release level 8 for Java 21 and keeps the
release level 7 otherwise.
Changes:
* d/p/auto-adjust-language-level.patch: use release 8 for Java 21.
Thanks for considering the patch.
-- System Information:
Debian Release: bookworm/sid
APT prefers lunar-updates
APT policy: (500, 'lunar-updates'), (500, 'lunar-security'), (500, 'lunar'), (100, 'lunar-backports')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 6.2.0-24-generic (SMP w/32 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
- - - - -
d8040861 by tony mancill at 2023-07-30T21:08:21-07:00
Set Rules-Requires-Root: no in debian/control
- - - - -
242e1e0b by tony mancill at 2023-07-30T21:08:21-07:00
Prepare changelog for upload
- - - - -
3 changed files:
- debian/changelog
- debian/control
- debian/patches/auto-adjust-language-level.patch
Changes:
=====================================
debian/changelog
=====================================
@@ -1,3 +1,15 @@
+maven-javadoc-plugin (3.4.1-3) unstable; urgency=medium
+
+ * Team upload.
+
+ [ Vladimir Petko ]
+ * Bug#1040374: maven-javadoc-plugin: Please support Java 21
+
+ [ tony mancill ]
+ * Set Rules-Requires-Root: no in debian/control
+
+ -- tony mancill <tmancill at debian.org> Sun, 30 Jul 2023 21:06:58 -0700
+
maven-javadoc-plugin (3.4.1-2) unstable; urgency=medium
* Team upload.
=====================================
debian/control
=====================================
@@ -31,6 +31,7 @@ Standards-Version: 4.6.2
Vcs-Git: https://salsa.debian.org/java-team/maven-javadoc-plugin.git
Vcs-Browser: https://salsa.debian.org/java-team/maven-javadoc-plugin
Homepage: https://maven.apache.org/plugins/maven-javadoc-plugin/
+Rules-Requires-Root: no
Package: libmaven-javadoc-plugin-java
Architecture: all
=====================================
debian/patches/auto-adjust-language-level.patch
=====================================
@@ -3,20 +3,44 @@ Author: Emmanuel Bourg <ebourg at apache.org>
Forwarded: not-needed
--- a/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java
+++ b/src/main/java/org/apache/maven/plugins/javadoc/AbstractJavadocMojo.java
-@@ -158,6 +158,8 @@
+@@ -158,6 +158,32 @@
public abstract class AbstractJavadocMojo
extends AbstractMojo
{
-+ private List<String> unsupportedLanguageLevels = java.util.Arrays.asList(new String[]{"1.1", "1.2", "1.3", "1.4", "1.5", "5", "1.6", "6"});
++ private List<String> unsupportedLanguageLevels = getUnsupportedLanguageLevels();
++
++ private static List<String> getUnsupportedLanguageLevels() {
++ if ( isAtLeastJava21() ) {
++ return java.util.Arrays.asList( new String[]{"1.1", "1.2", "1.3", "1.4", "1.5", "5", "1.6", "6", "1.7", "7"} );
++ }
++ return java.util.Arrays.asList( new String[]{"1.1", "1.2", "1.3", "1.4", "1.5", "5", "1.6", "6"} );
++ }
++
++ private static boolean isAtLeastJava21()
++ {
++ try
++ {
++ return Integer.parseInt( System.getProperty( "java.specification.version" ) ) >= 21;
++ }
++ catch ( Exception e )
++ {
++ return false;
++ }
++ }
++
++ private String getMinRelease()
++ {
++ return isAtLeastJava21() ? "8" : "7";
++ }
+
/**
* Classifier used in the name of the javadoc-options XML file, and in the resources bundle
* artifact that gets attached to the project. This one is used for non-test javadocs.
-@@ -2028,6 +2030,19 @@
+@@ -2028,6 +2054,19 @@
public void execute()
throws MojoExecutionException, MojoFailureException
{
-+ String defaultLevel = "7";
++ String defaultLevel = getMinRelease();
+ if ( unsupportedLanguageLevels.contains( release ) )
+ {
+ System.err.println( "Use of release " + release + " is no longer supported, switching to " + defaultLevel );
View it on GitLab: https://salsa.debian.org/java-team/maven-javadoc-plugin/-/compare/889cde35488f35ff69a1a7c7a44ef186251f8896...242e1e0b77e64bf757dd7544b9fc67983b480321
--
View it on GitLab: https://salsa.debian.org/java-team/maven-javadoc-plugin/-/compare/889cde35488f35ff69a1a7c7a44ef186251f8896...242e1e0b77e64bf757dd7544b9fc67983b480321
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20230731/4dfc76b1/attachment.htm>
More information about the pkg-java-commits
mailing list