Skip to content
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

Upgrade to Jackson 2.9.9.20190807 #17698

Closed
snicoll opened this issue Jul 30, 2019 · 10 comments
Closed

Upgrade to Jackson 2.9.9.20190807 #17698

snicoll opened this issue Jul 30, 2019 · 10 comments
Assignees
Labels
type: dependency-upgrade A dependency upgrade
Milestone

Comments

@snicoll
Copy link
Member

snicoll commented Jul 30, 2019

No description provided.

@snicoll snicoll added the type: dependency-upgrade A dependency upgrade label Jul 30, 2019
@snicoll snicoll added this to the 2.2.0.M5 milestone Jul 30, 2019
@snicoll snicoll self-assigned this Jul 30, 2019
@snicoll snicoll added the status: on-hold We can't start working on this issue yet label Jul 30, 2019
@snicoll
Copy link
Member Author

snicoll commented Jul 30, 2019

A number of projects are broken with this upgrade (that contains a CVE) so let's sync with Spring Data before processing this one.

@michael-simons
Copy link
Contributor

FYI FasterXML/jackson-databind#2395

Not an inherent Spring Data issue, I'd say.

@snicoll snicoll changed the title Upgrade to Jackson 2.9.9.20190727 Upgrade to Jackson 2.9.9.20190806 Aug 6, 2019
@snicoll snicoll removed the status: on-hold We can't start working on this issue yet label Aug 6, 2019
@snicoll snicoll closed this as completed in 8123961 Aug 6, 2019
@snicoll
Copy link
Member Author

snicoll commented Aug 6, 2019

Unfortunately the latest bom release is wrong and still refers to the previous jackson-databind. I've raised FasterXML/jackson-bom#24

@snicoll snicoll reopened this Aug 6, 2019
@snicoll snicoll modified the milestones: 2.2.0.M5, 2.2.x Aug 6, 2019
snicoll added a commit that referenced this issue Aug 6, 2019
@snicoll snicoll changed the title Upgrade to Jackson 2.9.9.20190806 Upgrade to Jackson 2.9.9.20190807 Aug 6, 2019
@franzbecker
Copy link

There might be another problem here. As the jackson-bom now has a different version scheme if I want to configure the used BOM from the outside I need to set jackson.version to 2.9.9.20190807 so that this import in Spring works:

			<dependency>
				<groupId>com.fasterxml.jackson</groupId>
				<artifactId>jackson-bom</artifactId>
				<version>${jackson.version}</version>
				<scope>import</scope>
				<type>pom</type>
			</dependency>

See https://github.com/spring-projects/spring-boot/blob/master/spring-boot-project/spring-boot-dependencies/pom.xml#L642

But as they use the same property internally (https://github.com/FasterXML/jackson-bom/blob/jackson-bom-2.9.9.20190807/pom.xml#L29) I will get errors such as these:

Could not find com.fasterxml.jackson.core:jackson-core:2.9.9.20190807

@snicoll
Copy link
Member Author

snicoll commented Aug 7, 2019

@franzbecker that's not what's happening. jackson.version must be used to import the bom and not individual modules. See for instance #12790 and other duplicates.

@franzbecker
Copy link

@snicoll yes but in order to get the latest BOM I need to set jackson.version to 2.9.9.20190807.

Maybe this makes it more clear: https://github.com/franzbecker/spring-bom-problem/blob/master/build.gradle

In the issue you mentioned your colleague notes that (#12790 (comment))

As far as I know, properties in an imported bom (which is what the Jackson bom is in this case) cannot be overridden.

But to my understanding this is okay to do and documented here: https://docs.spring.io/dependency-management-plugin/docs/current/reference/html/#dependency-management-configuration-bom-import-override-property

@snicoll
Copy link
Member Author

snicoll commented Aug 7, 2019

@franzbecker thanks. This looks new and a gradle specific problem as far as I can see. I don't know if the problem is here or in Jackson really. Can you please create a separate issue?

@franzbecker
Copy link

I think the underlying problem is, as mentioned in the issue you linked, that the properties have the same name and this was fine in Maven as there were certain limitation so that you could not override the property - at least in the XML. Technically you can override the property by setting the property from the outside, e.g. mvn help:effective-pom -Djackson.version=2.9.9.20190807 yields the same problem. But I doubt that's something people do.

@lonre
Copy link

lonre commented Aug 7, 2019

@snicoll yes but in order to get the latest BOM I need to set jackson.version to 2.9.9.20190807.

Maybe this makes it more clear: https://github.com/franzbecker/spring-bom-problem/blob/master/build.gradle

In the issue you mentioned your colleague notes that (#12790 (comment))

As far as I know, properties in an imported bom (which is what the Jackson bom is in this case) cannot be overridden.

But to my understanding this is okay to do and documented here: https://docs.spring.io/dependency-management-plugin/docs/current/reference/html/#dependency-management-configuration-bom-import-override-property

we have the same issue using gradle

@franzbecker
Copy link

@snicoll thanks for the feedback - I created #17808
@lonre maybe you want to comment there as well

@snicoll snicoll modified the milestones: 2.2.x, 2.1.8 Aug 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: dependency-upgrade A dependency upgrade
Projects
None yet
Development

No branches or pull requests

4 participants