与Maven合作

扫码查看
本文介绍了与Maven合作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我下载了与Maven一起工作的某些项目的Java源代码。在检查
代码到Eclipse之后,然后从命令行构建它,我按照说明
并将其从Eclipse导入为:File> Import> Maven Projects。现在我有核心的源代码和许多额外的子项目,似乎有与核心相同的东西,只是分开。



任何人都可以解释一下这些子项目是什么?为什么我需要他们如果我想要修改,那么我现在需要工作的代码,核心或新的导入的Maven?



除了它是构建代码和管理版本的工具之外,我对Maven一无所知。



谢谢!

解决方案

在Maven土地上,这些被称为模块。有一个很好的方式来进一步将项目划分成非常独特的部分。



人们以不同的方式处理Maven。我看到项目有实际的项目模块,然后是10个左右的实现模块。大多数人使用它们进行上述分离。



很可能,您需要所有的模块才能正常工作。



要修改项目,您需要使用Maven。我不知道Eclipse是否有嵌入式的maven,但至少NetBeans。有了这个,你可以修改任何你想要的,然后用Maven构建它,这应该只是一个简单的点击。


I downloaded Java source code of some project that works with Maven. After checking outthe code to Eclipse, and then building it from the command line, I followed the instructionsand imported it from Eclipse as: File > Import > Maven Projects. Now I have the core source code and many additional sub projects that seem to have the same thing like the core, just separated.

Could anyone please explain me what are these sub projects? why I need them? and on which code I need to work now if I want to make changes, the core or the new imported Maven ones?

I don't know nothing about Maven besides the fact that it's a tool for building code and managing releases.

Thanks!

解决方案

In Maven land, these are called modules. There a nice way to further divide a project into very distinct pieces.

People handle Maven differently. I've seen projects where there was the actual project module, then 10 or so implementation modules. Most people use them for the above mentioned separation.

Most likely, your going to need all of the modules in order to work correctly.

To modify the project, your going to need Maven. I don't know if Eclipse has an embedded maven, but at least NetBeans does. With this you can modify anything that you want, then build it with Maven, which should be just a simple click.

这篇关于与Maven合作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-23 06:24
查看更多