小编use*_*163的帖子

如何让Maven使用正确的存储库?

我刚检查了一些项目并需要构建它们,但是我很久以前安装了Maven(可能是6个月?)并且从那时起就没有使用它 - 我所拥有的项目的pom.xml没有这个" http://repo1.maven.org/myurlhere "在其中的任何地方 - 它有maven repo用于项目的绝对URL,但maven仍在尝试从普通的maven repo下载:

Macintosh:trunk$ mvn clean install
[INFO] Scanning for projects...
Downloading: http://repo1.maven.org/url/project/project/x.x/project-x.x.pom
[INFO] Unable to find resource 'url.project:project:pom:x.x' in repository central (http://repo1.maven.org/)
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.

GroupId: url.project
ArtifactId: project
Version: x.x

Reason: Unable to download the artifact from any repository

  url.project:project:pom:x.x

from the specified remote repositories:
  central (http://repo1.maven.org/)
Run Code Online (Sandbox Code Playgroud)

任何人都可以帮助我做正确的事情,基本上我只是从命令行检查项目,cd-ed到目录并运行"mvn clean install" - 没有别的.任何帮助是极大的赞赏.

java build-process maven-2 build

62
推荐指数
4
解决办法
14万
查看次数

标签 统计

build ×1

build-process ×1

java ×1

maven-2 ×1