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.
每次从Eclipse开始调试项目时,如何阻止maven检查更新?我希望这是有道理的,因为我不太熟悉java开发环境。
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.
只是每次我开始调试时,它都会检查依赖库的快照更新。这在慢速互联网连接上变得烦人。
1 个解决方案
#1
Use the -o
flag if you're using the command line. From mvn -h
:
如果您使用的是命令行,请使用-o标志。来自mvn -h:
-o,--offline Work offline
-o, - 离线离线工作
If you're using some sort of Maven integration like m2eclipse, the launch configurations usually have a 'Offline' check box.
如果您正在使用某种类似m2eclipse的Maven集成,则启动配置通常会有一个“离线”复选框。
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>
#1
Use the -o
flag if you're using the command line. From mvn -h
:
如果您使用的是命令行,请使用-o标志。来自mvn -h:
-o,--offline Work offline
-o, - 离线离线工作
If you're using some sort of Maven integration like m2eclipse, the launch configurations usually have a 'Offline' check box.
如果您正在使用某种类似m2eclipse的Maven集成,则启动配置通常会有一个“离线”复选框。
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>