I use Apache Maven to manage my Java libs (jar) and some of projects that use the libs. For convinience, I use mvn eclipse:eclipse
to generate Eclipse project f
Thanks for Hound Dog's hints. Yes, useProjectReferences controls Maven how to handle sub projects -- including source dir or including jar files.
I haven't installed the maven plugin for Eclipse, so I add the following configuration in pom.xml
. It tells Maven to include jar dependency in local maven repo, not the source dir. If the required jar file is not present in local repo, it will be automatically downloaded on the fly.
org.apache.maven.plugins
maven-eclipse-plugin
2.9
false
Now mvn eclipse:eclipse
works as expected.