Maven的一个基础pom.xml文件结构
Posted Loading ...
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Maven的一个基础pom.xml文件结构相关的知识,希望对你有一定的参考价值。
<?xml version="1.0" encoding="UTF-8"?> <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> <groupId>com.hrvy</groupId> <artifactId>MavenProject-WebApp</artifactId> <version>0.0.1-SNAPSHOT</version> <packaging>war</packaging> <name>MavenProject-WebApp Maven Webapp</name> <!-- FIXME change it to the project‘s website --> <url>http://www.example.com</url> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.target>1.8</maven.compiler.target> </properties> <!-- 引用依赖定义 --> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.11</version> <scope>test</scope> </dependency> </dependencies> <build> <finalName>MavenProject-WebApp</finalName> <!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) --> <pluginManagement> <plugins> <plugin> <artifactId>maven-clean-plugin</artifactId> <version>3.1.0</version> </plugin> <plugin> <artifactId>maven-resources-plugin</artifactId> <version>3.0.2</version> </plugin> <plugin> <artifactId>maven-compiler-plugin</artifactId> <version>3.8.0</version> </plugin> <plugin> <artifactId>maven-surefire-plugin</artifactId> <version>2.22.1</version> </plugin> <plugin> <artifactId>maven-war-plugin</artifactId> <version>3.2.2</version> </plugin> <plugin> <artifactId>maven-install-plugin</artifactId> <version>2.5.2</version> </plugin> <plugin> <artifactId>maven-deploy-plugin</artifactId> <version>2.8.2</version> </plugin> </plugins> </pluginManagement> </build> </project>
以上是关于Maven的一个基础pom.xml文件结构的主要内容,如果未能解决你的问题,请参考以下文章
Maven的pom.xml文件结构之基本配置parent和继承结构
Maven的pom.xml文件结构之基本配置parent和继承结构[转]