123 lines
5.0 KiB
XML
123 lines
5.0 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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||
<modelVersion>4.0.0</modelVersion>
|
||
<parent>
|
||
<groupId>org.springframework.boot</groupId>
|
||
<artifactId>spring-boot-starter-parent</artifactId>
|
||
<version>3.5.3</version>
|
||
<relativePath/> <!-- lookup parent from repository -->
|
||
</parent>
|
||
<groupId>cn.somkit</groupId>
|
||
<artifactId>fmt</artifactId>
|
||
<version>1.2.0</version>
|
||
<name>fmt</name>
|
||
<description>fmt</description>
|
||
<properties>
|
||
<java.version>21</java.version>
|
||
</properties>
|
||
|
||
<repositories>
|
||
<repository>
|
||
<id>metona-maven</id>
|
||
<url>https://gitee.com/thzxx/maven/raw/master</url>
|
||
</repository>
|
||
</repositories>
|
||
|
||
<dependencies>
|
||
<dependency>
|
||
<groupId>org.springframework.boot</groupId>
|
||
<artifactId>spring-boot-starter-web</artifactId>
|
||
</dependency>
|
||
<dependency>
|
||
<groupId>org.springframework.boot</groupId>
|
||
<artifactId>spring-boot-starter-thymeleaf</artifactId>
|
||
</dependency>
|
||
|
||
<dependency>
|
||
<groupId>cn.hutool</groupId>
|
||
<artifactId>hutool-json</artifactId>
|
||
<version>5.8.25</version>
|
||
</dependency>
|
||
|
||
<dependency>
|
||
<groupId>cn.metona</groupId>
|
||
<artifactId>metona-cache-spring-boot-starter</artifactId>
|
||
<version>1.0.0</version>
|
||
</dependency>
|
||
</dependencies>
|
||
|
||
<build>
|
||
<plugins>
|
||
<plugin>
|
||
<groupId>org.apache.maven.plugins</groupId>
|
||
<artifactId>maven-jar-plugin</artifactId>
|
||
<configuration>
|
||
<archive>
|
||
<!-- 生成的jar中不要包含pom.xml和pom.properties这两个文件 -->
|
||
<addMavenDescriptor>false</addMavenDescriptor>
|
||
<manifest>
|
||
<!-- 将所有第三方 jar 添加到项目 jar 的 MANIFEST.MF 文件中,这样运行 jar 时依赖包才能被加载 -->
|
||
<addClasspath>true</addClasspath>
|
||
<!-- 指定复制第三方 jar 的目标目录为 target/lib/-->
|
||
<classpathPrefix>lib/</classpathPrefix>
|
||
<!--这里需要修改为你的项目的主启动类-->
|
||
<mainClass>cn.somkit.fmt.FmtApplication</mainClass>
|
||
</manifest>
|
||
</archive>
|
||
</configuration>
|
||
</plugin>
|
||
|
||
<plugin>
|
||
<groupId>org.apache.maven.plugins</groupId>
|
||
<artifactId>maven-dependency-plugin</artifactId>
|
||
<executions>
|
||
<execution>
|
||
<id>copy-lib</id>
|
||
<phase>package</phase>
|
||
<goals>
|
||
<goal>copy-dependencies</goal>
|
||
</goals>
|
||
<configuration>
|
||
<outputDirectory>target/lib</outputDirectory>
|
||
<excludeTransitive>false</excludeTransitive>
|
||
<stripVersion>false</stripVersion>
|
||
<includeScope>runtime</includeScope>
|
||
</configuration>
|
||
</execution>
|
||
</executions>
|
||
</plugin>
|
||
|
||
<plugin>
|
||
<artifactId>maven-assembly-plugin</artifactId>
|
||
<configuration>
|
||
<!-- 打包后的包名是否包含assembly的id名 -->
|
||
<appendAssemblyId>false</appendAssemblyId>
|
||
<!-- 指定最后tar或者zip包的名字 -->
|
||
<finalName>fmt</finalName>
|
||
<!-- tar或者zip包的输出目录 -->
|
||
<outputDirectory>target/</outputDirectory>
|
||
<descriptors>
|
||
<!-- 引用的assembly配置文件-->
|
||
<descriptor>src/main/resources/assembly.xml</descriptor>
|
||
</descriptors>
|
||
</configuration>
|
||
<executions>
|
||
<!-- phase加入package后,则在执行maven package时就可以调用maven-assembly-plugin插件定义的打包方式 -->
|
||
<execution>
|
||
<!--名字任意 -->
|
||
<id>make-assembly</id>
|
||
<!-- 绑定到package生命周期阶段上 -->
|
||
<phase>package</phase>
|
||
<goals>
|
||
<!-- 只运行一次 -->
|
||
<goal>single</goal>
|
||
</goals>
|
||
</execution>
|
||
</executions>
|
||
</plugin>
|
||
</plugins>
|
||
</build>
|
||
|
||
</project>
|