gpt4 book ai didi

java - gwt-maven-plugin 失败并出现 NullPointerException

转载 作者:行者123 更新时间:2023-12-01 11:34:44 25 4
gpt4 key购买 nike

我已经下载了GWTP samples来自 github。

我尝试使用 Maven(mvn clean install)构建它,但我得到了:

[ERROR] Failed to execute goal org.codehaus.mojo:gwt-maven-plugin:2.7.0:compile (default) on project gwtp-sample-basic-spring: Execution default of goal org.codehaus.mojo:gwt-maven-plugin:2.7.0:compile failed. NullPointerException -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:gwt-maven-plugin:2.7.0:compile (default) on project gwtp-sample-basic-spring: Execution default of goal org.codehaus.mojo:gwt-maven-plugin:2.7.0:compile failed.
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:592)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:323)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:247)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:104)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:427)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:157)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:121)
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:483)
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)
at org.codehaus.classworlds.Launcher.main(Launcher.java:31)
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:483)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default of goal org.codehaus.mojo:gwt-maven-plugin:2.7.0:compile failed.
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:114)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:576)
... 20 more
Caused by: java.lang.NullPointerException
at org.codehaus.mojo.gwt.ClasspathBuilder.buildClasspathList(ClasspathBuilder.java:71)
at org.codehaus.mojo.gwt.AbstractGwtMojo.getClasspath(AbstractGwtMojo.java:223)
at org.codehaus.mojo.gwt.shell.CompileMojo.compile(CompileMojo.java:443)
at org.codehaus.mojo.gwt.shell.CompileMojo.doExecute(CompileMojo.java:415)
at org.codehaus.mojo.gwt.shell.AbstractGwtShellMojo.execute(AbstractGwtShellMojo.java:159)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:105)
... 21 more

目前我找不到任何有关 gwt-maven-plugin 的 NPE 的有用信息。我做错了什么?我应该从哪个方向找出这个错误的原因?

最佳答案

Caused by: java.lang.NullPointerException
at org.codehaus.mojo.gwt.ClasspathBuilder.buildClasspathList(ClasspathBuilder.java:71)

That line意味着记录器尚未初始化。您使用的是哪个 Maven 版本?
该插件已使用 Maven 3.2 构建和验证(并使用 3.0 开发),我刚刚尝试使用 Maven 3.3 并且集成测试也通过了;但如果您不使用这些版本之一,则可能是 Maven 版本控制问题。

关于java - gwt-maven-plugin 失败并出现 NullPointerException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30124284/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com