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 156294

Summary: Default platforms.${platform.active}.home to ${java.home}/..
Product: java Reporter: Jesse Glick <jglick>
Component: ProjectAssignee: Tomas Zezula <tzezula>
Status: NEW ---    
Severity: blocker CC: svante
Priority: P2    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description Jesse Glick 2009-01-05 16:37:24 UTC
Currently if platform.active is defined (to something other than default_platform) yet no such Java platform is defined
in the userdir, the build just aborts. It would be better if a warning were issued that the user ought to define this
Java platform explicitly, but continue using the default platform. For most projects this would work acceptably.

Note #1: it would be great to skip the warning in case the default platform in fact seems to be identical to the desired
platform. In particular, if "${platform.active}" == "JDK_${java.specification.version}", but
platforms.${platform.active}.home is undefined, just silently use the default platform. Would be good if the UI also
suppressed any warning about a missing platform reference in this case.

Note #2: consider getting rid of <explicit-platform> in project.xml (can leave it in XSD for compatibility but ignore
it). Should be able to switch between default platform mode and explicit JDK mode at runtime. Would mean nearly
duplicating a bunch of macrodefs, but this is probably preferable to changing build-impl.xml just because you switch to
or from the default platform. Anyway such a change might be necessary in order to implement the platform fallback.

Filed in j2seproject but should be ported to other Ant-based project types too.
Comment 1 Jan Jancura 2009-03-25 13:32:44 UTC
great idea!
thanks
Comment 2 David Strupl 2012-10-25 13:41:49 UTC
Bug prior to 7.0, not touched for the last 2 years --> P4.