Maven Eclipse工作区分辨率 [英] maven eclipse workspace resolution

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

问题描述

我的工作区中有2个Maven项目.它们不是多模块项目,而是两个单独的项目.在一个项目中,我将另一个作为依赖项.我打开了工作空间解析,但是它尝试去存储库中找到它.我尝试删除没有运气的两个项目的重新导入,并且我使用的是最新版本的m2eclipse(0.12.1).我认为这应该可行,但不可行-有什么想法吗?

poms的相关部分看起来像

项目A

<project>
 <groupId>my.company</groupId>
 <artifactId>project</artifactId>
 <version>1.0-SNAPSHOT</version>
 <name>my project</name>
</project>

项目B

<dependencies>
  <dependency>
    <groupId>my.company</groupId>
    <artifactId>project</artifactId>
    <version>1.0-SNAPSHOT</version>
  </dependency>
</dependencies>

解决方案

看起来您有m2eclipse的旧版本-正如Guillaume Polet所提到的,m2eclipse插件的最新版本为1.0.

获取最新版本的最简单方法是打开Eclipse市场,搜索"Maven"并安装"Maven Integration插件"(以及WTP插件,因为您似乎正在使用它). /p>

I have 2 maven projects in my workspace. They are not a multi-module project, but two separate ones. In one project, I reference the other as a dependency. I have workspace resolution turned on, but it tries to go out to the repository to find it. I've tried deleting an reimporting both projects with no luck, and I'm using the latest version of m2eclipse (0.12.1). I am under the impression that this should work, but does not - any thoughts why?

Edit: The relevant sections of the poms looks like

Project A

<project>
 <groupId>my.company</groupId>
 <artifactId>project</artifactId>
 <version>1.0-SNAPSHOT</version>
 <name>my project</name>
</project>

Project B

<dependencies>
  <dependency>
    <groupId>my.company</groupId>
    <artifactId>project</artifactId>
    <version>1.0-SNAPSHOT</version>
  </dependency>
</dependencies>

解决方案

Looks like you have an old version of m2eclipse - as Guillaume Polet mentioned, the latest version of the m2eclipse plugin is 1.0 something.

The easiest way to get the latest version is to open the eclipse marketplace, search for 'Maven' and install the 'Maven Integration plugin' (and possibly the WTP plugin as well, since you seem to be using that).

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

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