78 lines
2.4 KiB
XML
78 lines
2.4 KiB
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.example</groupId>
|
||
<artifactId>drone-test</artifactId>
|
||
<version>1.0</version>
|
||
<packaging>jar</packaging>
|
||
|
||
<properties>
|
||
<maven.compiler.source>8</maven.compiler.source>
|
||
<maven.compiler.target>8</maven.compiler.target>
|
||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||
</properties>
|
||
|
||
<dependencies>
|
||
<dependency>
|
||
<groupId>org.junit.jupiter</groupId>
|
||
<artifactId>junit-jupiter</artifactId>
|
||
<version>5.12.2</version>
|
||
<scope>test</scope>
|
||
</dependency>
|
||
</dependencies>
|
||
|
||
<build>
|
||
<plugins>
|
||
<!-- Maven 编译插件 -->
|
||
<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>
|
||
|
||
<!-- Maven JAR 插件,用于生成可执行 JAR -->
|
||
<plugin>
|
||
<groupId>org.apache.maven.plugins</groupId>
|
||
<artifactId>maven-jar-plugin</artifactId>
|
||
<version>3.2.0</version>
|
||
<configuration>
|
||
<archive>
|
||
<manifest>
|
||
<mainClass>com.example.App</mainClass>
|
||
</manifest>
|
||
</archive>
|
||
</configuration>
|
||
</plugin>
|
||
|
||
<!-- Maven Shade 插件,用于生成包含所有依赖的可执行 JAR(可选) -->
|
||
<plugin>
|
||
<groupId>org.apache.maven.plugins</groupId>
|
||
<artifactId>maven-shade-plugin</artifactId>
|
||
<version>3.2.4</version>
|
||
<executions>
|
||
<execution>
|
||
<phase>package</phase>
|
||
<goals>
|
||
<goal>shade</goal>
|
||
</goals>
|
||
<configuration>
|
||
<transformers>
|
||
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
|
||
<mainClass>com.example.App</mainClass>
|
||
</transformer>
|
||
</transformers>
|
||
</configuration>
|
||
</execution>
|
||
</executions>
|
||
</plugin>
|
||
</plugins>
|
||
</build>
|
||
</project> |