快照版构建 source jar

This commit is contained in:
卢春梦 2024-06-12 19:53:26 +08:00
parent dc51417948
commit 83fda1ee3d

50
pom.xml
View File

@ -25,7 +25,7 @@
<licenses> <licenses>
<license> <license>
<name>GNU LESSER GENERAL PUBLIC LICENSE</name> <name>GNU LESSER GENERAL PUBLIC LICENSE</name>
<url>http://www.gnu.org/licenses/lgpl.html</url> <url>https://www.gnu.org/licenses/lgpl.html</url>
</license> </license>
</licenses> </licenses>
<scm> <scm>
@ -40,6 +40,7 @@
<!-- jdk Version --> <!-- jdk Version -->
<java.version>17</java.version> <java.version>17</java.version>
<maven.plugin.version>3.11.0</maven.plugin.version> <maven.plugin.version>3.11.0</maven.plugin.version>
<maven-jar-plugin.version>3.3.0</maven-jar-plugin.version>
<maven.flatten.version>1.3.0</maven.flatten.version> <maven.flatten.version>1.3.0</maven.flatten.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
@ -455,6 +456,39 @@
</compilerArgs> </compilerArgs>
</configuration> </configuration>
</plugin> </plugin>
<!-- jar -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>${maven-jar-plugin.version}</version>
<configuration>
<archive>
<!-- 生成 INDEX.LIST -->
<index>true</index>
<!-- MANIFEST.MF 多生成一些描述信息 -->
<manifest>
<addBuildEnvironmentEntries>true</addBuildEnvironmentEntries>
<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
<!-- 生成的jar中不要包含pom.xml和pom.properties这两个文件 -->
<addMavenDescriptor>false</addMavenDescriptor>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.3.1</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin> <plugin>
<groupId>org.codehaus.mojo</groupId> <groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId> <artifactId>flatten-maven-plugin</artifactId>
@ -539,20 +573,6 @@
<id>release</id> <id>release</id>
<build> <build>
<plugins> <plugins>
<!-- Source -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.2.1</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Javadoc --> <!-- Javadoc -->
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>