Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Dependency Management for Java - Seattle 2025-1...
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
sullis
November 18, 2025
Programming
55
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Dependency Management for Java - Seattle 2025-11-18
Dependency Management for Java
Seattle Java User Group
2025-11-18
#seajug
sullis
November 18, 2025
More Decks by sullis
See All by sullis
Dependency Management for Java - Code Remix Summit 2026-05-12
sullis
0
69
AI Assisted Software Development - Portland Java User Group - 2026-04-14
sullis
0
82
Dependency Management for Java - Portland - 2025-11-04
sullis
0
37
Dependency management for Java applications 2025-09-11
sullis
0
59
S3 NYC Iceberg meetup 2025-07-10
sullis
0
64
Amazon S3 Chicago 2025-06-04
sullis
0
150
Amazon S3 Boston 2025-05-07
sullis
0
120
Netty ConFoo Montreal 2025-02-27
sullis
0
190
GitHub Actions ConFoo Montreal 2025-02-26
sullis
0
120
Other Decks in Programming
See All in Programming
komatsuna「分散システムにおけるバグ分析手法」
komatsunaqa
0
260
リアルな遅延を測る仕様
kota_yata
1
100
Jindong: Introducing Declarative Haptics in Compose Multiplatform
l2hyunwoo
0
120
為什麼你並不需要ViewModel / No, you don't need a ViewModel
lovee
1
500
AWS CDK を「作」ってみた 〜フルスクラッチで見えた CDK の裏側〜 / aws-cdk-from-scratch
gotok365
3
2.8k
これって Effect でできたのでは? / TSKaigi Mashup Kansai #2
susisu
0
240
FDEが実現するAI駆動経営の現在地
gonta
2
280
Go言語とトイモデルで学ぶTransformerの気持ち / fukuokago23-transformer
monochromegane
0
170
自動化したのに回らない テスト運用の壁―AI時代の品質責任と生産性
mfunaki
0
170
言葉の格闘技のススメ~紙とペンと言葉から始める、キャリアの描き方~
progresscicada
2
150
実装をデザインガイドラインに追従させるための取り組み / 260731-dip-mosh-design-system
dachi023
0
450
VibeCodingからAgenticWorkflowへ
starfish719
0
460
Featured
See All Featured
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.9k
Test your architecture with Archunit
thirion
1
2.3k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
3
1.1k
30 Presentation Tips
portentint
PRO
1
370
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
56
3.4k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.1k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
460
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
240
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
200
Designing for Timeless Needs
cassininazir
1
440
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
1
2.8k
Transcript
None
About me Portland Oregon Java since 1996 open source contributor
None
🟢 hundreds of libraries on the classpath 🟢 open source
libraries 🟢 internal libraries Modern Java applications
What is the worst that could happen? Outdated libraries on
your production classpath
None
2017 US House committee Equifax CEO US Rep Greg Walden
2017 US House committee US Rep Greg Walden “the Apache
Struts software which contained the vulnerability that led to this breach was running on the Equifax system”
Greenfield project
Java dependency conflicts
Gradle blog November 2019 “The larger the project and its
dependency graph, the harder it is to maintain”
“Dependency issues can cause many problems” Gradle blog November 2019
“If you are lucky, you would get a compile time
error” Gradle blog November 2019
“it is common to only see problems occurring when executing
tests or even at production runtime” Gradle blog November 2019
NoClassDefFoundError ClassNotFoundException
NoSuchMethodError NoSuchFieldError
UnsatisfiedLinkError AbstractMethodError
Let’s talk about dependency resolution
dependencies { implementation( “foo:liba:1.5.2” ) implementation( “foo:libz:0.2.1” ) implementation( “com.google.guava:guava:28.2”
) }
liba 1.5.2 app 1.0.0 libz 0.2.1 guava 19.0 guava 33.4.8
guava 28.2
liba 1.5.2 app 1.0.0 libz 0.2.1 guava 19.0 guava 33.4.8
guava 28.2
Maven: “nearest wins” Gradle: “highest version wins” guava 28.2 guava
33.4.8
Jake Wharton - March 2024 https://jakewharton.com/nonsensical-maven-is-still-a-gradle-problem/
“Maven’s dependency resolution strategy is objectively bonkers” Jake Wharton -
March 2024 https://jakewharton.com/nonsensical-maven-is-still-a-gradle-problem/
Java classpath
what Java libraries do you have in production right now?
do you have outdated libraries in production?
do you have SNAPSHOT libraries in production?
Microservice app:1.5.2 sharedlib:1.8.3 swagger-annotations:2.2.31-SNAPSHOT
“Let’s add one more Java library ” Java library
None
Dependency Hell
Dependency Hell is a common problem
Dependency Hell @ gilt.com (2015)
Dependency Hell @ Netflix (2017)
Taming dependency hell
Pin dependency to a specific version?
configurations.all { resolutionStrategy { force 'com.example:foobar:0.9.2' } }
Mike McGarr Netflix, 2017
Gradle User Guide
“Gradle’s optimistic dependency resolution may inadvertently upgrade dependencies, causing compatibility
issues” Gradle User Guide
Gradle User Guide
Gradle User Guide
Gradle User Guide
Gradle User Guide
Gradle User Guide
Google JLBP
Google JLBP “Google Best Practices for Java Libraries are rules
that minimize problems for consumers of interconnected Java libraries“ jlbp.dev
JLBP-1 Minimize Dependencies “Scrutinize all dependency additions”
JLBP-1 Minimize Dependency Scope “When you do add a dependency,
keep it scoped as narrowly as possible”
JLBP-1 “Prefer JDK classes where available” “For any given functionality,
pick exactly one library”
JLBP-1 Separate the tool classpath from the product classpath
JLBP-11 Keep dependencies up to date
JLBP-11 “Release no later than 6 weeks after any of
your dependencies releases a higher version”
JLBP-11 “Staying up to date is also important to ensure
that security fixes are rolled out promptly”
JLBP-15 Publish a BOM for multi-module projects
JLBP-16 Ensure upper version alignment of dependencies for consumers
JLBP-16 “The version of each dependency added to the classpath
should the highest version in the dependency tree”
Common problems with Java dependencies
Compilation failure [ERROR] bad class file: /Users/skywalker/.m2/repository/org/apache/iceberg/iceberg-api/1.9. 2/iceberg-api-1.9.2.jar(org/apache/iceberg/IcebergBuild.class) [ERROR] class
file has wrong version 55.0, should be 52.0
class file has wrong version 61.0, should be 52.0
Dependency misalignment jackson-databind:2.19.2 jackson-core:2.19.0
Scala sadness jackson-module-scala_2.12-2.19.2.jar jackson-module-scala_2.13-2.19.2.jar 🚩 what if both of these
jars are on the classpath?
🔵 dependencyConvergence 🔵 requireUpperBoundDeps 🔵 banDuplicateClasses Maven Enforcer plugin
Gradle Enforcer plugin
Let’s talk about OpenRewrite
OpenRewrite recipes 🟢 AddDependency 🟢 RemoveDependency 🟢 ChangeDependency 🟢 UpgradeDependencyVersion
Let’s talk about Jackson
Real world scenario Jackson 2.x → Jackson 3.x
Jackson library
Jackson upgrade demo
GitHub Copilot Agent
GitHub Copilot Agent
OpenRewrite recipe
Final thoughts
🟢 Build often 🟢 Release often 🟢 Ownership 🟢 consider
OpenRewrite for complex migrations
Questions?
The End
Bonus
Let’s talk about Netty
Netty dependencies 🔵 some Netty artifacts are platform dependent 🔵
use artifact classifiers
Example: artifact <classifier> Linux x86
Linux ARM 64 Example: artifact <classifier>
DPE Summit 2025: From Lag to Lightning Aubrey Chipman and
Roberto Perez Alcolea
JConf 2022 : Dependency management Roberto Perez Alcolea
Devnexus 2021 Taming Java Dependencies @ Google Stephanie Wang
David Handermann [ exceptionfactory.com ]
Let’s talk about JCenter
JCenter repository end-of-life
None
“At the end of the sunset, all JCenter requests will
automatically be redirected to Maven Central and served from there.”
Forcing gradle to check for updated versions ./gradlew build --refresh-dependencies
None
None