eclipse 创建maven模块

时间:2023-03-09 14:30:52
eclipse 创建maven模块

先创建一个聚合模块。

eclipse 创建maven模块

勾选Create a simple project

eclipse 创建maven模块

点击finish 。

eclipse 创建maven模块

看到已经创建好了这个聚合。

eclipse 创建maven模块

接下来我们创建子模块。pay-hk  pay-web 两个字模块,前面一个是普通maven项目,后面一个是maven web项目。

创建pay-hk 子模块:

选择Maven Module

eclipse 创建maven模块

点击Next

eclipse 创建maven模块

选择这个模板:

eclipse 创建maven模块

点击Finish

eclipse 创建maven模块

我们看到项目已经创建好了。

eclipse 创建maven模块

接下来我们创建一个子模块的web项目。

eclipse 创建maven模块

上面的操作都一样,这个地方选择模板的时候 选择maven-archetype-webapp

eclipse 创建maven模块

eclipse 创建maven模块

点击finish 我们可以看到:

eclipse 创建maven模块

项目已经创建好,比普通项目多一个文件夹 webapp 下面有web.xm文件。

我们看到index.jsp报错了,原因是没有导入servlet包.

eclipse 创建maven模块

到此已完成了maven 聚合模块的项目创建全过程。如有不懂的可以问我