すべてのモジュールが共通のライセンス (Apache 2.0) を共有するマルチモジュール プロジェクトに取り組んでいます。ここで、すべてのソース ファイルにヘッダーを追加し、これを親の pom.xml (パッケージ タイプは pom) で構成したいと考えています。
ベースディレクトリにフォルダーを作成し、私が述べた場所にlicense
ファイルを追加しました。また、2 つのファイルと. ここで、次のプラグインを親 pom に追加しました。licenses.properties
apache_2_0=apache_2_0
apache_2_0
header.txt
license.txt
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>license-maven-plugin</artifactId>
<version>1.5</version>
<configuration>
<licenseName>apache_2_0</licenseName>
<licenseResolver>${project.basedir}/license</licenseResolver>
</configuration>
<executions>
<execution>
<goals>
<goal>update-file-header</goal>
</goals>
<phase>process-sources</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
ただし、これを実行すると、次のエラー メッセージが表示されます。
[エラー] プロジェクト (myproject) で目標 org.codehaus.mojo:license-maven-plugin:1.5:update-file-header (default) を実行できませんでした: ライセンス リポジトリを取得できませんでした: 不明なプロトコル: c -> [ヘルプ1]
ただし、次の例外があります。
java.net.MalformedURLException: 不明なプロトコル: c
私は何を間違っていますか?