days
-1
-1
hours
0
-3
minutes
-5
-5
seconds
-5
-1
search
Faster Maven in NetBeans IDE!

Keep NetBeans Nimble with Maven Remote Search

Emilian Bold

Read about a free NetBeans module that disables wasteful index downloads in favor of remote searches.

NetBeans IDE has very good Maven support. However, everyone using Maven in NetBeans IDE generally wastes gigabytes of precious SSD space plus a lot of bandwidth.

How come?

NetBeans IDE periodically downloads the Maven “index” in order to have a list of every Maven library in the world for POM code completions, wizards, and such. How large is this Maven index? Hundreds of megabytes!

On my work machine the mavenindex/central caches take up 1.3GB!

maven-index

And while the Maven folks have gotten smart about incremental updates, this index archive still has to be downloaded and unarchived on disk. This is really no fun while you are on a trip and using your phone’s expensive data roaming or when your laptop only has a 128GB drive.

What to do?

The good news is that there is now a free NetBeans module for NetBeans IDE 8.2, which is to be released soon, that disables this wasteful index download in favor of remote search.

Instead of having a list of all the Maven libraries on the planet on your drive, the module will just query the Maven central repository for what you need. This uses no disk space and very little bandwidth for the Maven repository search. Of course, you need an internet connection for this to work, but since you are presumably trying to download some Maven artifact you most likely are online anyhow.

How to try this today?

It’s easy.

  1. Get NetBeans IDE 8.2 (or go to http://bits.netbeans.org/download/trunk/nightly/latest/ and download a NetBeans build if you are reading this early).

  2. Go to https://bitbucket.org/emilianbold/maven.search.remote/downloads and download the last Maven Remote Search build.

  3. Install the module via Tools | Plugins (How? See http://wiki.netbeans.org/FaqPluginInstall.)

  4. After the install (and an IDE restart for good measure) the Maven remote index download will be disabled and all your Maven queries will become remote searches.

maven-search

Enjoy!

What next?

The plugin is very simple and could be improved in various ways. Feel free to give any feedback and look at the plugin source code on https://bitbucket.org/emilianbold/maven.search.remote

Many thanks to Tomas Stupka for adding the necessary hooks into the Maven modules for this plugin to work and to Geertjan Wielenga for getting me in touch with Tomas. All the bugs are mine, of course!

Author

Emilian Bold

Emilian Bold is a Java developer with a decade of experience in rich Swing-based desktop applications, usually based on NetBeans Platform. He has focused the past years on Javascript interoperability via Rhino and recently Nashorn. He is a member of the NetBeans Dream Team and works at his own company Joseki Bold SRL (http://www.josekibold.ro/ ).