Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-users] building into multiple directories

If maven and eclipse build outputs disagree, you likely won't be able to
run tests or launch application from eclipse. Either change eclipse
to use maven convention (the default in m2e) or configure pom.xml build
<outputDirectory> and <testOutputDirectory> to match what you use in

m2e runs significant part of maven build inside eclipse workspace. When
eclipse and maven output directories disagree, some of the generated
files, e.g. .class files produced by eclipse java builder, will end up
in eclipse output directory and others, e.g. resources processed by
maven-resources-plugin, in maven output directory. Run-as java
application or junit test only knows how to use eclipse output directory
and will miss any resources or classes generated into maven output


On 2015-03-05 23:05, V. Mark Lehky wrote:
I have an existing Eclipse project that I have been tasked with
The current project was using the Eclipse default "build/classes" for
it's output folder. When I added the m2e nature, the output folder was
changed to the Maven default "target/classes".
 From previous experience, if I run both an Eclipse build and a Maven
build (using the same output folder), then things can get confused, and
I have to use some Maven-clean, Eclipse-clean, build trickery to get out
of it.
My question is: Is it a good/bad idea to force the Eclipse build output
folder to be "build/classes", and leave the Maven build output folder to
"target/classes", thereby hopefully never having the two meet and
confuse each other? What could go wrong with this scenario?
Thank You, VML.
m2e-users mailing list
To change your delivery options, retrieve your password, or unsubscribe
from this list, visit

Back to the top