I’ve been working on some J2EE projects in Eclipse, where, at some point, Eclipse would spit out the following error, without even telling me where that error is coming from:
Invalid classpath publish/export dependency /my-dependecy. Project entries not supported.
It took a while, and I’ve found that in those projects—for some reason—Eclipse has added an entry to the classpath:
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"> <attributes> <attribute name="maven.pomderived" value="true"/> <attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/> </attributes> </classpathentry>
This is mostly fine, except for this line:
<attribute name=“org.eclipse.jst.component.dependency” value="/WEB-INF/lib"/>
Removing it doesn’t seem to break anything else, and removes the error.