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.
7.4 FCS. I have a plugin whose parent POM defines <properties> <java.version>5</java.version> </properties> … <plugin> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.${java.version}</source> <target>1.${java.version}</target> </configuration> </plugin> which is understood by Maven but the IDE shows no selection in File » Project Properties » Sources » Source/Binary Format, and prompts me to use the JDK 7 diamond operator etc. when such constructs would not compile. So probably the SourceLevelQuery implementation is failing to use the Maven property evaluator?
I think the problem is in the java.version expression specifically. renaming to java2.version fixes the problem. java.version is likely defined in getJavaPlatform().getSystemProperties() and NBPluginParameterExpressionEvaluator attempts to evaluate these first before the content of the MavenProject.getProperties() will need to sync the NBPluginParameterExpressionEvaluator class with what maven itself is doing. BTW this also means that effective-pom tab shows the wrong value.
well, it appears we've never properly distinguished between user and system level properties. http://hg.netbeans.org/core-main/rev/1ef858a2ecb9
Ahh, did not even think of that. Thanks, confirmed that this is the workaround in 7.4 (in my case changing the parent POM to use a different property name is no problem).
(In reply to Jesse Glick from comment #3) > Ahh, did not even think of that. Thanks, confirmed that this is the > workaround in 7.4 (in my case changing the parent POM to use a different > property name is no problem). When I found the root cause, I was pretty amazed that we could get away with it for so long (it was there since day one I think)
and one more change needed http://hg.netbeans.org/core-main/rev/317039901ede
Jesse, can you help verify the fix? We'd include it in patch 1 then.
Remind me when it shows up in main-silver (or actually releases). Recently I have been running 7.4 rather than dev builds due to horrible problems with the editor.
Integrated into 'main-silver', will be available in build *201311020744* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/1ef858a2ecb9 User: Milos Kleint <mkleint@netbeans.org> Log: #237827 split system and user properties when loading projects
Verified in Dev 201311080001; (system) properties are substituted correctly, if defined in parent, and also if not defined and this considered as system ones.
(In reply to Tomas Danek from comment #9) > Verified in Dev 201311080001; > > (system) properties are substituted correctly, if defined in parent, and > also if not defined and this considered as system ones. user properties are what user adds on the cmd line, in your case that would be in configuration definition. system properties is stuff coming from System.getProperty() basically, stuff that is inherent to java platform etc..
http://hg.netbeans.org/releases/rev/fd20328b127c
Integrated into 'releases/release74', will be available in build *201311141216* or newer. Wait for official and publicly available build. Changeset: http://hg.netbeans.org/releases/rev/fd20328b127c User: Milos Kleint <mkleint@netbeans.org> Log: #237827 split system and user properties when loading projects
verified in 74patch1 Product Version: NetBeans IDE 7.4 (Build 201310111528) Updates: NetBeans IDE is updated to version NetBeans 7.4 Patch 1 Java: 1.7.0_45; Java HotSpot(TM) 64-Bit Server VM 24.45-b08 Runtime: Java(TM) SE Runtime Environment 1.7.0_45-b18 System: Mac OS X version 10.9 running on x86_64; UTF-8; en_US (nb) User directory: /Users/tomas/Library/Application Support/NetBeans/7.4 Cache directory: /Users/tomas/Library/Caches/NetBeans/7.4
Integrated into 'main-silver', will be available in build *201311280002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/ea1948ae5ee2 User: Milos Kleint <mkleint@netbeans.org> Log: #238800 mavenExecutionRequest.setUserProperties() was set in MavenEmbedder, but later as a consequence of #237827 reset in MavenProjectCache, now we simplify the flow for system properties and make sure the user properties get merged, not replaced