IDEA中的project和module

Project

Whatever you do in IntelliJ IDEA, you do that in the context of a project. A project is an organizational unit that represents a complete software solution. It serves as a basis for coding assistance, bulk refactoring, coding style consistency, etc.

Your finished product may be decomposed into a series of discrete, isolated modules, but it’s a project definition that brings them together and ties them into a greater whole.

Projects don’t themselves contain development artifacts such as source code, build scripts, or documentation. They are the highest level of organization in the IDE, and they define project-wide settings as well as collections of what IntelliJ IDEA refers to as modules and libraries.
无论你在IDEA中做什么,都是处于一个project的上下文环境中。一个project是一个代表完整的软件解决方案的组织单元。它作为一个基础服务于编码助手,块重构,编码样式一致性等。
你已经完成的产品可以被分解为一系列分离的、互相独立的module,但是project的定义把它们组合在一起并且联系成一个更大的整体。
project本身不包含诸如源代码,构建脚本或者文档这些工件。它们是IDE的最高层组织,并且定义了工程宽度设置和IDEA所涉及到的模块与库的集合。


Module

A module is a discrete unit of functionality which you can compile, run, test and debug independently.

Modules contain everything that is required for their specific tasks: source code, build scripts, unit tests, deployment descriptors, and documentation. However, modules exist and are functional only in the context of a project.
module是你编译、运行、测试和独立调试的分离的功能单元。
module包含它们被指定的任务所需要的一切:源代码,编译脚本,单元测试,部署描述和文档。然而,module只能在project的上下文中存在和起作用。


创建maven工程

这里写图片描述
选择File->New->Project,在左侧列表中选择Maven,在右侧页面中将“Create from archetype”打勾,可以从下面列表中选择一个你想要的archetype(常用的是quickstart和webapp的),也可以点击右上角的“Add Archetype”添加自己的archetype。点击next
这里写图片描述
输入工程的坐标,点击next
这里写图片描述
在列表中选择要使用的Maven(一般都是选自己安装的),点击next
这里写图片描述
输入工程名称和位置,点击finish。
maven工程就生成了。
这里写图片描述


创建Maven模块

选择File->New->Module->Maven,同上面创建maven工程。选择archetype后,点击next
这里写图片描述
选择要添加该module的project(我选择的就是上面创建的Maven工程),输入坐标,点击next,其他步骤同上面创建Maven工程,
这里写图片描述
输入模块名称,点击finish。
Maven模块就创建成功了。
这里写图片描述

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值