我已按照Travis链接here中的所有步骤进行操作。
我的maven版本是
Apache Maven 3.0.4
Maven home: /usr/share/maven
Java version: 1.6.0_30, vendor: Sun Microsystems Inc.
Java home: /usr/lib/jvm/java-6-openjdk-amd64/jre
Default locale: en_IN, platform encoding: UTF-8
OS name: "linux", version: "3.2.0-60-generic", arch: "amd64", family: "unix"
当我尝试使用maven构建时出现此错误
[错误]无法执行目标org.neo4j.build.plugins:license-maven-plugin:3:检查(检查许可证)项目neo4j-kernel:某些文件没有预期的许可证标题 - > [帮助1] org.apache.maven.lifecycle.LifecycleExecutionException:无法执行目标org.neo4j.build.plugins:license-maven-plugin:3:check(check-licenses)项目neo4j-kernel:某些文件没有预期的许可证头
首先我尝试在Windows中构建,然后在ubuntu 12.04中,我都遇到了同样的错误。
以下是错误堆栈跟踪
[ERROR] Failed to execute goal org.neo4j.build.plugins:license-maven-plugin:3:check (check-licenses) on project neo4j-kernel: Some files do not have the expected license header -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.neo4j.build.plugins:license-maven-plugin:3:check (check-licenses) on project neo4j-kernel: Some files do not have the expected license header
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
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:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:622)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException: Some files do not have the expected license header
at com.google.code.mojo.license.LicenseCheckMojo.execute(LicenseCheckMojo.java:64)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more
现在我该如何解决这个问题?即使它与此SO here
中的错误相同答案 0 :(得分:0)
使用Java 7
首先构建community/license-check
子模块。
答案 1 :(得分:0)
在Windows上构建时,请使用-Dlicensing.skip
以避免与行结尾相关的问题。
可以跳过许可标头检查,方法是在命令行中附加以下内容:-Dlicense.skip=true