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.
As described at http://wiki.netbeans.org/CompatibilityForHarness it would be useful to modify the template for standard NetBeans application to download its platform when it is missing. In addition to better way to handle compatibility (by downloading even deprecated modules not available in distribution, only on update center), it also simplifies the setup of headless builds (e.g. just two properties need to be set).
Created attachment 107243 [details] Changes to nbproject/build-impl.xml The only two properties that need to be set are bootstrap.url= autoupdate.catalog.url= of course in real life they are supposed to point to some HTTP resource, not to a local mirror (possible due to impl of bug 196428) like in the patch. The properties should be populated by the apisupport.project UI.
core-main #4b4f2072f2fc does the Ant part. GUI integration may be trickier.
Integrated into 'main-golden' Changeset: http://hg.netbeans.org/main-golden/rev/4b4f2072f2fc User: Jesse Glick <jglick@netbeans.org> Log: Ant portion of #197038: download platform on demand.
Works if you set up the right properties as listed in README. What is not available: 1. A wizard to set up downloadability to begin with. Can use nbms-and-javadoc for tasks.jar; ought to inspect the version of the current platform, and offer a "well-known" URL from updates.netbeans.org. (See e.g. PlatformChooserVisualPanel.cleanupLabel and NbPlatform.getDefaultJavadocRoots for approaches, though in the future it would be better to have a general API for finding a logical version of both harness and platform that did not need to be hardcoded in apisupport.ant; cf. bug #200520.) Would then remove nbplatform.active, pick a relative location for the download (e.g. ${basedir}/nb/), and set the various properties needed. TBD if any support for undoing all this is needed as well. Possible UI would be a checkbox "Download Platform" in SuiteCustomizerLibraries, though it is also legal to have a relative platform location without using automatic downloads. 2. FixInfo integration to permit a missing dependency to be resolved by download.
Integrated into 'main-golden' Changeset: http://hg.netbeans.org/main-golden/rev/edade4601765 User: Jesse Glick <jglick@netbeans.org> Log: Best practices for downloaded platforms (#197038) is to skip defining nbplatform.active, which harness supports so evaluators should too.
I am testing this functionality so that I can write a Test Specification for it. I created a Standalone Platform Application. The details of my environment are: Product Version: NetBeans IDE Dev (Build 201111070600) Java: 1.6.0_26; Java HotSpot(TM) 64-Bit Server VM 20.1-b02-383 System: Mac OS X version 10.7.2 running on x86_64; MacRoman; en_US (nb) User directory: /Users/tusharjoshi/.netbeans/dev Cache directory: /Users/tusharjoshi/.netbeans/dev/var/cache The properties I wrote in platform.properties are : nbplatform.downloaded.label=Downloaded Platform nbplatform.downloaded.netbeans.dest.dir=${suite.dir}/nbdest bootstrap.url=http://deadlock.netbeans.org/hudson/job/nbms-and-javadoc/lastStableBuild/artifact/nbbuild/netbeans/harness/tasks.jar autoupdate.catalog.url=http://deadlock.netbeans.org/hudson/job/nbms-and-javadoc/lastStableBuild/artifact/nbbuild/nbms/updates.xml.gz The error I am getting is as follows: platform.download: Downloading clusters platform Getting: http://deadlock.netbeans.org/hudson/job/nbms-and-javadoc/lastStableBuild/artifact/nbbuild/netbeans/harness/tasks.jar To: /var/folders/c3/z3fsf3pd44xdzcm8nxftszk40000gn/T/tasks.jar local file date : Tue Nov 08 06:54:11 IST 2011 Not modified - so not downloaded Downloading http://deadlock.netbeans.org/hudson/job/nbms-and-javadoc/lastStableBuild/artifact/nbbuild/nbms/updates.xml.gz /Users/tusharjoshi/NetBeansProjects/suite2/build.xml:7: The following error occurred while executing this line: /Users/tusharjoshi/NetBeansProjects/suite2/nbproject/build-impl.xml:41: The following error occurred while executing this line: /Users/tusharjoshi/NetBeansProjects/suite2/nbproject/platform.xml:29: installdir must be existing directory: /Users/tusharjoshi/NetBeansProjects/suite2/${nbplatform.${nbplatform.active}.netbeans.dest.dir} What property is missed by me?
Using the following properties in the platform.properties file this feature worked. suite.dir=${basedir} nbplatform.active.dir=${suite.dir}/nb harness.dir=${nbplatform.active.dir}/harness bootstrap.url=http://deadlock.netbeans.org/hudson/job/nbms-and-javadoc/lastStableBuild/artifact/nbbuild/netbeans/harness/tasks.jar autoupdate.catalog.url=http://updates.netbeans.org/netbeans/updates/7.0.1/uc/final/distribution/catalog.xml.gz I have verified this on the following environment: Product Version: NetBeans IDE Dev (Build 201111070600) Java: 1.6.0_26; Java HotSpot(TM) 64-Bit Server VM 20.1-b02-383 System: Mac OS X version 10.7.2 running on x86_64; MacRoman; en_US (nb) User directory: /Users/tusharjoshi/.netbeans/dev Cache directory: /Users/tusharjoshi/.netbeans/dev/var/cache Setting back the issue to RESOLVED-FIXED status as it was earlier.
Verified only for the manual update to the platform properties file. This issue shall still be kept open for the GUI Part.