Created attachment 106813 [details]
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:
<autoupdate downloaddir="mirror" url="http://deadlock....">
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.
I guess if Maven did not exist, it would be necessary to invent it.
Created attachment 107226 [details]
In addition: Don't replace existing NBMs
Thanks for the comments. I've improved the task to work without expanded NBMs. I'd like to integrate tomorrow.
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.
I thought trunk was for bug fixes only? (Not that this is risky.)
I did not wait knowing it is not used in production and as I want to use
(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.
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.
Integrated into 'main-golden', will be available in build *201103250400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
User: Jaroslav Tulach <email@example.com>
Log: #196428: Allow the AutoUpdate task to download NBMs