以下是常用的pom可配置元素及其含义
<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">
<modelVersion>4.0.0</modelVersion>
<!-- 父模块 -->
<parent>
<groupId>com.jiangnan.shop</groupId>
<artifactId>shop-parent</artifactId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../shop-parent/pom.xml</relativePath>
</parent>
<!-- GAV -->
<groupId>com.xxx.helloworld</groupId>
<artifactId>helloworld-parent</artifactId>
<version>1.0.0</version>
<!-- 打包方式 -->
<packaging>pom</packaging>
<!-- 项目友好名称 -->
<name>mediator-parent</name>
<!-- 项目地址 -->
<url>http://www.chinacloud.net/index.html</url>
<!-- 模块聚合 -->
<modules>
<module>../mediator-dataobjects</module>
</modules>
<!-- 简短描述 -->
<description>hello world测试项目</description>
<!-- 目构建环境中的前提条件 -->
<prerequisites>
<maven>暂时没有前提条件</maven>
</prerequisites>
<!-- 仓库 -->
<repositories>
<repository>
<id>nexus</id>
<name>Team Nexus Repository</name>
<url>http://10.80.6.34:8081/nexus/content/groups/public</url>
</repository>
</repositories>
<!-- 插件仓库 -->
<pluginRepositories>
<pluginRepository>
<id>nexus</id>
<name>Team Nexus Repository</name>
<url>http://10.80.6.34:8081/nexus/content/groups/public</url>
</pluginRepository>
</pluginRepositories>
<!-- 问题管理系统 -->
<issueManagement>
<system></system>
<url></url>
</issueManagement>
<!-- 邮件列表 -->
<mailingLists>
<mailingList>
<name>zhangsan</name>
<post>zhangsan@gmail.com</post>
</mailingList>
</mailingLists>
<!-- 项目开发人员列表 -->
<developers>
<developer>
<id>zhangsan</id>
<name>zhangsan</name>
<email>zhangsan@gmail.com</email>
<roles>
<role>senior software engineer</role>
</roles>
<timezone>8</timezone>
</developer>
</developers>
<!-- scm信息 -->
<scm>
<connection>scm:svn://10.176.120.50/helloworld</connection>
<developerConnection>scm:svn://10.176.120.50/helloworld</developerConnection>
<tag>scm:svn://10.176.120.50/helloworld</tag>
<url></url>
</scm>
<!-- 自定义属性 -->
<properties>
<junit.version>4.7</junit.version>
</properties>
<!-- 依赖管理 -->
<dependencyManagement>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
</dependencyManagement>
<!-- 自定义构建 -->
<build>
<!-- 插件 -->
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.0</version>
<configuration>
<source>${jdk.version}</source>
<target>${jdk.version}</target>
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
</plugin>
</plugins>
</build>
<!-- 分发管理,在执行mvn deploy后表示要发布的位置 -->
<distributionManagement>
<!-- 发布版本的仓库 -->
<repository>
<id>xxx-release</id>
<url>http://192.168.1.210:8080/nexus-2.0/content/repositories/xxx-release</url>
</repository>
<!-- 快照版本的仓库 -->
<snapshotRepository>
<id>xxx-snapshots</id>
<url>http://192.168.1.210:8080/nexus-2.0/content/repositories/xxx-snapshots</url>
</snapshotRepository>
</distributionManagement>
</project>
1193

被折叠的 条评论
为什么被折叠?



