美文网首页
dependencyManagement管理依赖

dependencyManagement管理依赖

作者: pure_joy | 来源:发表于2018-09-17 11:51 被阅读25次
    dependencyManagement的作用:Maven使用dependencyManagement元素来提供了一种管理依赖版本号的方式
    <dependencyManagement>
      <dependencies>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <version>3.0.1</version>
            <scope>provided</scope>
        </dependency>
    
        <dependency>
            <groupId>java.servlet.jsp</groupId>
            <artifactId>jsp-api</artifactId>
            <version>2.0</version>
            <scope>provided</scope>
        </dependency>
    
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.11</version>
            <scope>provided</scope>
        </dependency>
    
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>5.1.21</version>
            <scope>provided</scope>
        </dependency>
      </dependencies>
    </dependencyManagement>
    

    相关文章

      网友评论

          本文标题:dependencyManagement管理依赖

          本文链接:https://www.haomeiwen.com/subject/ykbknftx.html