eclipse m2Eclipse 插件:“解决工作区工件”有什么作用?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/13205734/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
m2Eclipse plugin: What does 'Resolve Workspace Artifacts' do?
提问by ecbrodie
I'm sorry if I am asking a possibly-trivial question, but I am having so much trouble finding out exactly what Resolve Workspace Artifactsdoes in the Maven build window in the Eclipse IDE, using the M2Eclipse plugin. I'm referring to this:
如果我问的是一个可能无关紧要的问题,我很抱歉,但是我很难使用 M2Eclipse 插件在 Eclipse IDE 的 Maven 构建窗口中找出Resolve Workspace Artifacts究竟做了什么。我指的是这个:
Does anyone have any idea? I tried google-ing and stackoverflow-ing the solution; there are lots of bug requests/reports but no clear-cut descriptions of this option. Thanks for the help.
有谁有想法吗?我尝试了 google-ing 和 stackoverflow-ing 的解决方案;有很多错误请求/报告,但没有对此选项的明确描述。谢谢您的帮助。
采纳答案by Yogendra Singh
Assume you have two or more projects in your workspace e.g. project1
, project2
and so on. If project1
is dependent on project2
and project3
, you just need to define the dependency of project1
on project2
and project3
.
假设您的工作区中有两个或多个项目,例如project1
,project2
等等。如果project1
依赖于project2
and project3
,则只需要定义project1
onproject2
和的依赖关系即可project3
。
By enabling Resolve Workspace Artifacts
, m2Eclipse
will auto-build the SNAPSHOT JAR
of project2
and project3
and add in the classpath of project1
.
通过启用Resolve Workspace Artifacts
,m2Eclipse
将会自动建立SNAPSHOT JAR
的project2
,并project3
与加入的类路径project1
。
In other words, it resolves the dependencies with workspace projects.
换句话说,它解决了与工作区项目的依赖关系。