ThreeTen / threeten-extra

Provides additional date-time classes that complement those in JDK 8
http://www.threeten.org/threeten-extra/
BSD 3-Clause "New" or "Revised" License
397 stars 77 forks source link

Three package-info.class files with bytecode version 53 (JDK 9) is added to jar #226

Closed klaraward closed 1 year ago

klaraward commented 2 years ago

In one of our projects use the extra maven enforcer rule enforceBytecodeVersion to ensure that artifacts we believe to be JDK 8 compliant actually are.

This fails when running against threeten-extra 1.7.1:

[INFO] --- maven-enforcer-plugin:3.1.0:enforce (enforce) @ bom-integration-test ---
[INFO] Adding ignore: module-info
[INFO] Restricted to JDK 8 yet org.threeten:threeten-extra:jar:1.7.1:compile contains org/threeten/extra/chrono/package-info.class targeted to JDK 9
[ERROR] Rule 3: org.apache.maven.plugins.enforcer.EnforceBytecodeVersion failed with message:
Found Banned Dependency: org.threeten:threeten-extra:jar:1.7.1

We can get around this with exclusions I noticed that the package-info.class files are not in the 1.7.0 jar file, but they are included in 1.7.1 with bytecode version 53. Is this intentional?

jodastephen commented 2 years ago

package-info.class was not deliberately altered, thus it is likely that a change in the Maven plugin version caused this oddity.

damianbl commented 1 year ago

I have the same issue with version 1.7.2 and SBT. However I cannot easily exclude it.