Tuesday 4 May 2010

Eclipse WTP and Maven NullPointerException workaround

When you are trying to enable Maven support in Eclipse project, it's most probably because of WTP and Maven integration bug.

Symptoms:
An internal error occurred during: "Updating classpath container: project name".
java.lang.NullPointerException
 at org.eclipse.wst.common.componentcore.internal.resources.VirtualResource.removeLink(VirtualResource.java:300)
Solution is to edit .project file by hand and to include these natures in appropriate tag (you'll find it):
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>

No comments:

Post a Comment