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

eclipseBuild plugin: Ensure compatibility with Java 17 #1285

Merged

Conversation

oleosterhagen
Copy link
Contributor

With Java 17 the private field attr is no longer accessible and must be replaced with a call to the corresponding public getter method.

Without the change the build shows this stacktrace on standard output and fails later:

groovy.lang.MissingPropertyException: No such property: attr for class: java.util.jar.Manifest
        at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:65)
        at org.codehaus.groovy.runtime.callsite.GetEffectivePojoPropertySite.getProperty(GetEffectivePojoPropertySite.java:65)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:329)
        at eclipsebuild.mavenize.Bundle2Pom.convert(Bundle2Pom.groovy:55)
        at eclipsebuild.mavenize.Bundle2Pom$convert.call(Unknown Source)
        at eclipsebuild.mavenize.BundleMavenDeployer$_collectArtifacts_closure1.doCall(BundleMavenDeployer.groovy:64)
[...]

With Java 17 the private field "attr" is no longer accessible and must
be replaced with a call to the corresponding public getter method.
@donat donat merged commit 3803896 into eclipse-buildship:master Jan 11, 2024
2 checks passed
@donat donat added this to the 3.1.9 milestone Jan 11, 2024
@donat donat self-requested a review January 11, 2024 13:42
@donat donat self-assigned this Jan 11, 2024
@oleosterhagen oleosterhagen deleted the eclipsebuild-java17-fix branch January 11, 2024 17:43
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

Successfully merging this pull request may close these issues.

2 participants