build : 发布插件

This commit is contained in:
2025-04-22 23:59:29 +08:00
parent 45b0845c3d
commit b34d1a5138
2 changed files with 83 additions and 59 deletions

View File

@@ -13,7 +13,7 @@
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.deploy.skip>true</maven.deploy.skip>
<maven-deploy-skip>true</maven-deploy-skip>
<maven-javadoc-plugin.skip>true</maven-javadoc-plugin.skip>
<maven-source-plugin.skipSource>true</maven-source-plugin.skipSource>
</properties>
@@ -32,63 +32,63 @@
</dependency>
</dependencies>
<build>
<!-- 默认生效的插件 -->
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
<!-- 排除静态编译类的插件,为打包的 jar 瘦身 -->
<configuration>
<excludes>
<exclude>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</exclude>
<exclude>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
</exclude>
</excludes>
</configuration>
</plugin>
<!-- 编译插件 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>17</source>
<target>17</target>
<encoding>UTF-8</encoding>
<compilerArgs>
<arg>-parameters</arg>
<arg>--add-opens</arg>
<arg>java.base/java.lang=ALL-UNNAMED</arg>
</compilerArgs>
<!-- 注解静态编译功能 注:仅支持 maven-compiler-plugin 的 version 在3.6.0 以上才生效 -->
<annotationProcessorPaths>
<!-- 必须配置 lombok 的注解编译,否则会因为配置了(mapstruct-processor)启动了导致 lombok 对内部类的静态编译失效 -->
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
</path>
<path>
<groupId>org.mapstruct</groupId>
<artifactId>mapstruct-processor</artifactId>
<version>${org.mapstruct.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
</plugins>
<!-- <build>-->
<!-- &lt;!&ndash; 默认生效的插件 &ndash;&gt;-->
<!-- <plugins>-->
<!-- <plugin>-->
<!-- <groupId>org.springframework.boot</groupId>-->
<!-- <artifactId>spring-boot-maven-plugin</artifactId>-->
<!-- <executions>-->
<!-- <execution>-->
<!-- <goals>-->
<!-- <goal>repackage</goal>-->
<!-- </goals>-->
<!-- </execution>-->
<!-- </executions>-->
<!-- &lt;!&ndash; 排除静态编译类的插件,为打包的 jar 瘦身 &ndash;&gt;-->
<!-- <configuration>-->
<!-- <excludes>-->
<!-- <exclude>-->
<!-- <groupId>org.projectlombok</groupId>-->
<!-- <artifactId>lombok</artifactId>-->
<!-- </exclude>-->
<!-- <exclude>-->
<!-- <groupId>org.mapstruct</groupId>-->
<!-- <artifactId>mapstruct-processor</artifactId>-->
<!-- </exclude>-->
<!-- </excludes>-->
<!-- </configuration>-->
<!-- </plugin>-->
<!-- &lt;!&ndash; 编译插件 &ndash;&gt;-->
<!-- <plugin>-->
<!-- <groupId>org.apache.maven.plugins</groupId>-->
<!-- <artifactId>maven-compiler-plugin</artifactId>-->
<!-- <configuration>-->
<!-- <source>17</source>-->
<!-- <target>17</target>-->
<!-- <encoding>UTF-8</encoding>-->
<!-- <compilerArgs>-->
<!-- <arg>-parameters</arg>-->
<!-- <arg>&#45;&#45;add-opens</arg>-->
<!-- <arg>java.base/java.lang=ALL-UNNAMED</arg>-->
<!-- </compilerArgs>-->
<!-- &lt;!&ndash; 注解静态编译功能 注:仅支持 maven-compiler-plugin 的 version 在3.6.0 以上才生效 &ndash;&gt;-->
<!-- <annotationProcessorPaths>-->
<!-- &lt;!&ndash; 必须配置 lombok 的注解编译,否则会因为配置了(mapstruct-processor)启动了导致 lombok 对内部类的静态编译失效 &ndash;&gt;-->
<!-- <path>-->
<!-- <groupId>org.projectlombok</groupId>-->
<!-- <artifactId>lombok</artifactId>-->
<!-- <version>${lombok.version}</version>-->
<!-- </path>-->
<!-- <path>-->
<!-- <groupId>org.mapstruct</groupId>-->
<!-- <artifactId>mapstruct-processor</artifactId>-->
<!-- <version>${org.mapstruct.version}</version>-->
<!-- </path>-->
<!-- </annotationProcessorPaths>-->
<!-- </configuration>-->
<!-- </plugin>-->
<!-- </plugins>-->
</build>
<!-- </build>-->
</project>