[ http://jira.codehaus.org/browse/MECLIPSE-134?page=comments#action_81487 ] Aaron Digulla commented on MECLIPSE-134: ----------------------------------------
It's not just mvn clean which can irritate Eclipse. mvn cobertura recompiles the sources with instrumentation which can cause all kinds of strange errors. For example, I suddenly got "import x.y.z.Class not found" while the class obviously was there. Therefore, I really suggest that you don't change Eclipse's default. Otherwise, users like me who occasionally run builds in both Eclipse and maven at the same time always have to remember to refresh their projects afterwards or to reset the outputDir after running mvn eclipse:eclipse (which is even more tedious because it happens to rarely). For all users who prefer to mix the output of the two tools (but never mix the tools themselves) you should allow to set outputDir to "target/classes" in settings.xml. > target/classes not acceptable for eclipse > ----------------------------------------- > > Key: MECLIPSE-134 > URL: http://jira.codehaus.org/browse/MECLIPSE-134 > Project: Maven 2.x Eclipse Plugin > Issue Type: Bug > Affects Versions: 2.0, 2.1, 2.2 > Reporter: Jörg Hohwiller > Assigned To: fabrizio giustina > Priority: Minor > > "mvn eclipse:eclipse" causes an eclipse configuration where the classfiles > generated by eclipse go to the same directory as the classes generated by > maven. This is extremly evil! Eclipse and maven are independent tools and > should therefore not compile to the same target folder causing side effects. > Especially when "mvn clean" is called and you re-run an existing application > inside eclipse, and get a NoClassDefFoundError you can get slightly confused. > Please use anything else than "target/...". My suggestion would be > ".eclipse-build". -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira