[英]How to run spring project offline mode?
I am trying to run a Spring Project, with several dependencies, that I have already downloaded into my local repository, and have also done followings : 我正在尝试运行一个具有多个依赖项的Spring项目,该项目已经下载到本地存储库中,并且还执行以下操作:
And I am getting following error : 而且我得到以下错误:
[ERROR] Failed to execute goal on project file2Json: Could not resolve dependencies for project com.nse.file2Json:file2Json:jar:0.0.1-SNAPSHOT: Cannot access central ( http://repo1.maven.org/maven2 ) in offline mode and the artifact com.fasterxml.jackson.dataformat:jackson-dataformat-csv:jar:2.8.4 has not been downloaded from it before.
[错误]无法在项目file2Json上执行目标:无法解析项目com.nse.file2Json:file2Json:jar:0.0.1-SNAPSHOT的依赖项:无法在以下位置访问中央( http://repo1.maven.org/maven2 )脱机模式,并且以前从未从其下载工件com.fasterxml.jackson.dataformat:jackson-dataformat-csv:jar:2.8.4。 -> [Help 1]
-> [帮助1]
I have the dependency installed, take a look :( 我已经安装了依赖项,看看:(
I have following questions : 我有以下问题:
It says it cannot access Maven Central because you are in offline mode. 它说它不能访问Maven Central,因为您处于离线模式。 And it tries to look there, because ´jackson-dataformat-csv` is not in your local repository, so Maven needs to get it from somewhere (and Maven Central is the default repository).
它会尝试查找,因为“ jackson-dataformat-csv”不在您的本地存储库中,因此Maven需要从某个地方获取它(Maven Central是默认存储库)。
What you need to do is to execute mvn dependency:go-offline
before you switch to the offline mode. 您需要做的是在切换到离线模式前执行
mvn dependency:go-offline
。 This will download everything that you need (dependencies, transitive dependencies as well as plugins). 这将下载您需要的所有内容(依赖项,传递性依赖项以及插件)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.