feat: Maven プラグインを追加する - #16
Merged
Merged
Conversation
gradle-plugin と maven-plugin が同じ ID を必要とするため、リテラルの二重管理を避けて ルートの gradle.properties を正とし、生成 Coordinates 経由で参照させる。 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
kotlin-maven-plugin の拡張(KotlinMavenPluginExtension)として maven-plugin モジュールを追加し、 compile / test-compile の双方へコンパイラプラグインを適用する。コンパイラプラグイン本体は 本成果物の推移依存として配るため、利用側の宣言は 1 つで足りる。 プロジェクト既定の label ケースはプロパティ sealed-class-enumizer.labelCase から常に具体値で オプションへ伝達する。実行単位の <pluginOptions> に同じ指定がある場合は何も渡さない (コンパイラのオプションは複数指定を受け付けないため、抑止によって優先関係を作る)。 runtime-api の自動追加は行わない。Maven では拡張からプロジェクト依存を追加できず、 追加にはビルド拡張の別途宣言を要するため、利用側が依存として宣言する。 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
integration-test に maven-integration モジュールを追加し、apache-maven の配布物を依存として 取得して実ビルドを駆動する(ホストへの Maven インストールを前提にしない。起動は zip 展開で 実行権限が落ちる bin スクリプトではなく classworlds の Launcher を直接叩く)。 適用範囲(production / test)・label ケースの決定と優先順位・診断と設定不正のビルド失敗を 実ビルドで固定する。Maven のローカルリポジトリはテスト専用の場所へ隔離し、本プロジェクトの 成果物だけを複製する(既定の ~/.m2/repository を使うと、Gradle module metadata を伴わない 成果物がそこへ入り、mavenLocal() を宣言する TestKit フィクスチャの variant 解決を壊すため)。 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
integration-modules から重いテストを外し、maven-integration を専用ジョブで実行する。 Maven がテスト専用ローカルリポジトリへ取得する第三者依存をキャッシュする。 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
概要へモジュールと配布の記述、テスト戦略へ次元 K17(ビルドツール)と maven-integration、 ケース06 へ Maven ビルドのケース(BLD-49〜53)、フィクスチャ構成へ Maven フィクスチャと運用方針、 保留の V8 環境マトリクスへ Maven の実測済み範囲、README へ Maven の Setup を追加する。 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
gradle-plugin と同等の機能を Maven でも提供する。
追加
maven-pluginsealed-class-enumizer-maven-plugin。kotlin-maven-plugin の拡張(KotlinMavenPluginExtension)であり Mojo ではない。Plexus の role-hint = 利用者が<compilerPlugins>へ書くsealed-class-enumizerintegration-test/maven-integrationgradle-plugin との対応
<compilerPlugins>記載で compile / test-compile 双方SubpluginArtifactsealed-class-enumizer.labelCase・常に具体値テスト
LabelCase一致結合テストで 2 件の欠陥を検出して修正済み。
labelCaseは複数指定を受け付けないため、<pluginOptions>併用時にビルドが失敗していた(拡張側が渡さない形にして優先関係を成立させた)~/.m2/repository)だと、Gradle module metadata を伴わない成果物が入り、mavenLocal()を宣言する TestKit フィクスチャの variant 解決を壊していた(テスト専用リポジトリへ隔離した)未対応
docs/チェックリスト.md(未追跡の作業用資料)への 4 成果物化の反映は作業ツリーに残してある。🤖 Generated with Claude Code