This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | [71cat] SourceLevelQuery claims 1.3 for non-core packagings | ||
---|---|---|---|
Product: | projects | Reporter: | muellermi <muellermi> |
Component: | Maven | Assignee: | Jesse Glick <jglick> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | P3 | ||
Version: | 7.1 | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: | messages |
Description
muellermi
2011-10-06 22:35:43 UTC
Created attachment 111620 [details]
messages
The actual source level used is JDK 5, as you can confirm by using generics in the bundle and building; the IDE just does not recognize this, because when its embedder looks up the version of maven-compiler-plugin in the project (to see if it is at least 2.3, when -source 5 was made the default), it finds nothing, even though an actual build will use 2.3.2 (the default version of this plugin fixed by the Maven 3.0.3 core). The fallback behavior for "no known version", as for pre-2.3 versions, is to use -source 1.3. Seems that MavenProject.buildPlugins produces a list of plugins defined in the lifecycle of the plugin providing the packaging; but their versions are all missing (as they are in maven-bundle-plugin-2.2.0.jar!/META-INF/plexus/components.xml), and pluginManagement.plugins does not list m-c-p. Perhaps Maven just falls back to using the latest released version of a plugin if the lifecycle does not specify otherwise? DefaultLifecyclePluginAnalyzer seems to indicate that it would. The solution is then to fall back to -source 5 when no version is specified for m-c-p at all. core-main #d373566533a5 |