zoukankan      html  css  js  c++  java
  • Maven中pom.xml常用元素说明

    <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">
      <!--指定了当前pom的版本-->
      <modelVersion>4.0.0</modelVersion>
    
      <!--坐标信息  start-->
      <groupId>反写的公司网址+项目名</groupId> <!--主项目标识-->
      <artifactId>项目名+模块名</artifactId>
      <!--第一个0表示大版本号
        第二个0表示分支版本号
        第三个0标识小版本号
        0.0.1SNAPSHOT
        snapshot快照
        alpha内测
        beta公测
        Release稳定
        GA正式发布
        -->
      <version></version>
      <!--打包方式:默认是jar
        war  zip  pom
      -->
      <packaging></packaging>
      <!--坐标信息  end-->
    
      <!--项目描述名-->
      <name>hi</name>
      <!--项目地址-->
      <url>http://maven.apache.org</url>
      <!--项目描述-->
      <description></description>
      <!--开发人员列表-->
      <developers></developers>
      <!--许可证信息-->
      <license></license>
      <!--组织信息-->
      <organization></organization>
      
      <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
      </properties>
    
      <!--依赖列表-->
      <dependencies>
        <!--依赖项-->
        <dependency>
          <!--项目坐标 start-->
          <groupId>junit</groupId>
          <artifactId>junit</artifactId>
          <version>3.8.1</version>
          <type></type>
          <scope>test</scope><!--指依赖范围-->
          <!--设置依赖范围是否可选:默认false-->
          <optional></optional>
          <!--排除依赖传递列表-->
          <executions>
            <execution></execution>
          </executions>
          <!--项目坐标 end-->
        </dependency>
      </dependencies>
      
      <!--依赖的管理-->
      <!--不会运行,即不会调用到依赖中
        一般定义在父模块中,供子模块调用
      -->
      <dependencyManagement>
        <dependencies>
            <dependency></dependency>
        </dependencies>
      </dependencyManagement>
      <!--提供支持-->
      <build>
            <!--插件列表-->
              <plugins>
                  <plugin>
                    <!--坐标-->
                      <groupId>org.apache.maven.plugins</groupId>
                      <artifactId>maven-source-plugin</artifactId>
                      <version>2.4</version>
                      <executions>
                          <execution>
                              <phase>package</phase>
                              <goals>
                                  <goal>jar-no-fork</goal>
                              </goals>
                          </execution>
                      </executions>
                  </plugin>
              </plugins>
      </build>
      <!--子模块对父模块的继承-->
      <parent></parent>
      <!--聚合多个模块进行编译,可多个子项-->
      <modules>
        <module></module>
      </modules>
       
    </project>
  • 相关阅读:
    《杜教筛》
    《洛谷P4213 【模板】杜教筛(Sum)》
    《洛谷P1829 [国家集训队]Crash的数字表格 / JZPTAB》
    《纸牌问题》
    《洛谷P2522 [HAOI2011]Problem b》
    使用urlretrieve下载图片
    scrapy初探
    爬豆瓣电影名
    直接插入排序
    Windows python 3 安装OpenCV
  • 原文地址:https://www.cnblogs.com/shindo/p/5022083.html
Copyright © 2011-2022 走看看