Skip to content

Align retrofit2 versions to ensure dependency convergence - #513

Closed
mnk wants to merge 1 commit into
segmentio:masterfrom
mnk:master
Closed

mnk wants to merge 1 commit into
segmentio:masterfrom
mnk:master

Conversation

@mnk

@mnk mnk commented Jul 13, 2025

Copy link
Copy Markdown

When depending on com.segment.analytics.java:analytics and using Maven DependencyConvergence enforcer,
build will fail with:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:3.5.0:enforce (dependencies) on project commons-segment:
[ERROR] Rule 16: org.apache.maven.enforcer.rules.dependency.DependencyConvergence failed with message:
[ERROR] Failed while enforcing releasability.
[ERROR]
[ERROR] Dependency convergence error for com.squareup.retrofit2:retrofit:jar:2.11.0 paths to dependency are:
[ERROR]   +-com.segment.analytics.java:analytics:jar:3.5.2:compile
[ERROR]     +-com.segment.analytics.java:analytics-core:jar:3.5.2:compile
[ERROR]       +-com.squareup.retrofit2:retrofit:jar:2.11.0:compile
[ERROR] and
[ERROR]   +-com.segment.analytics.java:analytics:jar:3.5.2:compile
[ERROR]     +-com.squareup.retrofit2:converter-gson:jar:2.9.0:compile
[ERROR]       +-com.squareup.retrofit2:retrofit:jar:2.9.0:compile
[ERROR] and
[ERROR]   +-com.segment.analytics.java:analytics:jar:3.5.2:compile
[ERROR]     +-com.squareup.retrofit2:retrofit-mock:jar:2.11.0:compile
[ERROR]       +-com.squareup.retrofit2:retrofit:jar:2.11.0:compile

When depending on com.segment.analytics.java:analytics and using Maven DependencyConvergence enforcer,
build will fail with:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:3.5.0:enforce (dependencies) on project commons-segment:
[ERROR] Rule 16: org.apache.maven.enforcer.rules.dependency.DependencyConvergence failed with message:
[ERROR] Failed while enforcing releasability.
[ERROR]
[ERROR] Dependency convergence error for com.squareup.retrofit2:retrofit:jar:2.11.0 paths to dependency are:
[ERROR]   +-com.segment.analytics.java:analytics:jar:3.5.2:compile
[ERROR]     +-com.segment.analytics.java:analytics-core:jar:3.5.2:compile
[ERROR]       +-com.squareup.retrofit2:retrofit:jar:2.11.0:compile
[ERROR] and
[ERROR]   +-com.segment.analytics.java:analytics:jar:3.5.2:compile
[ERROR]     +-com.squareup.retrofit2:converter-gson:jar:2.9.0:compile
[ERROR]       +-com.squareup.retrofit2:retrofit:jar:2.9.0:compile
[ERROR] and
[ERROR]   +-com.segment.analytics.java:analytics:jar:3.5.2:compile
[ERROR]     +-com.squareup.retrofit2:retrofit-mock:jar:2.11.0:compile
[ERROR]       +-com.squareup.retrofit2:retrofit:jar:2.11.0:compile
@mnk
mnk marked this pull request as ready for review July 13, 2025 15:33
@mnk

mnk commented Mar 8, 2026

Copy link
Copy Markdown
Author

@MichaelGHSeg , any chance to get this included in a release?

MichaelGHSeg added a commit that referenced this pull request Oct 29, 2026
converter-gson was pinned to 2.9.0 in both the parent dependencyManagement
and analytics/pom.xml while retrofit and retrofit-mock use 2.11.0, which
fails Maven DependencyConvergence for consumers. Supersedes #513, which
only changed the parent and left the module-level pin in place.

Co-authored-by: t <t@t>
@MichaelGHSeg

Copy link
Copy Markdown
Contributor

Updated and merged as a new PR, now released. Thank you.

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