zoukankan      html  css  js  c++  java
  • 父子项目

    1、建立一个maven项目,项目根目录POM
       <groupid>组织项目名</groupid>
       <artifactid>account</artifactid>
       <version>1.0.0-SNAPSHOT</version>
       <package>pom</package>
       <modules>
          <module>account-mail</module>
          <module>account-persist</module>
       </modules>
    2、目录结构
       account
          -pom.xml
          -acount-mail
            -pom.xml
          -accout-persist
            -pom.xml
    3、子项目的关键配置
      <parent>
        <groupid>parentgroupid</groupid>
        <artifactid>parentartifactid</artifactid>
        <version>parentversion</version>
        <relativePath>../pom.xml</relativePath>
      </parent>
      提取公共可继承的配置元素到父配置中
    4、注意父项目的依赖配置,可以仅仅为了减少配置,不实际引入依赖.
       子模块依然要显式的定义依赖,不过可以省略部分元素条目
       在父亲POM中定义
      <dependencyManagement>
        <dependency></dependency>
      </dependencyManagement>
    5、聚合父项目的依赖导入
      <dependencyManagement>
        <dependency>
           <groupid></groupid>
           <artifactid></artifactid>
          <scope>import</scope>---导入另一个父项目的依赖声明
        </dependency>
      </dependencyManagement>
    6、聚合父项目的插件管理,类似依赖管理,不实际产生影响,只为了简化子项目配置
       匹配时才会起作用
       <pluginManagement>
         <plugins></plugins>
       </pluginManagement>
    7、所有pom继承超级POM,定义了默认约定
    8、构建顺序
    mvn clean install
      -pl 构造指定的模块
      -am 构造指定模块时,同时构造它的依赖,依赖提前
      -amd 构造指定模块时,同时构造子模块
      -rf --完整构造基础上,顺序提前构造指定模块

  • 相关阅读:
    js判断值是否为数字
    人脸识别 python调用face++ 功能测试
    【转载】Cesium基础使用介绍
    数据分析R&Python-Rpy2包环境配置
    VR/AR软件—Mirra测试(截至2017/11/13),使AR/VR创作更加便捷
    Cesium左右立体视觉续篇——遗留问题(渲染错误)以及临时替代方案
    在CesiumVR基础上实现3D左右立体视觉
    关于css样式的选择问题
    圣杯布局和双飞翼布局
    冒泡排序法
  • 原文地址:https://www.cnblogs.com/justart/p/11519718.html
Copyright © 2011-2022 走看看