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
hoplite、使ってみませんか?〜自作Maven Pluginを添えて〜
Search
i-whammy
January 16, 2023
Technology
180
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
hoplite、使ってみませんか?〜自作Maven Pluginを添えて〜
i-whammy
January 16, 2023
More Decks by i-whammy
See All by i-whammy
1_on_1から始まるアジャイル組織の第一歩
iwhammy
1
630
Docker Imageについてほんの少しだけ詳しくなれるかも知れない話
iwhammy
1
4.4k
多数決のすゝめ
iwhammy
0
140
Other Decks in Technology
See All in Technology
初めてのGitHub Actions / GitHub Actions at First
tooppoo
0
140
20260722_品質と開発生産性の相互作用
magicpod
0
130
クラウドセキュリティ入門 ~安全なクラウド利用のための基礎知識~
lhazy
8
7.5k
LLMリーダーボードアップデートに向けたAgentic Math_SWEのトレースについて
nejumi
0
210
『モンスターストライク』 の運営に伴走する! データ民主化への 解析グループの3つのアプローチ
mixi_engineers
PRO
0
230
PLaMoを毎日の開発で使い育てていく
pfn
PRO
0
180
サイバー捜査員研修(後半)
nomizone
1
570
今こそ聞きたいソフトウェア設計 ドメイン駆動設計再入門
masuda220
PRO
16
5k
SnowflakeCoCoでデータエンジニアリング!
foursue
0
170
Service Connect 上のサービスに ECS Service の外側から到達できなかった話
ota1022
1
110
オートロックマンションなのに、各部屋は施錠なし!? 攻撃者が組織内ネットワークで大暴れする理由 / The Front Door Is Locked, but the Rooms Are Wide Open: Why Attackers Move Freely Inside Enterprise Networks
nttcom
0
1.5k
Retriever と Reranker、結局どうする?
kazuaki
2
650
Featured
See All Featured
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
66
57k
Fireside Chat
paigeccino
42
4k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
270
Site-Speed That Sticks
csswizardry
13
1.4k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
How Software Deployment tools have changed in the past 20 years
geshan
1
34k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Music & Morning Musume
bryan
47
7.3k
Abbi's Birthday
coloredviolet
3
9.1k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.5k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
1.1k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.5k
Transcript
hoplite、使ってみ ませんか? 〜自作Maven Pluginを添えて〜 @i-whammy
自己紹介 - @i-whammy - ソフトウェアエンジニア - 好きなプログラミング言語 - Kotlin -
Clojure - 好きなXPのプラクティス - テスト駆動開発 - 好きなロードバイクのブランド - Chapter2 - Colnago
あるところに、KotlinのConfiguration用ライブラリ (メンテナンスが止まっている)があった。
そこでhoplite、使ってみませんか? https://github.com/sksamuel/hoplite
> Hoplite is a Kotlin library for loading configuration files
into typesafe classes in a boilerplate-free way. = 設定ファイルを型安全なクラスとしてロードできる、 ボイラープレート不要な、Kotlinのライブラリ
sample.properties Sample.kt
主な機能 - 多様なファイルフォーマット対応 - Json, Yaml, Toml, Hocon, Java Properties
- リッチなDecoder - ファイル上の値をJDKの型、値にマッピング - e.g.) "true", "t", "1", "yes" -> true - e.g.) UUIDの文字列 -> java.util.UUID - 実行時のエラー出力が分かりやすい - Kotlin objectよりData Classの方が扱いやすい(主観です) and so on
みんなもhopliteでHappy config life!
None
……本当にそれでいいのか?
メンテナンスが止まったライブラリって 未然に気付けないのか
それに近いことはできる
versions:display-dependency-updates plugin - MavenのVersions Pluginの一つ - pom.xmlに記載されたバージョンより新しいアーティファク トが利用可能な場合教えてくれる
None
「アップデートがあるアーティファクトと その最新のバージョン」は分かるが、 「そのアーティファクトが 最後にいつリリースされたか」は分からない
それらしいものは見つからなかった
なきゃ作ればいい
https://github.com/i-whammy/mvn-outdated
今できること - Projectで利用しているアーティファクトの中で、リモートリポジトリ上に 最後に公開された日付が分かる - 優先順位はpom.xml内の<repository>タグに従う - (本当はもう少し細かいルールがあるが、今はここまで) - 最後にリリースされた日付から一定期間経過したアーティファクトの一
覧が分かる - 今は1年を固定の閾値にしている - 今後は閾値をオプションで可変にする予定
デモします
結論 maven-pluginを自分で作ると面白い
None
参考 - https://github.com/npryce/konfig - https://github.com/sksamuel/hoplite - https://www.mojohaus.org/versions/versions-maven-pl ugin/display-dependency-updates-mojo.html - https://github.com/i-whammy/mvn-outdated