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.

Bug 224288 - Warning needed if nb-configuration.xml netbeans.hint.jdkPlatform is no longer valid
Summary: Warning needed if nb-configuration.xml netbeans.hint.jdkPlatform is no longer...
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Maven (show other bugs)
Version: 7.2.1
Hardware: PC Windows 7
: P2 normal (vote)
Assignee: Milos Kleint
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-28 19:11 UTC by predatorvi
Modified: 2013-01-04 02:31 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description predatorvi 2012-12-28 19:11:16 UTC
When I initially installed NetBeans 7.2.1, I was using JDK 1.6.0_27 which worked well for a Web Service Maven project using jaxws-maven-plugin (wsgen and wsimport).

I recently upgraded to JDK 1.6.0_37, then installed JDK 1.7.0_10 and changed netbeans.conf to use 1.7 as the default runtime.

When I attempted to build my web service project, the maven wsgen and wsimport targets of the jaxws-maven-plugin failed because it was reverting to using the default 1.7 platform.

I looked at the project (Right click project->Properties->Build->Compile) and it showed JDK 1.6.0_37 (first item in the list) I made a bad assumption that it was correctly set to use JDK 1.6.0_37 even though in reality, it really wasn't set, it was simply showing the first item in the list.  There was no warning or prompt that the current value stored in the nb-configuration.xml file was not a valid value.

Upon closer inspection, the value stored in the nb-configuration.xml file showed:

<netbeans.hint.jdkPlatform>JDK 1.6</netbeans.hint.jdkPlatform>

which was no longer a Java Platform value, yet no warnings or other hints were shown suggesting that this value was no longer valid.

After forcing it to use the JDK_1.6.0_37, it correctly used the right platform.

If <netbeans.hint.jdkPlatform/> could be validated and a warning displayed on either the properties page and/or the console output during a build stating that there is a problem with the setting it would help.
Comment 1 Milos Kleint 2013-01-03 11:17:53 UTC
https://hg.netbeans.org/core-main/rev/cb5f1cf97426

not really a P2, but there you go. happy new year.
Comment 2 Quality Engineering 2013-01-04 02:31:25 UTC
Integrated into 'main-golden', will be available in build *201301040001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/cb5f1cf97426
User: Milos Kleint <mkleint@netbeans.org>
Log: #224288 create a problem provider that checks if jdk declaration in project is valid, if not, Java Platforms dialog is opened.