| Summary: | m2eclipse fails when maven-compiler-plugin targets "5", "6", or "7" | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Tim O'Brien <tobrien> | ||||||||
| Component: | m2e | Assignee: | Project Inbox <m2e.core-inbox> | ||||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||||
| Severity: | major | ||||||||||
| Priority: | P3 | CC: | anders.g.hammar, igor, matthew_sandoz | ||||||||
| Version: | unspecified | ||||||||||
| Target Milestone: | --- | ||||||||||
| Hardware: | Macintosh | ||||||||||
| OS: | Mac OS X - Carbon (unsup.) | ||||||||||
| Whiteboard: | |||||||||||
| Attachments: |
|
||||||||||
Created attachment 200821 [details]
Patch for ./src/org/eclipse/m2e/jdt/internal/AbstractJavaProjectConfigurator.java
*** Bug 350353 has been marked as a duplicate of this bug. *** Created attachment 200847 [details]
Patch for m2e-core, small change to AbstractJavaProjectConfigurator
Created attachment 200848 [details]
Patch for m2e-core-tests
Applied the patches. Thank you. *** Bug 357364 has been marked as a duplicate of this bug. *** |
The Java compiler's documentation states that -source and -target accept the following values: "5" as a synonym for "1.5", "6" as a synonym for "1.6", and (assumption) "7" as a synonym for "1.7". In the current release of m2eclipse, if your pom.xml contains the configuration: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>6</source> <target>6</target> </configuration> </plugin> m2eclipse will ignore this setting and use a different source and target level. This will lead to inconsistent results from the same build run via the command-line vs. m2eclipse. I've attached a patch for ./src/org/eclipse/m2e/jdt/internal/AbstractJavaProjectConfigurator.java which adds the synonyms to SOURCES and TARGETS and which adds some logic to catch the synonyms for source and taget.