ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

IntelliJ IDEA创建多模块项目

2020-12-17 17:01:07  阅读:171  来源: 互联网

标签:xml center IDEA idea pom 模块 push properties IntelliJ


1 创建跟项目

1 方式一:在git上面创建项目,然后在IDEA通过git下载下来。
2 方式二:直接在Idea上面创建。
创建push-center项目
在这里插入图片描述

在这里插入图片描述
填写包信息
在这里插入图片描述

删除src
在这里插入图片描述
添加.gitignore

# Created by .ignore support plugin (hsz.mobi)
### Java template
# Compiled class file
*.class

# Log file
*.log
logs/

# BlueJ files
*.ctxt

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

### Maven template
target/
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
pom.xml.next
release.properties
dependency-reduced-pom.xml
buildNumber.properties
.mvn/timing.properties

### JetBrains template
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
.idea
*.iml
*.ipr

# CMake
cmake-build-*/

# File-based project format
*.iws

# IntelliJ
out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

# Editor-based Rest Client
.idea/httpRequests

# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser

### NetBeans ###
nbproject/private/
build/
nbbuild/
dist/
nbdist/

target
**/target
!/.gitignore
!.mvn/wrapper/maven-wrapper.jar

application.pid

在这里插入图片描述

2 添加子模块

创建4个子模块,方式一模一样:
push-center-biz:业务逻辑层。service的impl实现层
push-center-api:service的接口定义层。
push-center-web:restful的接口层。
push-center-task:定时任务,mq处理层。

在这里插入图片描述
在这里插入图片描述

在这里插入图片描述

4个子模块都定义好之后
在这里插入图片描述

3 父模块的pom.xml

packaging需要为pom

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.clevercode.wx.push</groupId>
    <artifactId>push-center</artifactId>
    <packaging>pom</packaging>
    <version>0.0.1-SNAPSHOT</version>

    <modules>
        <module>push-center-biz</module>
        <module>push-center-web</module>
        <module>push-center-api</module>
        <module>push-center-task</module>
    </modules>

    <name>push-center</name>
    <description>wx  push-center</description>
    。。。。。。。。。

标签:xml,center,IDEA,idea,pom,模块,push,properties,IntelliJ
来源: https://blog.csdn.net/CleverCode/article/details/111318650

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有