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
110
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
470
Docker Imageについてほんの少しだけ詳しくなれるかも知れない話
iwhammy
1
3.5k
多数決のすゝめ
iwhammy
0
120
Other Decks in Technology
See All in Technology
Classmethod AI Talks(CATs) #16 司会進行スライド(2025.02.12) / classmethod-ai-talks-aka-cats_moderator-slides_vol16_2025-02-12
shinyaa31
0
110
(機械学習システムでも) SLO から始める信頼性構築 - ゆる SRE#9 2025/02/21
daigo0927
0
110
室長と気ままに学ぶマイクロソフトのビジネスアプリケーションとビジネスプロセス
ryoheig0405
0
360
利用終了したドメイン名の最強終活〜観測環境を育てて、分析・供養している件〜 / The Ultimate End-of-Life Preparation for Discontinued Domain Names
nttcom
2
190
2.5Dモデルのすべて
yu4u
2
860
管理者しか知らないOutlookの裏側のAIを覗く#AzureTravelers
hirotomotaguchi
2
400
急成長する企業で作った、エンジニアが輝ける制度/ 20250214 Rinto Ikenoue
shift_evolve
3
1.3k
AndroidデバイスにFTPサーバを建立する
e10dokup
0
250
RSNA2024振り返り
nanachi
0
580
全文検索+セマンティックランカー+LLMの自然文検索サ−ビスで得られた知見
segavvy
2
110
抽象化をするということ - 具体と抽象の往復を身につける / Abstraction and concretization
soudai
16
5.9k
モノレポ開発のエラー、誰が見る?Datadog で実現する適切なトリアージとエスカレーション
biwashi
6
810
Featured
See All Featured
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.1k
Rebuilding a faster, lazier Slack
samanthasiow
80
8.8k
Mobile First: as difficult as doing things right
swwweet
223
9.3k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
Into the Great Unknown - MozCon
thekraken
35
1.6k
Music & Morning Musume
bryan
46
6.3k
The Language of Interfaces
destraynor
156
24k
It's Worth the Effort
3n
184
28k
Visualization
eitanlees
146
15k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
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