-
Notifications
You must be signed in to change notification settings - Fork 41.2k
Use a shaded version of org.json in spring-boot-configuration-metadata #45504
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
Thanks for the report.
That isn't a problem. It's simple JSON reader that we need and that is mature enough not to warrant a release. org.json was the same.
It is a possibility. This module is primarily used by IDE teams or build-time plugins. It wasn't really meant to be embedded in an application. What is your use case? |
Sure, age in itself is not an issue. Still, there have been vulnerabilities in org.json (example 1, example 2) and those have been fixed in newer releases. Also, the license is no longer restictive as it was before, removing what I think was the main impediment to use this library. Our use-case is that we're providing a Spring Boot-based internal framework, and we include spring-boot-properties-migrator, which in turn depends on |
Unrelated to this issue but just to reiterate what I've stated previously, you shouldn't be doing that. This artifact is only meant to be used temporary when you upgrade locally, see the documentation. |
It was indeed, but unfortunately "public domain" still doesn't work for some users so I think we'd prefer to keep the Apache 2.0 fork. The response to stleary/JSON-java#706 (comment) doesn't make me think we'll see another license change for org.json. |
Thanks yes, I'll see if we can remove it in an upcoming release.
Also makes total sense. Note: some discussion on the license here, although I'm not sure the author is going to participate in that thread 🤞 Some additional considerations:
This method exists in the
I think we can agree that the current state of things is not ideal, and I sympathize with your position on the In the meantime, I'll see about adding some exclusions in our pom files, so at least our users hopefully won't run into runtime issues anymore. |
Both of those considerations don't look valid to me, at least in the current state of things.
We are aware and we're using this dependency for that exact reason (i.e. not adding yet another json impl, or an incompatible version).
I think we've established that you're not supposed to use this at runtime (in the sense of using concretely the app with it). The logic behind the properties migrator is to use it on startup, collect the report, act on the configuration, run again, etc. That being said, 4.0.x is a good opportunity to remove |
Yes we have :D I merely meant that, although I didn't see it yet, this might just as well happen in tests, when Either way, the outcome of migrating away from this in 4.0.x sounds like a reasonable solution to me! Thanks. |
You could blame |
Hi,
spring-boot-configuration-metadata has a dependency on
com.vaadin.external.google:android-json:0.0.20131108.vaadin1
(managed here).This library was last released in 2013, and having it on the classpath often causes warnings like
(in this particular case the
org.json
dependency is coming in throughcom.google.cloud:google-cloud-bigquery:jar:2.49.0
)Interestingly, spring-boot-configuration-processor follows a different approach.
I'm not sure what the best way forward is here, perhaps
spring-boot-configuration-metadata
should use a similar (or the same) shaded approach asspring-boot-configuration-processor
.The text was updated successfully, but these errors were encountered: