1. 程式人生 > >maven的pom.xml配置文件中常用的配置標簽解析(2018-03-13)

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

pid scope nic beta class 公測 manage gin release

來自: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)