eclipse-buildship / buildship

The Eclipse Plug-ins for Gradle project.
535 stars 171 forks source link

eclipseBuild plugin: Ensure compatibility with Java 17 #1285

Closed oleosterhagen closed 10 months ago

oleosterhagen commented 11 months ago

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)
[...]