-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Different compilation behavior using a built-from-source jar vs maven central jar #4755
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
Comments
Ah, the maven central jar was built with Java 8. I was building jackson-databind with Java 11 and switching to build with Java 8 resolved the issue I was seeing. In version 2.15.2 the |
wild to think that my code is used to simulate laser weapons 😄 |
Hmmh. So preview feature enabling must be from |
Yep, this line: Line 333 in 896c1cf
Well, as a reference point, we were building 2.15.2 with Java 11, and running our application with Java 11 and everything worked just fine. The pom.xml for 2.15.2 was specifying Java 14 for "--enable-preview", which changed to Java 11 for 2.16.0. Building with 8 is fine with me and it works well, but I was just caught off guard when it quit working on me. After inspecting the maven central jar manifest I realized the difference was Java 8 vs 11. |
Oh. I don't think we should have |
@cowtowncoder there is 1 test that relies on it - I ran this a few days ago so I don't have its name It might be useful to move that test to a separate module |
@pjfanning I am not sure I see that, see #4760 which seems to pass. Same running locally. |
Removed |
Describe your Issue
We have a requirement to use our own built-from-source jars. When building jackson-databind 2.18.0 from source and using the resulting jar in our project, our own project compilation fails because jackson-databind enables Java 11 preview features. However, our own project compilation succeeds when using the jackson-databind 2.18.0 jar from maven central.
The error we see using the built-from-source jar:
error: classfile for C:\Users\<user>\.gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.core\jackson-databind\2.18.0\3ddbe54c9c69b46e8f56fd63d968d6b311ce5be6\jackson-databind-2.18.0.jar(/com/fasterxml/jackson/databind/node/ArrayNode.class) uses preview features of Java SE 11.
I have so far been unable to determine the difference with the jar we build is vs what was officially published, but there is definitely a difference in behavior. Does anyone have insight into what would cause this behavioral difference?
The text was updated successfully, but these errors were encountered: