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
170
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
600
Docker Imageについてほんの少しだけ詳しくなれるかも知れない話
iwhammy
1
4.3k
多数決のすゝめ
iwhammy
0
140
Other Decks in Technology
See All in Technology
ルールやカスタム機能、どう活かす?ハンズオンで体感するIBM Bobの出力コントロール
muehara
1
130
Oracle AI Database@AWS:サービス概要のご紹介
oracle4engineer
PRO
4
2.9k
Socrates × Looker 〜セマンティックレイヤーで進化するデータ分析エージェント〜
hanon52_
3
2.1k
脆弱性対応、どこで線を引くか
rymiyamoto
0
370
非定型業務をAI slackbotで自動化する ~ 社内要望を自動壁打ちするbotを作った ~/automating-ad-hoc-work-with-ai-slackbot
shibayu36
0
610
AmazonRoute 53ではじめてのドメイン取得!HTTPS化までの道のりを整理してみた
usanchuu
3
130
ACE-Step-1.5で見る 音楽生成AIのしくみと“破綻だけ直す”Retake機能の開発【zennfes spring 2026 登壇資料】
personabb
1
130
2026TECHFRESH畢業分享會 - 原生還是跨平台? App 開發踩坑實錄
line_developers_tw
PRO
0
820
2026TECHFRESH畢業分享會 - 葬送的通靈師:化系統與用戶雜訊成行動訊號
line_developers_tw
PRO
0
810
AI駆動開発を通して感じた、 AI時代のデザイナーの役割変化
whisaiyo
0
250
【Cyber-sec+】経営層を"動かす"ための考え方
hssh2_bin
0
130
SIer20年! 培ったスキルがスタートアップで輝く時
shucho0103
0
840
Featured
See All Featured
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.5k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
300
VelocityConf: Rendering Performance Case Studies
addyosmani
333
25k
Documentation Writing (for coders)
carmenintech
77
5.4k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
200
The Curious Case for Waylosing
cassininazir
1
380
The Limits of Empathy - UXLibs8
cassininazir
1
350
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
1
2.7k
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
610
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
220
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
150
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.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