无法执行目标org.apache.rat:apache-rat-plugin:0.10:检查(检查)项目maven:具有未批准许可证的文件太多:2请参阅RAT报告

时间:2017-08-12 22:30:58

标签: maven xerces

我正在尝试编译一些maven reversions项目。不幸的是,我收到了错误:

  Failed to execute goal org.apache.rat:apache-rat-plugin:0.10:check (check) on project maven: Too many files with unapproved license: 2 See RAT report 

有人建议跳过检查,所以我使用命令

  mvn -X -Drat.skip=true compile
  mvn -X -Drat.skip=true test-compile

我也试过

-Drat.numUnapprovedLicense=100
-Dlicense.skip=true
-Drat.ignoreErrors=true

使用跳过工作进行少量回复,但现在即使使用跳过,我仍然会收到此错误。

这是堆栈跟踪:

[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO] 
[INFO] Apache Maven
[INFO] Maven Model
[INFO] Maven Artifact
[INFO] Maven Plugin API
[INFO] Maven Model Builder
[INFO] Maven Settings
[INFO] Maven Settings Builder
[INFO] Maven Repository Metadata Model
[INFO] Maven Aether Provider
[INFO] Maven Core
[INFO] Maven Compat
[INFO] Maven Embedder
[INFO] Apache Maven Distribution
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building Apache Maven 3.2.4-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-enforcer-plugin:1.3.1:enforce (enforce-bytecode-version) @ maven ---
[INFO] 
[INFO] --- maven-enforcer-plugin:1.3.1:enforce (ban-known-bad-maven-versions) @ maven ---
[INFO] 
[INFO] --- apache-rat-plugin:0.10:check (check) @ maven ---
[INFO] 63 implicit excludes (use -debug for more details).
[INFO] Exclude: src/test/resources*/**
[INFO] Exclude: src/test/projects/**
[INFO] Exclude: src/test/remote-repo/**
[INFO] Exclude: **/*.odg
[INFO] Exclude: bootstrap/**
[INFO] Exclude: README.bootstrap.txt
[INFO] Exclude: .repository/**
[INFO] Exclude: .maven/spy.log
[INFO] 12 resources included (use -debug for more details)
Warning: org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser: Property 'http://www.oracle.com/xml/jaxp/properties/entityExpansionLimit' is not recognized.
Compiler warnings:
  WARNING:  'org.apache.xerces.jaxp.SAXParserImpl: Property 'http://javax.xml.XMLConstants/property/accessExternalDTD' is not recognized.'
Warning: org.apache.xerces.parsers.SAXParser: Feature 'http://javax.xml.XMLConstants/feature/secure-processing' is not recognized.
Warning: org.apache.xerces.parsers.SAXParser: Property 'http://javax.xml.XMLConstants/property/accessExternalDTD' is not recognized.
Warning: org.apache.xerces.parsers.SAXParser: Property 'http://www.oracle.com/xml/jaxp/properties/entityExpansionLimit' is not recognized.
[INFO] Rat check: Summary of files. Unapproved: 2 unknown: 2 generated: 0 approved: 6 licence.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] Apache Maven ....................................... FAILURE [  0.725 s]
[INFO] Maven Model ........................................ SKIPPED
[INFO] Maven Artifact ..................................... SKIPPED
[INFO] Maven Plugin API ................................... SKIPPED
[INFO] Maven Model Builder ................................ SKIPPED
[INFO] Maven Settings ..................................... SKIPPED
[INFO] Maven Settings Builder ............................. SKIPPED
[INFO] Maven Repository Metadata Model .................... SKIPPED
[INFO] Maven Aether Provider .............................. SKIPPED
[INFO] Maven Core ......................................... SKIPPED
[INFO] Maven Compat ....................................... SKIPPED
[INFO] Maven Embedder ..................................... SKIPPED
[INFO] Apache Maven Distribution .......................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.936 s
[INFO] Finished at: 2017-08-12T15:23:22-07:00
[INFO] Final Memory: 17M/277M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.rat:apache-rat-plugin:0.10:check (check) on project maven: Too many files with unapproved license: 2 See RAT report in: /tmp/12311_1502575092/target/rat.txt -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.rat:apache-rat-plugin:0.10:check (check) on project maven: Too many files with unapproved license: 2 See RAT report in: /tmp/12311_1502575092/target/rat.txt
at             org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.rat.mp.RatCheckException: Too many files with unapproved license: 2 See RAT report in: /tmp/12311_1502575092/target/rat.txt
at org.apache.rat.mp.RatCheckMojo.check(RatCheckMojo.java:183)
at org.apache.rat.mp.RatCheckMojo.execute(RatCheckMojo.java:171)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
... 20 more
[ERROR] 
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] 
http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

任何解决此错误的建议。

谢谢

1 个答案:

答案 0 :(得分:0)

以下命令在我的情况下有效。

mvn clean install -Drat.numUnapprovedLicenses=100