I have a Maven project which has a dependency on another one, defined in the pom.xml. This dependent project already exists in my local repository because I did a mvn install
on its pom. I have both projects in my workspace, so when running the other project from Eclipse, it resolves the dependent classes from the project's target/classes
. This is not what I want in that case, because the dependent project is a Hadoop job which is to be submitted to a Cluster, and the Job sets its jar by setJarByClass
.
So, when running from Eclipse, submitting the Job to Hadoop fails because the Jar is not found (as the classes from target/classes
are used as stated before). Is there a way to force M2E to use the Jar when running from Eclipse instead of using target/classes
?