Github user jlahoda commented on the issue:
https://github.com/apache/incubator-netbeans/pull/130
NetBeans is not using Maven to build, and is downloading its external
dependencies using an ant task. Originally, this task was only downloading from
a (NetBeans) binary server (and caching the downloaded stuff in
$HOME/.hgexternalcache), but recently, this was enhanced, so that it can
download from Maven central as well (or use the .m2 cache). But, the current
support, if it downloads from central, it won't cache the data anywhere, so
after a clean, it will download the binary again.
So, basically, the proposal here is to always cache external binaries
needed by NetBeans in $HOME/.hgexternalcache. This may mean some of the
binaries will be in both .m2 and .hgexternalcache, but that does not seem too
bad (compared to always downloading some them from the remote).
This is of course not the only possible solution, but I think it is one
that can be reliable and not require too much maintenance.
---