As few people already pointed out, the major risk of having Eclipse
and Maven command line (CLI) building classes into the same folders is
that you can get partially compiled project or make JDT confused when
Maven cleans out classes from the build folder.
I meant to review existing defaults for the build locations used by
import project wizard and "enable maven dependency management" action,
but haven't got to that yet. It seems like defaults should be to use
separate folders between Eclipse and Maven CLI.
By the way, one interesting option that could be useful for those who
always compile from Eclipse is to configure Maven compiler plugin to not
compile anything (sort of use "null" compiler type). This is not
supported yet, but may worth to add to the plugin. See more about that
at in compiler plugin documentation at [1], though it won't help much
with the "mvn clean" issue (I wish "clean" goal won't erase
"target/classes" folder, but only removed its content).
regards,
Eugene
[1]
http://maven.apache.org/plugins/maven-compiler-plugin/non-javac-compilers.html
Adam Hardy wrote:
What are the pros and cons of using the same or different directories
for the build directory in Eclipse and Maven?
I am running Eclipse with my project configured to compile into
project/build/classes
while maven on the command line by default compiles into
project/target/classes
Previously I had set the project to use 'target' and I think that was
the reason why I would always have to rebuild my project before running
JUnit - otherwise the tests refused to run, giving me ClassNotFound
exceptions.
This is Eclipse 3.3 and m2eclipse 0.0.11
Thanks
Adam
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email