-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Patch jackson-core with locally modified class #92984
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
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
f835e75
draft
pgomulka e3f5d63
rename
pgomulka dac26de
multi-release true
pgomulka b74a8e9
Merge remote-tracking branch 'upstream/main' into es_jackson_core
pgomulka dd2162a
es-jackson-core using 2.14.1 jackson
pgomulka 44ca2a7
disable code check
pgomulka 53550e2
remove comment
pgomulka File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
* in compliance with, at your election, the Elastic License 2.0 or the Server | ||
* Side Public License, v 1. | ||
*/ | ||
|
||
apply plugin: 'elasticsearch.build' | ||
apply plugin: 'com.github.johnrengelman.shadow' | ||
|
||
String jacksonVersion = "2.14.1" | ||
|
||
dependencies { | ||
implementation "com.fasterxml.jackson.core:jackson-core:${jacksonVersion}" | ||
} | ||
|
||
['jarHell', 'thirdPartyAudit', 'forbiddenApisMain', 'splitPackagesAudit', 'checkstyleMain', 'licenseHeaders', 'spotlessJavaCheck'].each { | ||
tasks.named(it).configure { | ||
enabled = false | ||
} | ||
} | ||
|
||
tasks.named("dependencyLicenses").configure { | ||
mapping from: /jackson-.*/, to: 'jackson' | ||
} | ||
|
||
shadowJar { | ||
manifest { | ||
attributes 'Multi-Release' : 'true' | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
libs/x-content/impl/es-jackson-core/licenses/jackson-LICENSE.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
This copy of Jackson JSON processor streaming parser/generator is licensed under the | ||
Apache (Software) License, version 2.0 ("the License"). | ||
See the License for details about distribution rights, and the | ||
specific rights regarding derivate works. | ||
|
||
You may obtain a copy of the License at: | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 |
20 changes: 20 additions & 0 deletions
20
libs/x-content/impl/es-jackson-core/licenses/jackson-NOTICE.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Jackson JSON processor | ||
|
||
Jackson is a high-performance, Free/Open Source JSON processing library. | ||
It was originally written by Tatu Saloranta ([email protected]), and has | ||
been in development since 2007. | ||
It is currently developed by a community of developers, as well as supported | ||
commercially by FasterXML.com. | ||
|
||
## Licensing | ||
|
||
Jackson core and extension components may licensed under different licenses. | ||
To find the details that apply to this artifact see the accompanying LICENSE file. | ||
For more information, including possible other licensing options, contact | ||
FasterXML.com (http://fasterxml.com). | ||
|
||
## Credits | ||
|
||
A list of contributors may be found from CREDITS file, which is included | ||
in some artifacts (usually source distributions); but is always available | ||
from the source code management (SCM) system project uses. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this needs to exclude the original FilterDelegateParser class file, otherwise there will be two copies, the original and the one added by this project.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The resulting jar only have one FilteringParserDelegate (new).
I think it wouldn't work when excluding with this snippet (similar to the hadoop approach)
This results in a jar without
FilteringParserDelegate
class at all. This is because in the docs https://imperceptiblethoughts.com/shadow/configuration/filtering/it says:
In hadoop api is removing the original inner classes and replacing the public class.
The snippet has a
$
in itThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah lets filter out the jar version of
FilteringParserDelegate
explicitly. Otherwise which version will be picked is a gradle implementation detail and could change anytime when gradle or the shadow jar plugin is updated.We can differ between the jar version and our patched version by using the following api:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I remember now why we have that filter. It's specifically for the anonymous inner classes. So I think it's ok to just overwrite. However, please double check the jar manually to confirm there are not eg 2 entries in the zip manifest.