Maven工作区分辨率令人震惊 [英] Maven workspace resolution horked

查看:152
本文介绍了Maven工作区分辨率令人震惊的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用m2eclipse管理Maven项目.我以某种方式做了一件坏事,现在该系统的运行方式似乎已禁用了工作空间分辨率.

I'm using m2eclipse to manage maven projects. Somehow I did a bad thing, and now the system is behaving as if workspace resolution is disabled.

我有几个依赖于主项目的项目.该项目的版本为4.0-SNAPSHOT,所有相关项目在其poms的"dependencies"部分中都引用了它.一切工作正常,直到我创建了一个全新的项目并将pom从主项目错误地复制到新项目中.突然,所有从属项目都收到错误:

I have several projects that depend on a main project. This project has a version of 4.0-SNAPSHOT, and all the dependent projects reference it in the dependencies section of their poms. Everything was working fine until I created an entirely new project and mistakenly copied the pom from the main project into the new project. Suddenly, all of the dependent projects got the error:

容器'Maven依赖关系'引用了不存在的库C:\ users \ myusername.m2 \ com \ mydomain \ myproject \ 4.0-SNAPSHOT \ myproject-4.0-SNAPSHOT.jar

"The container 'Maven Dependencies" references non existing library C:\users\myusername.m2\com\mydomain\myproject\4.0-SNAPSHOT\myproject-4.0-SNAPSHOT.jar

我关闭了有问题的新项目,但所有相关项目的错误仍然存​​在.

I zapped the offending new project, but the error remains for all the dependent projects.

我对主项目或任何从属项目均未做任何更改(据我所知),因此我猜测Eclipse环境中发生了某些更改. m2eclipse或Maven本身可以在我可以吹走的任何地方维护设置吗?

I've made no changes (to my knowledge) in the main project or any of the dependent projects, so I'm guessing something got changed in the Eclipse environment. Does m2eclipse or Maven itself maintain settings anywhere that I can blow away?

推荐答案

没关系.答案是右键单击一个项目,然后选择"Maven/更新快照".

Never mind. The answer is to right-click on a project and pick Maven/Update Snapshots.

这篇关于Maven工作区分辨率令人震惊的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆