Community
Participate
Working Groups
Build Identifier: 20110615-0604 m2e 1.0.100 Happens on both Mac and Windows. Reproducible: Always Steps to Reproduce: 1. Unpack provided test project 2. Import lab-n1 3. Notice the error on the EvalScript.java class 4. The Maven project has target 1.4 specified but the class required Java 5. Executing Run as -> Maven install should not work, but it does. The reasons is that the class somehow has been compiled although it shouldn't be possible. So the compiler plugin doesn't need to compile and thus doesn't fail.
Created attachment 204496 [details] Test project to reproduce
Workaround is to execute Run as -> Maven clean and the re-run Run as -> Maven install.
I'm guessing here, but could it be that the Java level is not honored during the project import and the class is therefore compiled correctly?
Created attachment 204500 [details] test project 2 Added yet a test project that shows the same behavior. This project (lab-d1) uses some classes not added as dependencies to the pom. Still, the class is compiled by the jdt.
JDT creates .class files even for sources that have compilation errors. This is expected and desired behaviour inside IDE.
(In reply to comment #5) > JDT creates .class files even for sources that have compilation errors. This is > expected and desired behaviour inside IDE. Ok, I see. But this confuses people when they execute "Run as -> Maven install" I think. Maybe there is no solution to that?
Moved to https://github.com/eclipse-m2e/m2e-core/issues/