[ARCHETYPE-552] Erroneous Inheritance Cycle Generated By Archetype Plugin

Đang mở
#770 1 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
35/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

Hướng nghiên cứu

Bắt đầu với dự án archetype tối giản đính kèm và chạy mvn install. Kiểm tra target/test-classes/projects/it-basic/project/example-project/example-project-parent/pom.xml, nơi parent POM được tạo không chính xác chứa aggregator parent. Hoàn tất khi dự án được tạo không còn chứa parent element đó hoặc inheritance cycle, đồng thời vẫn là một dự án Maven hoạt động được.

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

Mô tả

bug priority:major

Scott MacDonald opened ARCHETYPE-552 and commented

When developing a multi module archetype with a root level aggregator pom which inherits from a sibling parent within the project,  the archetype generated project will incorrectly add the aggregator pom as a parent in the sibling parent pom file, causing an inheritance cycle in the generated project.

Attached is a zip file containing a minimal archetype project that demonstrates the behavior.

After running mvn install,   you can inspect target/test-classes/projects/it-basic/project/example-project/example-project-parent/pom.xml  and see that the generated project incorrectly adds the top-level aggregate pom  as a parent in the parent pom causing an inheritance cycle, even though such a parent designation is  not specified in the archetype resources.

 

The exact element that is incorrectly added to target/test-classes/projects/it-basic/project/example-project/example-project-parent/pom.xml is below..

    <parent>
    <artifactId>example-project-aggregator</artifactId>
    <groupId>com.foo</groupId>
    <version>0.0.0</version>
  </parent>

 

After the failure, removing the  incorrect parent pom element from the  target/test-classes/projects/it-basic/project/example-project/example-project-parent/pom.xml results in a working  maven project. 

 

 


Affects: 3.0.1

Attachments:

Ngôn ngữ chính
Java
Star
147
Fork
186
Merge trung bình
11 giờ 43 phút
Pull request đã merge (30 ngày)
35

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-archetype

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

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.