I have a Java codebase that was written with Eclipse that I am trying to work with in IntelliJ.
The codebase consists of about 20 Java packages built alongside each other as separate projects. (There are about twenty directories, each containing a .classpath
and .project
file.) They have dependencies on each other. Presumably everything builds just fine in Eclipse.
I had IntelliJ import these from the Eclipse build format. It mostly seemed to work except that Project Settings -> Modules -> Dependencies
shows that many projects have an unresolved dependency on org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER
. This appears to come from the following entries in the .classpath
files:
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
<attribute name="org.eclipse.jst.component.nondependency" value=""/>
</attributes>
</classpathentry>
The packages with this dependency do not build in IntelliJ because they can't resolve the dependencies on the other packages.
I suspect that org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER
is some Eclipse-specific trickery that doesn't translate to a different IDE, but I can't figure out exactly what is going on here.
What is org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER
? Do I have to do anything special to a build environment that uses it to make it work outside Eclipse?
IntelliJ Ultimate 2016.1.2, Java 1.8.0_91, OS X 10.11.5
I worked around this problem by going into Project Settings->Modules and manually adding module dependencies between my various projects until everything built. Tedious but effective.
I'm leaving this question up here, though, because a short definition of org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER
would still have been helpful to me.