与Maven合作

编程入门 行业动态 更新时间:2024-10-17 05:29:01
本文介绍了与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 out the code to Eclipse, and then building it from the command line, I followed the instructions and 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合作

本文发布于:2023-11-12 20:03:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1582405.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Maven

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!