首页 新闻 搜索 专区 学院

maven项目打包报错,是什么原因导致的?

0
悬赏园豆:200 [待解决问题]

"C:\Program Files\Java\jdk1.8.0_191\bin\java.exe" -Dmaven.multiModuleProjectDirectory=E:\project\gdztk\TPI "-Dmaven.home=C:\Program Files\JetBrains\IntelliJ IDEA 2018.3.1\plugins\maven\lib\maven3" "-Dclassworlds.conf=C:\Program Files\JetBrains\IntelliJ IDEA 2018.3.1\plugins\maven\lib\maven3\bin\m2.conf" "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA 2018.3.1\lib\idea_rt.jar=50694:C:\Program Files\JetBrains\IntelliJ IDEA 2018.3.1\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\JetBrains\IntelliJ IDEA 2018.3.1\plugins\maven\lib\maven3\boot\plexus-classworlds-2.5.2.jar" org.codehaus.classworlds.Launcher -Didea.version=2018.3.1 -Dmaven.repo.local=C:\Users\Administrator.m2\repository -DskipTests=true package
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] tpi
[INFO] tpi-common
[INFO] tpi-ueditor
[INFO] tpi-web
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building tpi 1.0
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building tpi-common 1.0
[INFO] ------------------------------------------------------------------------
Downloading: https://dl.bintray.com/rabbitmq/maven-milestones/com/artofsolving/jodconverter/2.2.2/jodconverter-2.2.2.pom
Downloading: https://dl.bintray.com/rabbitmq/maven-milestones/org/artofsolving/jodconverter/jodconverter-core/3.0-beta-4/jodconverter-core-3.0-beta-4.pom
Downloading: https://dl.bintray.com/rabbitmq/maven-milestones/com/cnki/kbase/kbase-java/1.0/kbase-java-1.0.pom
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] tpi ................................................ SUCCESS [ 0.002 s]
[INFO] tpi-common ......................................... FAILURE [ 4.718 s]
[INFO] tpi-ueditor ........................................ SKIPPED
[INFO] tpi-web ............................................ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.684 s
[INFO] Finished at: 2021-10-19T23:03:16+08:00
[INFO] Final Memory: 26M/335M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project tpi-common: Could not resolve dependencies for project cnki.tpi:tpi-common:jar:1.0: Failed to collect dependencies at com.artofsolving:jodconverter:jar:2.2.2: Failed to read artifact descriptor for com.artofsolving:jodconverter:jar:2.2.2: Could not transfer artifact com.artofsolving:jodconverter:pom:2.2.2 from/to rabbit-milestone (https://dl.bintray.com/rabbitmq/maven-milestones): Access denied to: https://dl.bintray.com/rabbitmq/maven-milestones/com/artofsolving/jodconverter/2.2.2/jodconverter-2.2.2.pom , ReasonPhrase:Forbidden. -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :tpi-common

Process finished with exit code 1

问题补充:

我设置了本地仓库,本地仓库有对应的jar,为什么还会去下载?

小鱼儿19的主页 小鱼儿19 | 初学一级 | 园豆:2
提问于:2021-10-19 23:12
< >
分享
所有回答(3)
1

2.2.2 这个版本出来了吗?
下面的链接 找不到这个 包,最大2.2.1
https://mvnrepository.com/artifact/com.artofsolving/jodconverter

快乐的凡人721 | 园豆:1782 (小虾三级) | 2021-10-19 23:26

我本地仓库有,我一开始以为某个版本识别不到,手动改个版本,但还是会在线下载,是啥情况

支持(0) 反对(0) 小鱼儿19 | 园豆:2 (初学一级) | 2021-10-20 09:06

@小鱼儿19:
你看你本地的,命名是 2.2.1 啊,,,而你的错误是要 2.2.2!
你本地有 2.2.2的?

支持(0) 反对(0) 快乐的凡人721 | 园豆:1782 (小虾三级) | 2021-10-20 09:31

@快乐的凡人721: 我知道,我改回2.2.1还是不行,两个版本都试了

支持(0) 反对(0) 小鱼儿19 | 园豆:2 (初学一级) | 2021-10-20 09:34

@小鱼儿19:
直接改文件名?!可以这样玩?!

支持(0) 反对(0) 快乐的凡人721 | 园豆:1782 (小虾三级) | 2021-10-20 09:41

@小鱼儿19:
删除你本地 这个jar包的所有文件,改为 2.2.1,然后再重新价值 中央仓库 来的 jar包

支持(0) 反对(0) 快乐的凡人721 | 园豆:1782 (小虾三级) | 2021-10-20 09:42
0

提示 https://dl.bintray.com/rabbitmq/maven-milestones/com/artofsolving/jodconverter/2.2.2/jodconverter-2.2.2.pom 这个无访问权限,在浏览器也不行
需要换个仓库地址就好了

2012 | 园豆:21027 (高人七级) | 2021-10-20 08:45

额,我地址设的已经是本地

支持(0) 反对(0) 小鱼儿19 | 园豆:2 (初学一级) | 2021-10-20 09:07

@小鱼儿19: 这个地址是配置的maven本地仓库的地址,是指maven远程仓库下载jar至本地电脑文件地址。当然你打包时如果不特殊设置,优先使用的jar包也是你这里配置地址里面的jar,但是先在应该是你项目pom里面的依赖出现了依赖了高版本的jar包的pom依赖,所以导致打包时检测到本地没有去更新这个高版本jar包

支持(0) 反对(0) 绝不是木头 | 园豆:507 (小虾三级) | 2021-10-20 09:45
0

博主可以尝试先在浏览器访问https://mvnrepository.com/artifact/com.artofsolving/jodconverter这个地址(如果不能访问,应该是网络问题),然后填写用户名密码登录进去看看是否有2.2.2版本jar包,如果有的话,可以考虑删除 本地jar包重新maven 拉取jar。
博主所说的另一个问题,为什么改成了2.2.1版本jar包还去更新。如果是还去更新2.2.2版本的jar,应该是没有改完全,还有地方的pom.xml依赖了高版本(2.2.2)的jar,或者说是在某个依赖的jar包里面依赖了2.2.2版本jar。
ps: 推荐一款idea maven插件,maven helper插件,可以树形结构看maven依赖。

绝不是木头 | 园豆:507 (小虾三级) | 2021-10-20 09:37
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册