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

Flat versions, quick fix for Gradle consumers #81 #82

Open
wants to merge 3 commits into
base: 2.17
Choose a base branch
from

Conversation

elect86
Copy link

@elect86 elect86 commented Jan 31, 2025

No description provided.

pom.xml Show resolved Hide resolved
<dependencyManagement>
<dependencies>

<!-- Core -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>${jackson.version.annotations}</version>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on Kotlin example, it sounds like 1 intermediate level is acceptable, but no more -- if so, wouldn't this actually still work? (since it's jackson.version.annotations -> jackson.version).

Or conversely, if it has to be direct reference, wouldn't we need to use ${jackson.version} directly for Kotlin and Scala modules?

Copy link
Author

@elect86 elect86 Feb 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm having issue to define exactly the conditions that trigger this problem

In my current situation, I have a multi-module build, with one of the module being platform1 (bom), which depends on another (external) platform2, which depends on jackson-bom:2.16.1

In this scenario, in the common module depending on platform, I declare a dependency on api("com.fasterxml.jackson.module:jackson-module-kotlin"), but I get:

unresolved dependency for "com.fasterxml.jackson.module:jackson-module-kotlin:."

-common
-platform1
    -platform2
        -`jackson-bom:2.16.1`

Therefore I immediately connected this at the problem I had time ago with jna in Scijava

		<jna.version>5.14.0</jna.version>
		<jna-platform.version>${jna.version}</jna-platform.version>
		<net.java.dev.jna.jna.version>${jna.version}</net.java.dev.jna.jna.version>
		<net.java.dev.jna.jna-platform.version>${jna-platform.version}</net.java.dev.jna.jna-platform.version>

That's why Vampire was helping me defining a virtual platform to force a manual alignment between jna and jna-platform here, which unfortunately turned out to be buggy

However I just created a new project from scratch and this seems fine (same module, though)

    api(platform("com.fasterxml.jackson:jackson-bom:2.16.1"))
    api("com.fasterxml.jackson.module:jackson-module-kotlin")

So, I think this is driving me crazy

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There hasn't much change in this area, but latest Jackson is 2.18.2 just in case something in poms might be relevant.

Also: if issue is reproducible just with Kotlin module (and perhaps for Scala), then it'd be good to shorten just those 2 paths I think (and leave the rest as they are)

Copy link
Member

@cowtowncoder cowtowncoder Feb 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@elect86 If you only overrode Kotlin and Scala module version refs, would it still cover your use case? Or are other simplifications still needed?
I appreciate reproducing issue may be difficult but it'd be great to have minimal patch, if at all practical.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants