https://start.spring.iospring
<?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/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>[GROUP ID]</groupId> <artifactId>[ARTIFACT_ID]</artifactId> <packaging>jar</packaging> <version>0.0.1-SNAPSHOT</version> <!-- 基本屬性和自定義屬性 --> <properties> <maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.target>1.8</maven.compiler.target> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties> <!-- 依賴關係 --> <dependencies> </dependencies> <build> <plugins> <!-- 若是須要對源代碼打包 --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-source-plugin</artifactId> <executions> <execution> <goals> <goal>jar</goal> </goals> </execution> </executions> </plugin> <!-- 若是須要打包的時候拷貝依賴庫 --> <plugin> <artifactId>maven-dependency-plugin</artifactId> <executions> <execution> <phase>package</phase> <goals> <goal>copy-dependencies</goal> </goals> <configuration> <outputDirectory>${project.build.directory}/lib</outputDirectory> </configuration> </execution> </executions> </plugin> <!-- 若是項目須要分發到倉庫 --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-deploy-plugin</artifactId> </plugin> </plugins> </build> <!-- 項目分發的倉庫配置 --> <distributionManagement> <repository> <id>nexus-releases</id> <name>public</name> <url>http://[repository-server]/nexus/content/repositories/releases/</url> </repository> <snapshotRepository> <id>nexus-snapshots</id> <name>Snapshots</name> <url>http://[repository-server]/nexus/content/repositories/snapshots/</url> </snapshotRepository> </distributionManagement> </project>