我正在使用eclipse kepler和maven v4.0.0以及jboss 7.0和JDK 1.6。我收到以下错误:
java.lang.NoSuchMethodError: org.eclipse.m2e.wtp.WTPProjectsUtil.isM2eWtpDisabled(Lorg/eclipse/m2e/core/project/IMavenProjectFacade;Lorg/eclipse/core/runtime/IProgressMonitor;)Z
at org.eclipse.m2e.wtp.jaxrs.internal.configurators.JaxRsProjectConfigurator.isConfigurationEnabled(JaxRsProjectConfigurator.java:100)
at org.eclipse.m2e.wtp.jaxrs.internal.configurators.JaxRsProjectConfigurator.configureInternal(JaxRsProjectConfigurator.java:75)
at org.eclipse.m2e.wtp.jaxrs.internal.configurators.JaxRsProjectConfigurator.mavenProjectChanged(JaxRsProjectConfigurator.java:180)
at org.eclipse.m2e.core.internal.project.ProjectConfigurationManager.mavenProjectChanged(ProjectConfigurationManager.java:965)
at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.notifyProjectChangeListeners(ProjectRegistryManager.java:746)
at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.applyMutableProjectRegistry(ProjectRegistryManager.java:865)
at org.eclipse.m2e.core.internal.project.registry.ProjectRegistryManager.refresh(ProjectRegistryManager.java:289)
at org.eclipse.m2e.core.internal.project.registry.MavenProjectManager.refresh(MavenProjectManager.java:67)
at org.eclipse.m2e.core.internal.builder.MavenBuilder.getProjectFacade(MavenBuilder.java:216)
at org.eclipse.m2e.core.internal.builder.MavenBuilder$1.call(MavenBuilder.java:91)
at org.eclipse.m2e.core.internal.builder.MavenBuilder$1.call(MavenBuilder.java:1)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.executeBare(MavenExecutionContext.java:161)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:137)
at org.eclipse.m2e.core.internal.embedder.MavenExecutionContext.execute(MavenExecutionContext.java:89)
at org.eclipse.m2e.core.internal.embedder.MavenImpl.execute(MavenImpl.java:1305)
at org.eclipse.m2e.core.internal.builder.MavenBuilder.build(MavenBuilder.java:89)
at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:733)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:246)
at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:299)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:302)
at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:358)
at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:381)
at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143)
at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
请帮帮我。
答案 0 :(得分:2)
您可以在市场上使用m2e 1.5.0 或者你可以使用这种方法:
转到:
偏好设置 - >点击Maven->点击模板
现在你可以看到模板列表,取消检查wtp的所有模板,即 m2e-wtp-activation ....
现在您可以清理安装项目
答案 1 :(得分:1)
尝试删除计算机中的.m2文件夹并清理项目,然后它会自动创建它。
接下来检查.project文件中的以下设置
如果上面没有任何效果。请尝试使用Eclipse Luna版本,它会起作用。我有一些问题与maven 3.5与kepler然后我尝试使用luna,它适用于我。
我希望这对你有所帮助!
答案 2 :(得分:1)
删除m2e-wtp插件为我修复了这个问题(我甚至不知道它做了什么或何时下载了它。)