maven,Failed to create project.java.lang.NullPointerException,at com.genuitec.eclipse.maven.project.

Failed to create project.

java.lang.NullPointerException
 at com.genuitec.eclipse.maven.project.MyEclipseProjectSupport.findWebRoot(MyEclipseProjectSupport.java:204)
 at com.genuitec.eclipse.maven.project.MyEclipseProjectSupport.configureWebProject(MyEclipseProjectSupport.java:71)
 at com.genuitec.eclipse.maven.project.MyEclipseProjectSupport.configure(MyEclipseProjectSupport.java:57)
 at org.maven.ide.eclipse.project.configurator.AbstractLifecycleMapping.configure(AbstractLifecycleMapping.java:57)
 at org.maven.ide.eclipse.internal.project.GenericLifecycleMapping.configure(GenericLifecycleMapping.java:48)
 at org.maven.ide.eclipse.internal.project.ProjectConfigurationManager.updateProjectConfiguration(ProjectConfigurationManager.java:332)
 at org.maven.ide.eclipse.internal.project.ProjectConfigurationManager.configureNewMavenProject(ProjectConfigurationManager.java:267)
 at org.maven.ide.eclipse.internal.project.ProjectConfigurationManager.importProjects(ProjectConfigurationManager.java:175)
 at org.maven.ide.eclipse.internal.project.ProjectConfigurationManager.createArchetypeProject(ProjectConfigurationManager.java:498)
 at org.maven.ide.eclipse.wizards.MavenProjectWizard$5.runInWorkspace(MavenProjectWizard.java:279)
 at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
 at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

 

在myeclipse中新建maven项目,并且在项目上右键Maven4MyEclipse-->Update Project Configuration...时报NullPointerException异常,

解决办法:

在项目上右键MyEclipse然后Add Web Project Capabilities.

你可能感兴趣的:(Maven)