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
0
120
hoplite、使ってみませんか?〜自作Maven Pluginを添えて〜
i-whammy
January 16, 2023
Tweet
Share
More Decks by i-whammy
See All by i-whammy
1_on_1から始まるアジャイル組織の第一歩
iwhammy
1
490
Docker Imageについてほんの少しだけ詳しくなれるかも知れない話
iwhammy
1
3.7k
多数決のすゝめ
iwhammy
0
120
Other Decks in Technology
See All in Technology
newmo の創業を支える Software Architecture と Platform Engineering
110y
1
390
genspark_presentation.pdf
haruki_uiru
1
240
SaaS公式MCPサーバーをリリースして得た学び
kawamataryo
1
340
正式リリースされた Semantic Kernel の Agent Framework 全部紹介!
okazuki
1
1k
MySQL Indexes and Histograms – How they really speed up your queries
lefred
0
160
Dataverseの検索列について
miyakemito
1
190
使えるデータ基盤を作る技術選定の秘訣 / selecting-the-right-data-technology
pei0804
5
850
DjangoCon Europe 2025 Keynote - Django for Data Science
wsvincent
0
530
Global Azure2025(GitHub Copilot ハンズオン)
tomokusaba
2
720
Gateway H2 モジュールで スマートホーム入門
minoruinachi
0
140
AWSを利用する上で知っておきたい名前解決の話
nagisa53
6
790
20 Years of Domain-Driven Design: What I’ve Learned About DDD
ewolff
1
310
Featured
See All Featured
The Cult of Friendly URLs
andyhume
78
6.3k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
30
2.3k
The Power of CSS Pseudo Elements
geoffreycrofte
75
5.8k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
45
7.2k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
30
2k
Six Lessons from altMBA
skipperchong
28
3.8k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
14
1.5k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
160
15k
Designing Experiences People Love
moore
142
24k
How to Think Like a Performance Engineer
csswizardry
23
1.6k
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