Stephan Herrmann writes: > I've observed many builds failing in situations that *might* have been > caused by bad interaction between an explicit build triggered by > "Run As ... > Maven build ..." and the Eclipse auto build.
Yes, this is well-known: m2e forces the use of the *same classes directories* (target/classes and target/test-classes in the usual setup) for both maven and Eclipse (see https://dev.eclipse.org/mhonarc/lists/m2e-users/msg05030.html ). Weird errors can be the consequence: - NoSuchMethodException for access$0. - A running program (launched from Eclipse) doesn't find its resources any more, because an "mvn clean install" command is being run on the command line. The workaround is: You have to be careful when running maven on the command line (outside Eclipse or through "Run As ... > Maven build ..."). You must avoid that a maven build inside Eclipse and a maven build outside Eclipse are running at the same time. This means: - As long as Eclipse displays "Building workspace...", don't run a maven build on the command line. - As long as a maven build on the command line is running, don't save any modified file in Eclipse, nor pull any changes from the version control system. Of course, I too would be interested to know a better workaround than that. Bruno ---------------------------------------------------------------------------- Bruno Haible Email: <[email protected]> IBM Deutschland Wilhelm-Fay-Straße 30-34 65936 Frankfurt am Main Germany ---------------------------------------------------------------------------- IBM Deutschland Research & Development GmbH Geschäftsführung: Dirk Wittkopp Sitz der Gesellschaft: Böblingen Registergericht: Amtsgericht Stuttgart, HRB 243294 _______________________________________________ m2e-users mailing list [email protected] To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/m2e-users
