views:

708

answers:

1

How can I stop maven from checking for updates each time I start debugging a project from Eclipse? I hope this makes sense as I'm not too familiar with the java development environment.

It's just that everytime I start debugging, it will go checking for snapshot updates for dependent libraries. And this gets annoying on a slow internet connection.

+6  A: 

Use the -o flag if you're using the command line. From mvn -h:

-o,--offline Work offline


If you're using some sort of Maven integration like m2eclipse, the launch configurations usually have a 'Offline' check box.


Alternative: don't use SNAPSHOTs

Some might say that you're better of declaring release versions for all your plugins and dependencies, since that makes your build repeatable, i.e. instead of using

<version>1.0-SNAPSHOT</version>

use

<version>1.1</version>
Robert Munteanu