[Git][java-team/plexus-compiler][master] 6 commits: Support for Java 21 (Closes: #1040270)
Tony Mancill (@tmancill)
gitlab at salsa.debian.org
Wed Jul 12 05:23:12 BST 2023
Tony Mancill pushed to branch master at Debian Java Maintainers / plexus-compiler
Commits:
0aae8780 by tony mancill at 2023-07-11T20:10:08-07:00
Support for Java 21 (Closes: #1040270)
- - - - -
f97148e0 by tony mancill at 2023-07-11T20:14:52-07:00
Bump Standards-Version to 4.6.2 (no changes)
- - - - -
b0d76140 by tony mancill at 2023-07-11T20:16:12-07:00
Set Rules-Requires-Root: no in debian/control
- - - - -
5af90fd5 by tony mancill at 2023-07-11T21:03:05-07:00
Update copyright format uri
- - - - -
3d955652 by tony mancill at 2023-07-11T21:03:05-07:00
Update debian/watch format to version 4
- - - - -
afa98d00 by tony mancill at 2023-07-11T21:05:38-07:00
Prepare changelog for upload
- - - - -
5 changed files:
- debian/changelog
- debian/control
- debian/copyright
- debian/patches/auto-adjust-language-level.patch
- debian/watch
Changes:
=====================================
debian/changelog
=====================================
@@ -1,3 +1,15 @@
+plexus-compiler (2.12.1-2) unstable; urgency=medium
+
+ * Team upload
+ * Support for Java 21 (Closes: #1040270)
+ Thank you to Vladimir Petko for the patch.
+ * Bump Standards-Version to 4.6.2 (no changes)
+ * Set Rules-Requires-Root: no in debian/control
+ * Update copyright format uri
+ * Update debian/watch format to version 4
+
+ -- tony mancill <tmancill at debian.org> Tue, 11 Jul 2023 21:02:00 -0700
+
plexus-compiler (2.12.1-1) unstable; urgency=medium
* Team upload.
=====================================
debian/control
=====================================
@@ -19,10 +19,11 @@ Build-Depends:
libplexus-testing-java,
libplexus-utils2-java,
maven-debian-helper (>= 1.5)
-Standards-Version: 4.6.1
+Standards-Version: 4.6.2
Vcs-Git: https://salsa.debian.org/java-team/plexus-compiler.git
Vcs-Browser: https://salsa.debian.org/java-team/plexus-compiler
Homepage: https://codehaus-plexus.github.io/plexus-compiler/
+Rules-Requires-Root: no
Package: libplexus-compiler-java
Architecture: all
=====================================
debian/copyright
=====================================
@@ -1,4 +1,4 @@
-Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: Plexus Compiler
Source: https://github.com/codehaus-plexus/plexus-compiler
=====================================
debian/patches/auto-adjust-language-level.patch
=====================================
@@ -3,20 +3,55 @@ Author: Emmanuel Bourg <ebourg at apache.org>
Forwarded: not-needed
--- a/plexus-compilers/plexus-compiler-javac/src/main/java/org/codehaus/plexus/compiler/javac/JavacCompiler.java
+++ b/plexus-compilers/plexus-compiler-javac/src/main/java/org/codehaus/plexus/compiler/javac/JavacCompiler.java
-@@ -375,10 +375,20 @@
- args.add( "-Werror" );
+@@ -208,6 +208,39 @@
}
+ }
-+ List<String> unsupportedLanguageLevels = java.util.Arrays.asList(new String[]{"1.1", "1.2", "1.3", "1.4", "1.5", "5", "1.6", "6"});
++ private static final List<String> unsupportedLanguageLevels = getUnsupportedLanguageLevels();
+
++ private static List<String> getUnsupportedLanguageLevels()
++ {
++ if (isAtLeastJava21())
++ {
++ return Arrays.asList(new String[]{"1.1", "1.2", "1.3", "1.4", "1.5", "5", "1.6", "6", "1.7", "7" });
++ }
++ return 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 static String getMinRelease()
++ {
++ return isAtLeastJava21() ? "8" : "7";
++ }
++
++ private static boolean isUnsupportedRelease(String version)
++ {
++ return unsupportedLanguageLevels.contains( version );
++ }
++
+ public String[] createCommandLine( CompilerConfiguration config )
+ throws CompilerException
+ {
+@@ -378,7 +411,15 @@
if ( !StringUtils.isEmpty( config.getReleaseVersion() ) )
{
args.add( "--release" );
- args.add( config.getReleaseVersion() );
+ if ( unsupportedLanguageLevels.contains( config.getReleaseVersion() ) )
+ {
-+ System.err.println( "Use of release " + config.getReleaseVersion() + " is no longer supported, switching to 7" );
-+ args.add( "7" );
++ System.err.println( "Use of release " + config.getReleaseVersion() + " is no longer supported, switching to " + getMinRelease() );
++ args.add( getMinRelease() );
+ }
+ else
+ {
@@ -25,33 +60,33 @@ Forwarded: not-needed
}
else
{
-@@ -387,7 +397,13 @@
+@@ -387,7 +428,13 @@
{
// Required, or it defaults to the target of your JDK (eg 1.5)
args.add( "-target" );
- args.add( "1.1" );
-+ args.add( "1.7" );
++ args.add( getMinRelease() );
+ }
+ else if ( unsupportedLanguageLevels.contains( config.getTargetVersion() ) )
+ {
-+ System.err.println( "Use of target " + config.getTargetVersion() + " is no longer supported, switching to 7" );
++ System.err.println( "Use of target " + config.getTargetVersion() + " is no longer supported, switching to " + getMinRelease() );
+ args.add( "-target" );
-+ args.add( "1.7" );
++ args.add( getMinRelease() );
}
else
{
-@@ -399,7 +415,13 @@
+@@ -399,7 +446,13 @@
{
// If omitted, later JDKs complain about a 1.1 target
args.add( "-source" );
- args.add( "1.3" );
-+ args.add( "1.7" );
++ args.add( getMinRelease() );
+ }
+ else if ( !suppressSource( config ) && unsupportedLanguageLevels.contains( config.getSourceVersion() ) )
+ {
-+ System.err.println( "Use of source " + config.getSourceVersion() + " is no longer supported, switching to 7" );
++ System.err.println( "Use of source " + config.getSourceVersion() + " is no longer supported, switching to " + getMinRelease() );
+ args.add( "-source" );
-+ args.add( "1.7" );
++ args.add( getMinRelease() );
}
else if ( !suppressSource( config ) )
{
=====================================
debian/watch
=====================================
@@ -1,2 +1,2 @@
-version=3
+version=4
https://github.com/codehaus-plexus/plexus-compiler/tags .*/plexus-compiler-(\d.+)\.tar\.gz
View it on GitLab: https://salsa.debian.org/java-team/plexus-compiler/-/compare/aa61eeb6cc272fe1426002f7becc9e3b41a49563...afa98d00b77486a3f12d9bb7a4f70a040111c8a1
--
View it on GitLab: https://salsa.debian.org/java-team/plexus-compiler/-/compare/aa61eeb6cc272fe1426002f7becc9e3b41a49563...afa98d00b77486a3f12d9bb7a4f70a040111c8a1
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/20230712/8a835ac1/attachment.htm>
More information about the pkg-java-commits
mailing list