81 lines
2.9 KiB
XML
81 lines
2.9 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>com.optima</groupId>
|
||
<artifactId>document</artifactId>
|
||
<version>2.0.0</version>
|
||
</parent>
|
||
<artifactId>document-test</artifactId>
|
||
<name>Document Test</name>
|
||
<description>文档操作测试</description>
|
||
<properties>
|
||
</properties>
|
||
<dependencies>
|
||
<!-- 引入文档操作API -->
|
||
<dependency>
|
||
<groupId>com.optima</groupId>
|
||
<artifactId>document-api</artifactId>
|
||
<version>2.0.0</version>
|
||
</dependency>
|
||
|
||
<!-- 基础 Spring Boot Starter(不包含 Web) -->
|
||
<dependency>
|
||
<groupId>org.springframework.boot</groupId>
|
||
<artifactId>spring-boot-starter</artifactId>
|
||
<version>2.7.18</version>
|
||
</dependency>
|
||
|
||
<!-- 仅引入 spring-web(不引入 Tomcat/MVC) -->
|
||
<dependency>
|
||
<groupId>org.springframework</groupId>
|
||
<artifactId>spring-web</artifactId>
|
||
<version>5.3.31</version>
|
||
</dependency>
|
||
|
||
<!-- 简化Getter/Setter -->
|
||
<dependency>
|
||
<groupId>org.projectlombok</groupId>
|
||
<artifactId>lombok</artifactId>
|
||
<version>1.16.20</version>
|
||
<scope>provided</scope>
|
||
</dependency>
|
||
</dependencies>
|
||
|
||
<build>
|
||
<plugins>
|
||
<!-- 1. 使用 maven-jar-plugin 打包当前模块的代码(不含依赖) -->
|
||
<plugin>
|
||
<groupId>org.apache.maven.plugins</groupId>
|
||
<artifactId>maven-jar-plugin</artifactId>
|
||
<version>3.3.0</version>
|
||
<configuration>
|
||
<!-- 可选:指定主类(如果需要可执行) -->
|
||
<archive>
|
||
<manifest>
|
||
<mainClass>com.example.MyApp</mainClass>
|
||
</manifest>
|
||
</archive>
|
||
</configuration>
|
||
</plugin>
|
||
|
||
<!-- 2. 使用 maven-source-plugin 生成源码 JAR -->
|
||
<plugin>
|
||
<groupId>org.apache.maven.plugins</groupId>
|
||
<artifactId>maven-source-plugin</artifactId>
|
||
<version>3.2.1</version>
|
||
<executions>
|
||
<execution>
|
||
<id>attach-sources</id>
|
||
<phase>package</phase>
|
||
<goals>
|
||
<goal>jar-no-fork</goal>
|
||
</goals>
|
||
</execution>
|
||
</executions>
|
||
</plugin>
|
||
</plugins>
|
||
</build>
|
||
</project>
|