我正在尝试使用maven 3.2.5,JDK 1.7.0_72-b14,安装gpp(2.24)在Linux Mint 17 Qiana(32位)上构建pljava源代码,所有模块编译正常,除了一个:pl / java服务器端库。 堆栈跟踪是:
[ERROR] Failed to execute goal com.github.maven-nar:nar-maven-plugin:3.1.0:nar-compile (default-nar-compile) on project pljava-so: Execution default-nar-compile of goal com.github.maven-nar:nar-maven-plugin:3.1.0:nar-compile failed. NullPointerException -> [Help 1]org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.github.maven-nar:nar-maven-plugin:3.1.0:nar-compile (default-nar-compile) on project pljava-so: Execution default-nar-compile of goal com.github.maven-nar:nar-maven-plugin:3.1.0:nar-compile failed.
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:224)
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:120)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:355)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:216)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:160)
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:606)
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.maven.plugin.PluginExecutionException: Execution default-nar-compile of goal com.github.maven-nar:nar-maven-plugin:3.1.0:nar-compile failed.
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:143)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 19 moreCaused by: java.lang.NullPointerException
at com.github.maven_nar.cpptasks.gcc.GppLinker.isClang(GppLinker.java:317)
at com.github.maven_nar.cpptasks.gcc.GppLinker.addImpliedArgs(GppLinker.java:159)
at com.github.maven_nar.cpptasks.compiler.CommandLineLinker.createConfiguration(CommandLineLinker.java:153)
at com.github.maven_nar.cpptasks.compiler.AbstractLinker.createConfiguration(AbstractLinker.java:83)
at com.github.maven_nar.cpptasks.ProcessorDef.createConfiguration(ProcessorDef.java:200)
at com.github.maven_nar.cpptasks.CCTask.collectExplicitObjectFiles(CCTask.java:500)
at com.github.maven_nar.cpptasks.CCTask.execute(CCTask.java:647)
at com.github.maven_nar.NarCompileMojo.createLibrary(NarCompileMojo.java:433)
at com.github.maven_nar.NarCompileMojo.narExecute(NarCompileMojo.java:107)
at com.github.maven_nar.AbstractNarMojo.execute(AbstractNarMojo.java:329)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
... 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:
我该如何解决这个问题?
答案 0 :(得分:0)
在我的案例中(Debian),通过安装g++
包解决了这个问题。
我找到了解决方法here。
引用:
我在GppLinker.isClang中跟踪了问题,该问题试图调用" g ++ --version"。由于这是一个新VM,我仍然在确定需要安装的内容。在这种情况下,我还没有安装gcc-c ++包来获取g ++。
注意:我编译的来源已于2015-04-01签出。