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

Đang mở
#836 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
38/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
java
Lĩnh vực
build-system, tooling

Hướng nghiên cứu

Bắt đầu với JavaAnnotationsMojoDescriptorExtractor.java và PluginDescriptorFilesGenerator.java, sau đó xem xét các đường dẫn package annotation v3 và v4 được nêu trong issue. Được xem là hoàn tất khi các phiên bản annotation trộn lẫn và các yêu cầu Maven không khớp làm build thất bại, trong khi annotation v3 không thể tạo descriptor 2.0 và annotation v4 yêu cầu Maven 4 trở lên.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
Java
Star
63
Fork
78
Merge trung bình
1 ngày 4 giờ
Pull request đã merge (30 ngày)
23

Chuẩn bị môi trường

  • Không có Dockerfile hay tệp Docker Compose
  • Có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của apache/maven-plugin-tools

Tất cả issue của apache/maven-plugin-tools

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.