码迷,mamicode.com
首页 > 其他好文 > 详细

maven的pom.xml配置文件中常用的配置标签解析(2018-03-13)

时间:2018-03-13 14:04:23      阅读:189      评论:0      收藏:0      [点我收藏+]

标签:模块名   描述   html   jar   release   bsp   ase   UI   mod   

来自:https://www.cnblogs.com/Nick-Hu/p/7288198.html

拿过来记录下

<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/maven-v4_0_0.xsd">
  <!-- 指定当前pom的版本 -->
  <modelVersion>4.0.0</modelVersion>
  
  <!-- 一、项目的坐标信息-->
  <groupId>反写的公司网址+项目名</groupId>
  <artifactId>项目名+模块名</artifactId>
  <!--
    第一个o:大版本:号
    第二个0:分支版本号
    第三个0:小版本号
    版本类型划分:1.SNAPSHOT(快照) 
                  2.alpha(内测)
                  3.beta(公测)
                  4.Release(稳定)
                  5.GA(正式)
  -->
  <version>0.0.1SNAPSHOT</version>
  <!--maven项目打包方式:默认:jar,可指定war、zip、pom--->
  <packaging></packaging>
  <!--项目描述名-->
  <name></name>
  <!--项目地址-->
  <url></url>
  <!--项目描述-->
  <description></description>
  <!--开发人员信息-->
  <developers></developers>
  <!--许可证信息-->
  <licenses></licenses>
  <!--组织信息-->
  <organization></organization>

  <!--二、依赖列表-->
  <dependencies>
      <!--依赖坐标-->
      <dependency>
          <groupId>junit</groupId>
          <artifactId>junit</artifactId>
          <version>4.10</version>
          <type></type>
          <!-- 依赖范围:test-->
          <scope>test</scope>
          <!--设置依赖是否可选:true/false默认是后者-->
          <optional>false</optional>
          <!--排除依赖传递列表-->
          <exclusions>
              <!--排除部分不需要的依赖-->
              <exclusion></exclusion>
          </exclusions>
      </dependency>
  </dependencies>

  <!--三、依赖的管理:定义父模块的jar包便于子模块的继承-->
  <dependencyManagement>
      <dependencies>
        <dependency></dependency>
      </dependencies>
  </dependencyManagement>

  <!--四、插件列表:需指定插件的坐标-->
  <build>
      <plugin>
          <groupId></groupId>
          <artifactId></artifactId>
          <version></version>
      </plugin>
  </build>

  <!--五、用于子模块对于父模块pom的继承-->
  <parent></parent>

  
  <!--六、指定多个模块,可同时编译等操作-->
  <modules></modules>
</project>

 

maven的pom.xml配置文件中常用的配置标签解析(2018-03-13)

标签:模块名   描述   html   jar   release   bsp   ase   UI   mod   

原文地址:https://www.cnblogs.com/scevecn/p/8555941.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!