Maven plugin: Maven 4 warns about Plexus `@Component` injection
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 78/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- java
- 領域
- build-system
調査の方向性
Start in plugin-maven/src/main/java/com/diffplug/spotless/maven/AbstractSpotlessMojo.java and inspect the four @Component fields: RepositorySystem, ResourceManager, BuildContext and MavenSession. Apply the issue’s MavenSession parameter and JSR-330 injection guidance, then run the plugin under Maven 4 and Maven 3. Done means the Maven 4 validation warning is gone while Maven 3 support remains.
索引モデルが issue の本文から書いたものです。
説明
Running spotless-maven-plugin 3.10.3 under Maven 4.0.0-rc-7 prints a plugin validation warning on every build:
[WARNING] * com.diffplug.spotless:spotless-maven-plugin:3.10.3
[WARNING] - Plugin uses Plexus Component requirements (@Component annotation). Use Maven 4 Dependency Injection (for v4 plugins) or JSR 330 annotations (for v3 plugins) to inject dependencies instead.
The source is the four @Component fields in plugin-maven/src/main/java/com/diffplug/spotless/maven/AbstractSpotlessMojo.java: RepositorySystem, ResourceManager, BuildContext and MavenSession.
A fix that keeps Maven 3 support:
MavenSessionis not a component; take it as@Parameter(defaultValue = "${session}", readonly = true).- Inject the other three with JSR-330 (
@Injecton a constructor or on the fields).
- 主要言語
- Java
- スター
- 5.7k
- フォーク
- 563
- 平均マージ
- 1日 18時間
- マージ済み PR(30日)
- 53
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
diffplug/spotless のほかの issue
-
google-java-format 1.37.0: NoSuchMethodError on JavaFormatterOptions$Style.valueOf (Style is now a record)対応中かも @Goooler が 2 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
diffplug/spotless#3126 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
diffplug/spotless#3125 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Add support for org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_record_parameterオープン
難易度 3/5 1〜2日 初心者へのやさしさ 67/100
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
diffplug/spotless の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
bancolombia/scaffold-clean-architecture#1002 ·
メンテナーはふだん 1 日以内に返信
-
CalendarEventAttendance/get returns eventAttendanceStatus while the doc says attendanceStatus対応中かも @chibenwa が今日担当しました。 オープンbug claude
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
linagora/tmail-backend#2697 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
apache/skywalking#14120 ·
メンテナーはふだん 1 日以内に返信
-
[BUG] Case-insensitive search suggestions miss items when the JVM default locale is Turkish対応中かも @thswlsqls が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
HMCL-dev/HMCL#6943 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信