[MPLUGIN-531] Fail the build if mixing v3 and v4 annotations and enforce v4 annotations when requiring Maven 4 or above

オープン
#836 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
38/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
java

調査の方向性

JavaAnnotationsMojoDescriptorExtractor.java と PluginDescriptorFilesGenerator.java から始め、その後、issue で示されている v3 および v4 のアノテーションパッケージパスを確認します。混在したアノテーションバージョンと一致しない Maven 要件によってビルドが失敗し、v3 アノテーションでは 2.0 ディスクリプターを生成できず、v4 アノテーションでは Maven 4 以上が必要になれば完了です。

索引モデルが issue の本文から書いたものです。

説明

enhancement

Konrad Windszus opened MPLUGIN-531 and commented

The https://github.com/apache/maven-plugin-tools/blob/master/maven-plugin-tools-annotations/src/main/java/org/apache/maven/tools/plugin/extractor/annotations/JavaAnnotationsMojoDescriptorExtractor.java should fail the build in case
v3 (1.0/1.1 descriptor, https://github.com/apache/maven-plugin-tools/tree/master/maven-plugin-annotations/src/main/java/org/apache/maven/plugins/annotations) and v4 (2.0 descriptor) annotations (https://github.com/apache/maven-plugin-tools/tree/master/maven-plugin-annotations/src/main/java/org/apache/maven/plugins/annotations) are mixed in a single project.

This leads to unexpected behaviour like Component no longer being evaluated among others.

Also it should not be possible to generate v2.0 descriptors with v3 annotations (currently possible via https://github.com/apache/maven-plugin-tools/blob/9332b09acc08d2e063f12a8158a57ca8ec56fadd/maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/PluginDescriptorFilesGenerator.java#L114). V3 annotations should only support requirements up to (excluding) Maven 4 and v4 annotations should require Maven 4 or above. If the Maven requirements don't match the used annotation package the build should fail as well.


Issue Links:

  • MPLUGIN-530 Deprecate o.a.m.plugins.annotations.Component

  • MPLUGIN-523 Split Maven3 and Maven4 support

  • MPLUGIN-532 Fail the build in case JSR330 annotations are used in v4 plugins

主要言語
Java
スター
63
フォーク
78
平均マージ
1日 4時間
マージ済み PR(30日)
23

環境構築

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

apache/maven-plugin-tools のほかの issue

apache/maven-plugin-tools の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。