Tocmat插件启动Maven项目报错

项目启动报错

最近在学习的时候,使用Tomcat插件来启动Maven,总有时候启动不了,提示Maven依赖找不到。所以决定好好记录这个问题。


问题描述

下面是使用Tomcat启动的时候的报错

[INFO] >>> tomcat7-maven-plugin:2.2:run (default-cli) > process-classes @ epoint-jgzl-web >>>
[INFO] Downloading from epoint-nexus: http://192.168.0.99:8081/nexus/content/groups/public/e-iceblue/spire.pdf/5.4.0/spire.pdf-5.4.0.pom
[WARNING] The POM for com.epoint:gmhelper:jar:0.0.2 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] The POM for com.alibaba:druid:jar:1.1.21.e2 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  23.564 s
[INFO] Finished at: 2022-12-06T15:38:01+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project epoint-jgzl-web: Could not resolve dependencies for project com.epoint.ipm:epoint-jgzl-web:war:2.0.0: 
		Failed to collect dependencies at com.epoint.ipm:epoint-jgzl-action:jar:2.0.0 
		-> com.epoint.ipm:epoint-jgzl-api:jar:2.0.0 -> com.epoint.ipm:epoint-jgzl-common:jar:2.0.0 
		-> e-iceblue:spire.pdf:jar:5.4.0: 
		Failed to read artifact descriptor for e-iceblue:spire.pdf:jar:5.4.0: Could not transfer 
		artifact e-iceblue:spire.pdf:pom:5.4.0 from/to epoint-nexus (http://192.168.0.99:8081/nexus/content/groups/public/): 
		Transfer failed for http://192.168.0.99:8081/nexus/content/groups/public/e-iceblue/spire.pdf/5.4.0/spire.pdf-5.4.0.pom: 
		Connect to 192.168.0.99:8081 [/192.168.0.99] failed: Connection timed out: connect -> [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
十二月 06, 2022 3:37:31 下午 java.util.prefs.WindowsPreferences <init>

警告: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.


原因分析

原因可能是我们,在使用eclipse导入Maven工程,没有Maven update更新构建解析工程,让一些依赖相互引用或者是可能我们在使用Tomcat插件启动项目的时候,没有勾选相关的选项


解决方案:

首先,我们可以使用eclipse中的Maven插件,选中工程进行Maven clean清楚依赖,然后再Maven install下载回来依赖
在这里插入图片描述
然后,就是选中所有的工程进行,Maven update重新构建Maven工程
在这里插入图片描述
最后,我们在使用Tomcat插件启动项目的时候,进行配置一下添加解析的工程文件,然后再启动在这里插入图片描述

在这里插入图片描述

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

在下BUG,有李了

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值