| Summary: | Classes are compiled even though incorrect (wrong JDK level) | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Anders Hammar <anders.g.hammar> | ||||||
| Component: | m2e | Assignee: | Project Inbox <m2e.core-inbox> | ||||||
| Status: | CLOSED INVALID | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | igor | ||||||
| Version: | unspecified | ||||||||
| Target Milestone: | --- | ||||||||
| Hardware: | Macintosh | ||||||||
| OS: | Mac OS X - Carbon (unsup.) | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
Anders Hammar
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? |