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 197038 - GUI to manage downloaded platforms
Summary: GUI to manage downloaded platforms
Status: RESOLVED INVALID
Alias: None
Product: apisupport
Classification: Unclassified
Component: Project (show other bugs)
Version: 7.1
Hardware: All All
: P3 normal (vote)
Assignee: Martin Kozeny
URL:
Keywords: UI
Depends on: 196428 207137
Blocks:
  Show dependency tree
 
Reported: 2011-03-24 13:58 UTC by Jaroslav Tulach
Modified: 2016-05-25 06:08 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
Changes to nbproject/build-impl.xml (3.47 KB, patch)
2011-03-24 14:00 UTC, Jaroslav Tulach
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jaroslav Tulach 2011-03-24 13:58:26 UTC
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).
Comment 1 Jaroslav Tulach 2011-03-24 14:00:54 UTC
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.
Comment 2 Jesse Glick 2011-08-23 22:12:45 UTC
core-main #4b4f2072f2fc does the Ant part. GUI integration may be trickier.
Comment 3 Quality Engineering 2011-08-24 14:02:34 UTC
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.
Comment 4 Jesse Glick 2011-08-24 20:02:28 UTC
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.
Comment 5 Quality Engineering 2011-08-25 13:59:20 UTC
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.
Comment 6 tusharvjoshi 2011-11-08 03:59:10 UTC
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?
Comment 7 tusharvjoshi 2011-11-08 20:16:00 UTC
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.
Comment 8 tusharvjoshi 2011-11-08 20:17:28 UTC
Verified only for the manual update to the platform properties file.
This issue shall still be kept open for the GUI Part.