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
77
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
380
Docker Imageについてほんの少しだけ詳しくなれるかも知れない話
iwhammy
1
2.5k
多数決のすゝめ
iwhammy
0
94
Other Decks in Technology
See All in Technology
データ分析力を高めるSQL研修サービス『SQL Everyone』
hikarut
1
390
[2024년 5월 세미나] 생성형 AI와 함께하는 데이터 분석가 커리어
datarian
0
1.2k
Taking Flight with Tailwind CSS
opdavies
0
4.3k
パフォーマンス最適化のベストプラクティス
databricksjapan
0
200
大規模言語モデル (LLM)における低精度数値表現
pfn
PRO
3
830
iThome2024 Wailing Wall of Enterprise Security
notsurprised
0
300
AWS アーキテクチャ作図入門/aws-architecture-diagram-101
ma2shita
16
6.7k
個人的、Kubernetes の最新注目機能! (2024年5月版) / TechFeed Experts Night#28 〜 コンテナ技術最前線
pfn
PRO
3
210
NewSQL Landscape
oracle4engineer
PRO
5
3.2k
知識と実践を紡ぐGenAI / Connecting Knowledge and experience with GenAI
aki_moon
2
180
令和版ソフトウェアエンジニアの情報収集術 PHPカンファレンス香川2024
ysknsid25
4
900
日本が誇るイタリアのダンスミュージック!? ユーロビートって何??
minorun365
PRO
2
230
Featured
See All Featured
Six Lessons from altMBA
skipperchong
22
3k
ParisWeb 2013: Learning to Love: Crash Course in Emotional UX Design
dotmariusz
104
6.7k
[RailsConf 2023] Rails as a piece of cake
palkan
29
4.1k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
358
22k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
117
18k
KATA
mclloyd
16
12k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
660
120k
Adopting Sorbet at Scale
ufuk
69
8.6k
Building a Modern Day E-commerce SEO Strategy
aleyda
22
6.5k
Making Projects Easy
brettharned
109
5.5k
It's Worth the Effort
3n
180
27k
For a Future-Friendly Web
brad_frost
172
9k
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