白紙の状態からすべてのプロジェクトを構築するために、集約 POM を作成しようとしています。親プロジェクトと 2 つのコード プロジェクトがあるとします。これらはすべて異なるソース ツリーにあります。
親:
<groupId>com.example</groupId>
<artifactId>parent</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>pom</packaging>
プロジェクト A:
<parent>
<groupId>com.example</groupId>
<artifactId>parent</artifactId>
<version>1.0-SNAPSHOT</version>
<relativePath/>
</parent>
<artifactId>project-A</artifactId>
<packaging>jar</packaging>
プロジェクト B:
<parent>
<groupId>com.example</groupId>
<artifactId>parent</artifactId>
<version>1.0-SNAPSHOT</version>
<relativePath/>
</parent>
<artifactId>project-B</artifactId>
<packaging>jar</packaging>
今、私は別のアグリゲーター POM を作成して、これらすべてを一緒に構築しようとしています。
<groupId>com.example</groupId>
<artifactId>aggregator</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
<module>path/to/parent</module>
<module>path/to/project-A</module>
<module>path/to/project-B</module>
</modules>
mvn clean install
リアクタが2 つのコード プロジェクトの をaggregator
見つけられないため、プロジェクトの実行は失敗します。<parent>
理由は明らかです。parent
プロジェクトはリアクターの一部であるため、ビルドの開始時にアーティファクトは存在しません。
この原子炉のビルドを達成する方法はありますか?