すべてのライセンスを管理するライセンス プラグインをセットアップしようとしているマルチモジュールプロジェクトがあります。プロジェクトのセットアップは次のとおりです。
─── transfuse-project
├── examples
│ ├── helloAndroid
│ │ ├── pom.xml
│ │ ├── ...
│ ├── integrationTest
│ │ ├── pom.xml
│ │ ├── ...
│ ├── pom.xml
│ └── ...
├── transfuse
│ ├── pom.xml
│ ├── ...
├── transfuse-api
│ ├── pom.xml
│ ├── ...
├── NOTICE
└── pom.xml
各 pom.xml は、transfuse プロジェクトの pom.xml から継承されます。プロジェクト pom.xml で、関連するファイルに NOTICE を適用するライセンス プラグインをセットアップしました。
<plugin>
<groupId>com.mycila.maven-license-plugin</groupId>
<artifactId>maven-license-plugin</artifactId>
<version>1.9.0</version>
<configuration>
<header>NOTICE</header>
<includes>
<include>**/*.java</include>
<include>**/*.xml</include>
</includes>
<excludes>
<exclude>**/.*/**</exclude>
<exclude>target/**</exclude>
<exclude>**/AndroidManifest.xml</exclude>
</excludes>
<properties>
<year>2013</year>
<name>John Ericksen</name>
</properties>
<useDefaultExcludes>true</useDefaultExcludes>
<strictCheck>true</strictCheck>
</configuration>
<executions>
<execution>
<id>check-headers</id>
<phase>verify</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
この構成は、ルート (transfuse-project) から直接ビルドすると機能します。この問題は、integrationTest のサンプルまたは API を直接ビルドすると発生します。Maven は、プロジェクト ルートで提供した NOTICE ファイルを見つけることができません。
[ERROR] Failed to execute goal com.mycila.maven-license-plugin:maven-license-plugin:1.9.0:check (check-headers) on project transfuse-api: Some files do not have the expected license header -> [Help 1]
さらに悪いことに、別の依存関係の NOTICE ファイルが見つかります。mvn license:format
サブモジュールで実行すると、モジュールのすべてのヘッダーが依存関係の NOTICE ファイルに置き換えられます。
各サブモジュール内に NOTICE ファイルを追加してこの問題を修正し、各サブモジュール pom を独自のライセンス プラグインで構成できると思いますが、可能であればその重複を避けたいと思います。私のプロジェクトのセットアップで動作する構成またはセットアップはありますか?