运行 Maven 安装时如何跳过许可证检查?
How do i skip the license check when running the maven install?
我 运行 在我从事的一个大型 Java 项目中 mvn clean install
,但由于某些文件没有适当的许可 headers,它一直失败。好吧,那不是我现在关心的问题,我该如何跳过它?我看到的实际错误是,
Failed to execute goal org.codehaus.mojo:license-maven-plugin:1.14:add-third-party (default) on project test-project: There are some dependencies with no license, please fill the file /Users/test-project/src/license/THIRD-PARTY.properties
我也试过这个maven命令,但是没用
mvn clean install -Dlicense.skip=true
尝试使用 -Dlicense.skipAddThirdParty=true
跳过 AddThirdParty mojo。
我发现这很有帮助
$ mvn license:help -Ddetail | fgrep skip
这给了我
-Dlicense.skipDownloadLicenses
您不需要添加 =true
因为只需定义它就足够了。
这个适合我
-Dlicense.skipCheckLicense
在我的例子中,它仅使用 -Dlicense.skip
,没有使用 =true
。
<plugin>
<groupId>com.mycila</groupId>
<artifactId>license-maven-plugin</artifactId>
<version>3.0</version>
</plugin>
我 运行 在我从事的一个大型 Java 项目中 mvn clean install
,但由于某些文件没有适当的许可 headers,它一直失败。好吧,那不是我现在关心的问题,我该如何跳过它?我看到的实际错误是,
Failed to execute goal org.codehaus.mojo:license-maven-plugin:1.14:add-third-party (default) on project test-project: There are some dependencies with no license, please fill the file /Users/test-project/src/license/THIRD-PARTY.properties
我也试过这个maven命令,但是没用
mvn clean install -Dlicense.skip=true
尝试使用 -Dlicense.skipAddThirdParty=true
跳过 AddThirdParty mojo。
我发现这很有帮助
$ mvn license:help -Ddetail | fgrep skip
这给了我
-Dlicense.skipDownloadLicenses
您不需要添加 =true
因为只需定义它就足够了。
这个适合我
-Dlicense.skipCheckLicense
在我的例子中,它仅使用 -Dlicense.skip
,没有使用 =true
。
<plugin>
<groupId>com.mycila</groupId>
<artifactId>license-maven-plugin</artifactId>
<version>3.0</version>
</plugin>