【问题标题】:Failed to build maven project with following maven error org.codehaus.mojo:license-maven-plugin:1.12:check-file-header无法构建 maven 项目并出现以下 maven 错误 org.codehaus.mojo:license-maven-plugin:1.12:check-file-header
【发布时间】:2018-08-30 10:05:40
【问题描述】:

我正在尝试在 Windows 平台上使用带有 m2e 的 eclipse 构建 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:    `

【问题讨论】:

    标签: java maven m2eclipse kylo


    【解决方案1】:

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

    $ mvn license:update-file-header
    

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

    【讨论】:

      【解决方案2】:

      Maven 输出表明您正在尝试构建 Kylo 0.9.2-SNAPSHOT,这是一个不稳定的版本,Kylo 团队不支持。

      要构建 Kylo 0.9.1,请尝试以下命令:

      git checkout v0.9.1.1
      mvn clean install -DskipTests
      

      【讨论】:

        猜你喜欢
        • 2012-09-28
        • 1970-01-01
        • 2019-01-27
        • 1970-01-01
        • 1970-01-01
        • 2013-05-01
        • 2016-09-27
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多