maven配置文件不对导致的错误

在进行mvn操作时报错信息,一直以为是版本不对问题,还对项目的各个pom依赖,以及父项目的进行了各种排查,其实都不后,最后终于发现问题原因

1、之前的mvn操作都是通过idea进行的clean和package等操作,并且idea上的maven配置是修改过的,指向的是E:\m2\settings.xml

2、今天是直接在命令行操作,这时候使用的是默认位置的settings.xml配置,在C盘上,由于不是同一个配置文件,报错了

3、最后把idea的使用的settings.xml文件,复制到命令行默认的路径,替换即可

下面是开始时,提示错误信息,提醒自己下次要记住了,否则又要浪费时间了

E:\project\test>mvn dependencies:tree
[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM for com.demo.test:test:1.0-SNAPSHOT: Failure to find com.demo.test:test:pom:2.0.1 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will no
t be reattempted until the update interval of central has elapsed or updates are forced and 'parent.relativePath' points at wrong local POM @ line 7, column 13
 @
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR]   The project com.demo.test:olap:1.0-SNAPSHOT (E:\project\test\pom.xml) has 1 error
[ERROR]     Non-resolvable parent POM for com.demo.test:olap:1.0-SNAPSHOT: Failure to find com.demo.test:test:pom:2.0.1 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution wil
l not be reattempted until the update interval of central has elapsed or updates are forced and 'parent.relativePath' points at wrong local POM @ line 7, column 13 -> [Help 2]
[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/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值