I’m converting some of our projects into Maven projects, but m2e changes my .classpath JRE entry from:
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
to:
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
This causes a few errors like:
Description Resource Path Location Type Access restriction: The type
WindowsPopupMenuSeparatorUI is not accessible due to restriction on
required library C:\Program
Files\Java\jdk1.6.0_20\jre\lib\rt.jar DottedJPopupMenuSeparator.java /acommons/src/com/ks/acommons/gui/lookandfeel line
10 Java Problem
Is there any way I can make m2e not generate the .classpath file, or force it to use the workspace default JDK?
In my opinion, Maven is helping you here. It forces Eclipse to use a strict Java 1.6 environment and prevents you from using libraries which are not part of the standard distribution.
Typically this error message is hinting that you should be declaring a new Maven dependency, rather than relying on a JAR file being present in (e.g.)
JRE/lib/ext.