Maven and Ant dependencies ported to Java 17

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I've ported all my packages to be buildable with OpenJDK 17.
I have not pushed the changes to dist-git yet, but I will do it before
the end of the week.

I wanted to share common problems I encountered and solutions I came up with.
I hope that this will help others trying to port their packages.

Problem 1: Compiler source/target levels 1.6 are no longer supported
Solution: Bump source/target levels to 1.7 or 1.8
Packages affected:
 - apache-commons-beanutils
 - apache-commons-collections
 - apache-commons-jxpath
 - apache-commons-logging
 - apache-commons-net
 - apiguardian
 - atinject
 - bsf
 - cglib
 - java_cup
 - jdom
 - jdom2
 - jsch
 - junit
 - jzlib
 - maven-file-management
 - maven-plugin-testing
 - maven-shared-io
 - munge-maven-plugin
 - opentest4j
 - osgi-annotation
 - plexus-build-api
 - qdox
 - sisu-mojos
 - xalan-j2
 - xbean
 - xml-commons-apis

Problem 2: Tests that use reflection fail with <<module java.base does
not "opens java.lang">> or similar error
Solution: Run tests with appropriate --add-opens parameter passed to JVM
Packages affected:
 - easymock
 - mockito
 - xmvn

Problem 3: Code does not recognize Java bytecode version 61.0
Solution: Update to newer upstream version that supports newer Java bytecode.
Package affected:
 - objectweb-asm

Problem 4: Code is compiled with -Werror passed to javac, but OpenJDK
17 introduces new warnings
Solution: Do not pass -Werror to Java compiler
Package affected:
 - jakarta-mail

Problem 5: Wildcard imports are used in the code, but OpenJDK 17
introduces new classes that cause import ambiguity
Solution: Add explicit imports
Package affected:
 - univocity-parsers

Packages that needed changes to make RPM Java packaging tooling to
work with OpenJDK 17:
 - javapackages-bootstrap
 - javapackages-tools
 - maven

--
Mikolaj
_______________________________________________
java-devel mailing list -- java-devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to java-devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/java-devel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure




[Index of Archives]     [Red Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux