zoukankan      html  css  js  c++  java
  • maven的多模块项目搭建

    首先,创建一个父工程作为管理模块。

    <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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
        <modelVersion>4.0.0</modelVersion>
    
        <groupId>com.hll</groupId>
        <artifactId>bigbang</artifactId>
        <version>${bigbang.version}</version>
        <modules>
            <module>bigbang-web-user</module>
            <module>bigbang-facade-user</module>
            <module>bigbang-service-user</module>
        </modules>
        <packaging>pom</packaging>
    
        <dependencyManagement>
            <dependencies>
                <!-- 项目模块依赖 -->
                <dependency>
                    <groupId>com.hll</groupId>
                    <artifactId>bigbang-facade-user</artifactId>
                    <version>${bigbang.version}</version>
                </dependency>
                <dependency>
                    <groupId>com.hll</groupId>
                    <artifactId>bigbang-web-user</artifactId>
                    <version>${bigbang.version}</version>
                </dependency>
                <dependency>
                    <groupId>com.hll</groupId>
                    <artifactId>bigbang-service-user</artifactId>
                    <version>${bigbang.version}</version>
                ........
    

      package类型为pom,modules中是各个子模块。需要注意的是在dependency中加入各个子模块的依赖,方便后续配置各模块之间的依赖。

    bigbang-facade-user的pom:

        <parent>
            <artifactId>bigbang</artifactId>
            <groupId>com.hll</groupId>
            <version>${bigbang.version}</version>
        </parent>
        <modelVersion>4.0.0</modelVersion>
    
        <artifactId>bigbang-facade-user</artifactId>
        <packaging>jar</packaging>
    

      打包类型为jar

    bigbang-web-user的pom:

        <parent>
            <artifactId>bigbang</artifactId>
            <groupId>com.hll</groupId>
            <version>${bigbang.version}</version>
        </parent>
        <modelVersion>4.0.0</modelVersion>
        <artifactId>bigbang-web-user</artifactId>
        <packaging>war</packaging>
    
        <dependencies>
            <dependency>
                <groupId>com.hll</groupId>
                <artifactId>bigbang-facade-user</artifactId>
            </dependency>
        ......
    

      bigbang-web-user依赖bigbang-facade-user

  • 相关阅读:
    单变量线性回归
    【记】国奖交流会
    转【研究生第一篇学术论文常犯问题总结】
    this.$confirm里面使用await异步调取接口数据
    margin和padding的值是百分比的时候是怎么计算的?
    原生js实现三级联动下拉框
    两个数组里面的对象元素根据相同的id合并到一个数组
    制作遮罩层的样式
    自定义表单验证方法的使用
    封装获取操作系统和浏览器类型的方法
  • 原文地址:https://www.cnblogs.com/huangll99/p/6663463.html
Copyright © 2011-2022 走看看