|
|
<?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.math</groupId>
|
|
|
<artifactId>math-test-generator</artifactId>
|
|
|
<version>1.0.0</version>
|
|
|
|
|
|
<!-- 项目属性配置 -->
|
|
|
<properties>
|
|
|
<maven.compiler.source>8</maven.compiler.source>
|
|
|
<maven.compiler.target>8</maven.compiler.target>
|
|
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
|
|
<!-- 指定主类 -->
|
|
|
<main.class>Main</main.class>
|
|
|
</properties>
|
|
|
|
|
|
<!-- 项目依赖 -->
|
|
|
<dependencies>
|
|
|
<!-- JUnit测试框架 -->
|
|
|
<dependency>
|
|
|
<groupId>junit</groupId>
|
|
|
<artifactId>junit</artifactId>
|
|
|
<version>4.13.2</version>
|
|
|
<scope>test</scope>
|
|
|
</dependency>
|
|
|
</dependencies>
|
|
|
|
|
|
<!-- 构建配置 -->
|
|
|
<build>
|
|
|
<plugins>
|
|
|
<!-- 编译器插件配置 -->
|
|
|
<plugin>
|
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
|
<artifactId>maven-compiler-plugin</artifactId>
|
|
|
<version>3.8.1</version>
|
|
|
<configuration>
|
|
|
<source>8</source>
|
|
|
<target>8</target>
|
|
|
<encoding>UTF-8</encoding>
|
|
|
</configuration>
|
|
|
</plugin>
|
|
|
|
|
|
<!-- 创建可执行JAR的插件 -->
|
|
|
<plugin>
|
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
|
<artifactId>maven-jar-plugin</artifactId>
|
|
|
<version>3.2.2</version>
|
|
|
<configuration>
|
|
|
<archive>
|
|
|
<manifest>
|
|
|
<!-- 指定主类 -->
|
|
|
<mainClass>${main.class}</mainClass>
|
|
|
<!-- 添加类路径 -->
|
|
|
<addClasspath>true</addClasspath>
|
|
|
<classpathPrefix>lib/</classpathPrefix>
|
|
|
</manifest>
|
|
|
</archive>
|
|
|
</configuration>
|
|
|
</plugin>
|
|
|
|
|
|
<!-- 依赖拷贝插件,用于将依赖复制到指定目录 -->
|
|
|
<plugin>
|
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
|
<artifactId>maven-dependency-plugin</artifactId>
|
|
|
<version>3.3.0</version>
|
|
|
<executions>
|
|
|
<execution>
|
|
|
<id>copy-dependencies</id>
|
|
|
<phase>package</phase>
|
|
|
<goals>
|
|
|
<goal>copy-dependencies</goal>
|
|
|
</goals>
|
|
|
<configuration>
|
|
|
<outputDirectory>${project.build.directory}/lib</outputDirectory>
|
|
|
<overWriteReleases>false</overWriteReleases>
|
|
|
<overWriteSnapshots>false</overWriteSnapshots>
|
|
|
<overWriteIfNewer>true</overWriteIfNewer>
|
|
|
</configuration>
|
|
|
</execution>
|
|
|
</executions>
|
|
|
</plugin>
|
|
|
|
|
|
<!-- 程序集插件,创建包含所有依赖的fat jar -->
|
|
|
<plugin>
|
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
|
<artifactId>maven-assembly-plugin</artifactId>
|
|
|
<version>3.4.2</version>
|
|
|
<configuration>
|
|
|
<archive>
|
|
|
<manifest>
|
|
|
<mainClass>${main.class}</mainClass>
|
|
|
</manifest>
|
|
|
</archive>
|
|
|
<descriptorRefs>
|
|
|
<!-- 创建一个包含所有依赖的jar -->
|
|
|
<descriptorRef>jar-with-dependencies</descriptorRef>
|
|
|
</descriptorRefs>
|
|
|
<finalName>math-test-generator</finalName>
|
|
|
<appendAssemblyId>false</appendAssemblyId>
|
|
|
</configuration>
|
|
|
<executions>
|
|
|
<execution>
|
|
|
<id>make-assembly</id>
|
|
|
<phase>package</phase>
|
|
|
<goals>
|
|
|
<goal>single</goal>
|
|
|
</goals>
|
|
|
</execution>
|
|
|
</executions>
|
|
|
</plugin>
|
|
|
</plugins>
|
|
|
</build>
|
|
|
</project> |