zoukankan      html  css  js  c++  java
  • Maven 高级应用

    • Maven 的高级应用主要体现在 依赖聚合继承 *

    依赖

    就是在当前项目的pom.xml 总引入依赖的坐标

    最最经常用到的

    <dependencies>
            <dependency>
                <groupId>com.oracle</groupId>
                <artifactId>ojdbc6</artifactId>
                <version>11.2.0.1.0</version>
            </dependency>
    </dependencies>
    

    继承

    1. 修改父项目的pom文件坐标,将jar改为pom

      <packaging>pom</packaging>
      
    2. 修改子项目的pom文件,添加<parant>

    <parent>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-parent</artifactId>
            <version>1.5.19.RELEASE</version>
            <relativePath/>
            <!-- lookup parent from repository -->
        </parent>
    

    聚合

    更改父项目的pom文件

    聚合 子项目。。

      <modules>  
            <module>../task-common</module>  
            <module>../task-sla</module>  
            <module>../task-sla-web</module>  
            <module>../task-web-dist</module>  
        </modules>
    
  • 相关阅读:
    Python #面向对象
    Python #@property属性
    Linux # screen 用法
    Shell #监控进程脚本
    Linux # nethogs
    Python #logging
    Python #time
    Python # 一个api接口调用POST请求
    Python # 和风天气接口
    IP地址的组成
  • 原文地址:https://www.cnblogs.com/adrien/p/10700330.html
Copyright © 2011-2022 走看看