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 196428

Summary: Let AutoUpdate task download NBMs
Product: apisupport Reporter: Jaroslav Tulach <jtulach>
Component: HarnessAssignee: Jaroslav Tulach <jtulach>
Status: RESOLVED FIXED    
Severity: normal CC: apireviews, jglick, mmirilovic
Priority: P2 Keywords: API_REVIEW_FAST
Version: 7.0   
Hardware: Other   
OS: Linux   
Issue Type: ENHANCEMENT Exception Reporter:
Bug Depends on: 174846    
Bug Blocks: 197038, 207137    
Attachments: Download NBMs
In addition: Don't replace existing NBMs

Description Jaroslav Tulach 2011-03-08 08:51:59 UTC
Created attachment 106813 [details]
Download NBMs

I've noticed that my hudson machine http://hudson.apidesign.org/hudson/ downloads NBMs from deadlock.netbeans.org with every build of (almost) every job. This takes time and occupies bandwidth. It would be easier if the download happened just once per day (or on demand).

Actually it is not that hard to do. We know how to download appropriate NBM files using AutoUpdate task. We just need to keep them and generate catalog.xml for them. Attached patch adds the download part of the functionality. This would be the usage script:

<target name="mirror">
  <autoupdate downloaddir="mirror" url="http://deadlock....">
    <modules clusters="platform.*|java.*|ide.*"/>
  </autoupdate>
  <makeupdatedesc desc="mirror/updates.xml">
    <fileset dir="mirror">
      <include name="*.nbm"/>
    </fileset>
  </makeupdatedesc>
</target>

PS: The same functionality can be used to automatically propagate patches to (production) update centers as soon as and only if their specification version increases. Just run the mirror target (plus pointer to existing installdir in autoupdate task). Only updated NBMs will be downloaded and included in the newly regenerated catalog.xml.
Comment 1 Jesse Glick 2011-03-23 14:16:18 UTC
I guess if Maven did not exist, it would be necessary to invent it.
Comment 2 Jaroslav Tulach 2011-03-23 19:43:34 UTC
Created attachment 107226 [details]
In addition: Don't replace existing NBMs
Comment 3 Jaroslav Tulach 2011-03-23 19:47:50 UTC
Thanks for the comments. I've improved the task to work without expanded NBMs. I'd like to integrate tomorrow.
Comment 4 Jaroslav Tulach 2011-03-24 08:23:23 UTC
ergonomics#be0ec18b14d8

Re. "reinvent" - I'd bet Maven has already passed its peak. Reinvention is inevitable (see http://gradle.org/). However my goal with AutoUpdate task is not to create general purpose system, but rather bring the benefits of online repositories to users of NetBeans Platform without forcing them to deal with all the flaws associated with Maven. Obviously similarities are unavoidable.
Comment 5 Jesse Glick 2011-03-24 12:14:48 UTC
I thought trunk was for bug fixes only? (Not that this is risky.)
Comment 6 Jaroslav Tulach 2011-03-24 14:40:09 UTC
I did not wait knowing it is not used in production and as I want to use
http://wiki.netbeans.org/File:Mirror.xml
in 
http://hudson.apidesign.org/hudson/job/mirror-netbeans/
Comment 7 Jesse Glick 2011-03-24 14:47:44 UTC
(In reply to comment #6)
> it is not used in production

Well, it is part of harness/tasks.jar and used from harness/common.xml#update, so it is part of the supported IDE distribution.
Comment 8 Jaroslav Tulach 2011-03-24 16:23:45 UTC
Right, it creates new API/obligation. But it is not used in any harness/*.xml so it cannot break anything we deliver out of the box. As soon as we implement bug 197038 or similar, I'll be more defensive.
Comment 9 Quality Engineering 2011-03-25 09:51:43 UTC
Integrated into 'main-golden', will be available in build *201103250400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/be0ec18b14d8
User: Jaroslav Tulach <jtulach@netbeans.org>
Log: #196428: Allow the AutoUpdate task to download NBMs