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

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

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

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

評価

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

調査の方向性

添付された最小限の archetype プロジェクトから始めて、mvn install を実行します。target/test-classes/projects/it-basic/project/example-project/example-project-parent/pom.xml を調べると、生成された parent POM に aggregator parent が誤って含まれています。完了条件は、生成されたプロジェクトにその parent element も inheritance cycle も存在せず、動作する Maven プロジェクトであり続けることです。

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

説明

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:

主要言語
Java
スター
147
フォーク
186
平均マージ
11時間 43分
マージ済み PR(30日)
35

環境構築

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

はじめの一歩

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

apache/maven-archetype のほかの issue

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

似ている issue

Java の issue をもっと見る

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

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