Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build does not work on JDK 17 #176

Closed
duponter opened this issue Oct 11, 2021 · 1 comment
Closed

Build does not work on JDK 17 #176

duponter opened this issue Oct 11, 2021 · 1 comment

Comments

@duponter
Copy link
Contributor

duponter commented Oct 11, 2021

When building YAVI using Maven, I encounter following issues:

  1. The build fails when using JDK 17. It does build using JDK 11. I haven't tested with other JDKs.
    This is caused by the ConstraintMetaProcessorTest that fails because of the following issue: Access to compiler internal APIs will fail starting with JDK 16 google/compile-testing#222.

Adding a Maven profile that activates on JDK 9+ and opens up access to the com.sun.tools.javac.api in jdk.compiler module solves this.

  1. A warning is issued that the build is platform dependent:

[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!

Added 2 Maven properties settings encoding to UTF-8 fixes this.

  1. Several warnings of missing plugin versions are shown.

[WARNING]
[WARNING] Some problems were encountered while building the effective model for am.ik.yavi:yavi:jar:0.9.0-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for com.mycila.maven-license-plugin:maven-license-plugin is missing. @ line 192, column 21
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 152, column 21
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-jar-plugin is missing. @ line 227, column 21
[WARNING] 'build.plugins.plugin.version' for org.jacoco:jacoco-maven-plugin is missing. @ line 188, column 21
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]

After adding the missing plugin versions, the warnings also disappear.

  1. com.mycila.maven-license-plugin:maven-license-plugin is moved to com.mycila:license-maven-plugin.
    Old plugin: https://mvnrepository.com/artifact/com.mycila.maven-license-plugin/maven-license-plugin
    New plugin: https://mvnrepository.com/artifact/com.mycila/license-maven-plugin

Moving to the new Maven coordinates also upgrades this plugin to version 4.1.

@making
Copy link
Owner

making commented Oct 11, 2021

Fixed via gh-177

@making making closed this as completed Oct 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants