かなりの依存関係を持つマルチモジュール ビルドがあります。各サブプロジェクトには独自の依存関係レポートがあり、他のすべてのプロジェクトに (推移的に) 依存する 1 つのプロジェクトがあります。現在、ライセンス情報が欠落している多くの依存関係があります。これらの不足しているすべてのライセンスを依存関係レポートに含めたいと思います。しかし、私はこれを機能させることができないようです。誰にも提案はありますか?
私が現在試していることは次のとおりです。
- 親プロジェクトでは、「eula」、「potix_eula」、「bsd_pgsql」などのさまざまなサードパーティ ライセンスを定義し、これらの名前のサブディレクトリを追加して src/license に定義しました。
- これらのディレクトリには、ライセンス用の header.txt および license.txt ファイルがあります。
- この src/license ディレクトリには、「potix_eula=potix_eula」などのエントリを持つ licenses.properties があります。
- この src/license ディレクトリには、次のようなエントリを持つ licenses.xml もあります
<dependency> <groupId>org.postgresql</groupId> <artifactId>jdbc4</artifactId> <licenses><license><name>bsd_pgsql</name></license></licenses> </dependency>
- 親プロジェクトの pom で、license-maven-plugin を構成します。
<plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>license-maven-plugin</artifactId> <version>1.5</version> <configuration> <useMissingFile>true</useMissingFile> <licensesConfigFile>C:/eclipse-workspace-kepler/TheParentProject/src/license/licenses.xml</licensesConfigFile> <licenseName>zk_potix_eula</licenseName> <licenseName>bsd_pgsql</licenseName> <licenseResolver>file://${project.basedir}/src/license</licenseResolver> <licenseMerges>...</licenseMerges> </configuration> <executions> <execution> <id>first</id> <goals> <goal>update-file-header</goal> </goals> <phase>process-sources</phase> </execution> <execution> <id>download-licenses</id> <phase>process-resources</phase> <goals> <goal>download-licenses</goal> </goals> </execution> <execution> <id>add-third-party</id> <phase>process-resources</phase> <goals> <goal>aggregate-add-third-party</goal> </goals> </execution> </executions> </plugin>
- すべてのプロジェクトで THIRD-PARTY.properties を生成し、次のようにライセンスを定義しました: commons.apache.org--commons-configuration--1.7=apache_v2
- また、src/license ディレクトリを親からモジュールのすべての src ディレクトリにコピーしようとしました。それでもうまくいきません。