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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 19:19:32  来源:igfitidea点击:

m2Eclipse plugin: What does 'Resolve Workspace Artifacts' do?

javaeclipsemavenm2eclipsem2e

提问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究竟做了什么。我指的是这个:

Picture of my maven run configuration screen

我的 Maven 运行配置屏幕的图片

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, project2and so on. If project1is dependent on project2and project3, you just need to define the dependency of project1on project2and project3.

假设您的工作区中有两个或多个项目,例如project1project2等等。如果project1依赖于project2and project3,则只需要定义project1onproject2和的依赖关系即可project3

By enabling Resolve Workspace Artifacts, m2Eclipsewill auto-build the SNAPSHOT JARof project2and project3and add in the classpath of project1.

通过启用Resolve Workspace Artifactsm2Eclipse将会自动建立SNAPSHOT JARproject2,并project3与加入的类路径project1

In other words, it resolves the dependencies with workspace projects.

换句话说,它解决了与工作区项目的依赖关系。