加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > Java > 正文

java – Maven依赖问题 – 在中央仓库中找不到工件

发布时间:2020-12-15 04:13:42 所属栏目:Java 来源:网络整理
导读:我正在尝试从这个站点 http://www.joptimizer.com/usage.html构建项目.我下载了源jar文件,解压缩它并在根文件夹中运行maven包. Maven在最后一刻失败说它无法解决依赖问题. could not find artifact seventytwomiles:architecture-rules:jar:3.0.0-M1 in cent
我正在尝试从这个站点 http://www.joptimizer.com/usage.html构建项目.我下载了源jar文件,解压缩它并在根文件夹中运行maven包. Maven在最后一刻失败说它无法解决依赖问题.

could not find artifact seventytwomiles:architecture-rules:jar:3.0.0-M1 in central repo - repo.maven.apache.org/maven2 ..

我有一种感觉,我可能需要在pom.xml文件中更改某些内容才能使其工作,但不知道是什么.谷歌搜索这个缺少的依赖导致我没有.一般来说,如何知道如何处理此类错误(并请帮助解决此特定情况).

解决方法

特别

根据http://www.joptimizer.com/usage.html建筑笔记:

JOptimizer is build on maven 3.0. Before building it,you must resolve
(in pom.xml) the external dependency on Colt and other dependencies
that aren’t in public repositories. Please refer to the “Dependencies”
report for a complete treatment. For ease of use a boundle with
these external libraries is provided
(visit “Download”): extract the
boundle in a folder and run the “maven-install.cmd” (translate it in
your own shell language),and you will get the artifacts in your local
repository.

要获取此包,请转到http://sourceforge.net/projects/cvxopt/files/,并下载相应版本的joptimizer-3.X.X-dependencies.zip.在您自己的文件夹中解压缩,然后运行mvn install:install-file -DgroupId = seventytwomiles -DartifactId = architecture-rules -Dversion = 3.0.0-M1 -Dpackaging = jar -Dfile = architecture-rules-3.0.0-M1.jar -DpomFile =架构的规则-3.0.0-M1.pom

通常

使用像http://mavenrepository.com这样的工具来搜索缺少的依赖项的另一个版本,并使用正确的版本更新您的POM.如果MVNRepository不知道它,您可以自己安装依赖项.如果您正在与一组开发人员合作,正如Eric Jablow所提到的,像Nexus或Artifactory这样的工件库非常适合共享非公共依赖项.如果只是您,您可以按照此处所述在本地仓库中安装工件:How to manually install an artifact in Maven 2?

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读