java - 无法构建 Maven 项目,并出现以下 Maven 错误 org.codehaus.mojo :license-maven-plugin:1. 12:check-file-header

标签 java maven m2eclipse kylo

我正在尝试在Windows平台上使用eclipse和m2e构建Kylo v_0.9.1。但项目构建在 kylo-operational-metadata-jpa 处失败并抛出以下错误。

[INFO] ------------------------------------------------------------------------

[INFO] Building kylo-operational-metadata-jpa 0.9.1.2-SNAPSHOT

[INFO] ------------------------------------------------------------------------

[INFO] 

[INFO] --- apt-maven-plugin:1.1.3:process (default) @ kylo-operational-metadata-jpa ---

[INFO] 
[INFO] --- license-maven-plugin:1.12:update-file-header (first) @ kylo-operational-metadata-jpa ---
[WARNING] The failOnMissingHeader has no effect if the property dryRun is not set.
[WARNING] The failOnNotUptodateHeader has no effect if the property dryRun is not set.

[INFO] adding extra resolver file:/C:/Users/kylo_0_9_1/kylo/core/operational-metadata/operational-metadata-jpa/../../../license-config

[WARNING] The extension sql is already accepted for comment style sql

[INFO] Will search files to update from root C:\Users\kylo_0_9_1\kylo\core\operational-metadata\operational-metadata-jpa\target\generated-sources

[INFO] Scan 52 files header done in 1.089s.

[INFO] 
 * add header on 52 files.

[INFO] 

[INFO] --- license-maven-plugin:1.12:check-file-header (first) @ kylo-operational-metadata-jpa ---

[INFO] adding extra resolver file:/C:/Users//kylo_0_9_1/kylo/core/operational-metadata/operational-metadata-jpa/../../../license-config

[WARNING] The extension sql is already accepted for comment style sql

[INFO] Will search files to update from root 



[ERROR] Failed to execute goal org.codehaus.mojo:license-maven-plugin:1.12:check-file-header (first) on project kylo-operational-metadata-jpa:

[ERROR] There are 52 file(s) with header to update:    `

最佳答案

License Maven Plugin正在检测一些没有 header 的文件,因此引发错误。您可以通过运行以下命令来修复此问题:

$ mvn license:update-file-header

这应该将 header 添加到丢失的文件中。然后您可以再次尝试构建。

关于java - 无法构建 Maven 项目,并出现以下 Maven 错误 org.codehaus.mojo :license-maven-plugin:1. 12:check-file-header,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52094358/

相关文章:

java - Android 客户端 - Java 服务器应用程序

java - 为什么将 System.nanoTime() 转换为 Calendar 对象会给我错误的当前日期?

java - 如果 Date 已被大多数弃用,而我们要使用 Calendar,那么 DateFormat 类的等效项是什么?

java - Maven:打包复制文件夹后复制粘贴WEB-INF到根目录

eclipse - 我在m2eclipse上有构建错误,但在命令行上没有maven2 -我的m2eclipse配置错误吗?

java - 如何解决java.util.NoSuchElementException : for HashMaps and ArrayLists?

java - jaxws-maven-plugin 多次执行不起作用

java - 在 Webstart/JNLP 中部署 JavaFX

java - MacOS : Workspace defines a VM that does not contain a valid jre/lib/rt. jar 上的 Maven 警告

java - 如何在 Eclipse 中更新 Maven 存储库?