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
130
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
520
Docker Imageについてほんの少しだけ詳しくなれるかも知れない話
iwhammy
1
3.9k
多数決のすゝめ
iwhammy
0
120
Other Decks in Technology
See All in Technology
地図と生成AI
nakasho
0
700
2025/07/22_家族アルバム みてねのCRE における生成AI活用事例
masartz
2
110
Railsの限界を超えろ!「家族アルバム みてね」の画像・動画の大規模アップロードを支えるアーキテクチャの変遷
ojima_h
3
390
QuickBooks®️ Customer®️ USA Contact Numbers: Complete 2025 Support Guide
qbsupportinfo
0
110
Semantic Machine Intelligence for Vision, Language, and Actions
keio_smilab
PRO
2
390
複数のGemini CLIが同時開発する狂気 - Jujutsuが実現するAIエージェント協調の新世界
gunta
12
3.2k
AIを使っていい感じにE2Eテストを書けるようになるまで / Trying to Write Good E2E Tests with AI
katawara
3
1.6k
大規模組織にAIエージェントを迅速に導入するためのセキュリティの勘所 / AI agents for large-scale organizations
i35_267
6
220
AI Ready API ─ AI時代に求められるAPI設計とは?/ AI-Ready API - Designing MCP and APIs in the AI Era
yokawasa
21
5.8k
Microsoft Defender XDRで疲弊しないためのインシデント対応
sophiakunii
3
400
claude codeでPrompt Engineering
iori0311
0
440
SAE J1939シミュレーション環境構築
daikiokazaki
0
150
Featured
See All Featured
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
45
7.5k
Building Flexible Design Systems
yeseniaperezcruz
328
39k
Large-scale JavaScript Application Architecture
addyosmani
512
110k
Rebuilding a faster, lazier Slack
samanthasiow
83
9.1k
BBQ
matthewcrist
89
9.7k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.4k
Designing for humans not robots
tammielis
253
25k
Faster Mobile Websites
deanohume
308
31k
YesSQL, Process and Tooling at Scale
rocio
173
14k
KATA
mclloyd
30
14k
Java REST API Framework Comparison - PWX 2021
mraible
31
8.7k
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