Bug 196428 - Let AutoUpdate task download NBMs
Let AutoUpdate task download NBMs
Status: RESOLVED FIXED
Product: apisupport
Classification: Unclassified
Component: Harness
7.0
Other Linux
: P2 (vote)
: 7.0.1
Assigned To: Jaroslav Tulach
issues@apisupport
: API_REVIEW_FAST
Depends on: 174846
Blocks: 197038 207137
  Show dependency treegraph
 
Reported: 2011-03-08 08:51 UTC by Jaroslav Tulach
Modified: 2012-01-10 18:00 UTC (History)
3 users (show)

See Also:
Issue Type: ENHANCEMENT
:


Attachments
Download NBMs (5.07 KB, patch)
2011-03-08 08:51 UTC, Jaroslav Tulach
Details | Diff
In addition: Don't replace existing NBMs (7.36 KB, patch)
2011-03-23 19:43 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-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


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo