build : 发布插件
This commit is contained in:
@@ -15,13 +15,14 @@
|
|||||||
<maven.compiler.source>17</maven.compiler.source>
|
<maven.compiler.source>17</maven.compiler.source>
|
||||||
<maven.compiler.target>17</maven.compiler.target>
|
<maven.compiler.target>17</maven.compiler.target>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
<maven.deploy.skip>true</maven.deploy.skip>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.metis</groupId>
|
<groupId>com.metis</groupId>
|
||||||
<artifactId>metis-starter</artifactId>
|
<artifactId>metis-starter</artifactId>
|
||||||
<version>1.0.0-SNAPSHOT</version>
|
<version>${project.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-starter-web</artifactId>
|
<artifactId>spring-boot-starter-web</artifactId>
|
||||||
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
|||||||
206
pom.xml
206
pom.xml
@@ -30,6 +30,18 @@
|
|||||||
<sanitizer.version>1.2.3</sanitizer.version>
|
<sanitizer.version>1.2.3</sanitizer.version>
|
||||||
<langchain4j.version>1.0.0-beta2</langchain4j.version>
|
<langchain4j.version>1.0.0-beta2</langchain4j.version>
|
||||||
<mybatis-plus.version>3.5.8</mybatis-plus.version>
|
<mybatis-plus.version>3.5.8</mybatis-plus.version>
|
||||||
|
<versions-maven-plugin.version>2.18.0</versions-maven-plugin.version>
|
||||||
|
<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
|
||||||
|
<maven.build.timestamp.format>yyyyMMdd-HHmmss</maven.build.timestamp.format>
|
||||||
|
<maven-release-plugin.updateDependencies>false</maven-release-plugin.updateDependencies>
|
||||||
|
<maven-deploy-skip>false</maven-deploy-skip>
|
||||||
|
<maven-deploy-plugin.version>3.1.3</maven-deploy-plugin.version>
|
||||||
|
<maven-release-plugin.version>3.1.1</maven-release-plugin.version>
|
||||||
|
<maven-source-plugin.version>3.2.1</maven-source-plugin.version>
|
||||||
|
<maven-javadoc-plugin.version>3.5.0</maven-javadoc-plugin.version>
|
||||||
|
<maven-javadoc-plugin.skip>false</maven-javadoc-plugin.skip>
|
||||||
|
<maven-source-plugin.skipSource>false</maven-source-plugin.skipSource>
|
||||||
|
<maven-release-plugin.updateWorkingCopyVersions>false</maven-release-plugin.updateWorkingCopyVersions>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
|
|
||||||
@@ -96,6 +108,200 @@
|
|||||||
</dependencies>
|
</dependencies>
|
||||||
</dependencyManagement>
|
</dependencyManagement>
|
||||||
|
|
||||||
|
<scm>
|
||||||
|
<connection>scm:git:git@git.feashow.cn:clay/metis.git</connection>
|
||||||
|
<developerConnection>scm:git:git@git.feashow.cn:clay/metis.git</developerConnection>
|
||||||
|
<url>http://git.feashow.cn/clay/metis.git</url>
|
||||||
|
<tag>lsym-dependencies-@{project.version}-RELEASE</tag>
|
||||||
|
</scm>
|
||||||
|
|
||||||
|
<!-- 编译 -->
|
||||||
|
<build>
|
||||||
|
<finalName>${project.name}</finalName>
|
||||||
|
<!-- 插件管理 -->
|
||||||
|
<pluginManagement>
|
||||||
|
<plugins>
|
||||||
|
<!-- 发布依赖插件 -->
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-deploy-plugin</artifactId>
|
||||||
|
<version>${maven-deploy-plugin.version}</version>
|
||||||
|
<configuration>
|
||||||
|
<skip>${maven-deploy-skip}</skip>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<!-- 编译插件 -->
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
<version>${maven-compiler-plugin.version}</version>
|
||||||
|
<configuration>
|
||||||
|
<source>${java.version}</source>
|
||||||
|
<target>${java.version}</target>
|
||||||
|
<encoding>UTF-8</encoding>
|
||||||
|
<compilerArgs>
|
||||||
|
<arg>-parameters</arg>
|
||||||
|
</compilerArgs>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<!-- 自动化 Maven 项目的版本发布插件 -->
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-release-plugin</artifactId>
|
||||||
|
<version>${maven-release-plugin.version}</version>
|
||||||
|
<configuration>
|
||||||
|
<!-- 自动解析快照 -->
|
||||||
|
<autoResolveSnapshots>0</autoResolveSnapshots>
|
||||||
|
<!-- 自动更新子模块版本 -->
|
||||||
|
<autoVersionSubmodules>true</autoVersionSubmodules>
|
||||||
|
<updateDependencies>${maven-release-plugin.updateDependencies}</updateDependencies>
|
||||||
|
<!-- 是否更新工作副本的版本 -->
|
||||||
|
<updateWorkingCopyVersions>${maven-release-plugin.updateWorkingCopyVersions}
|
||||||
|
</updateWorkingCopyVersions>
|
||||||
|
<!-- 是否更新branch的版本 -->
|
||||||
|
<updateBranchVersions>true</updateBranchVersions>
|
||||||
|
<!-- 定义tag格式 -->
|
||||||
|
<tagNameFormat>@{project.version}-${maven.build.timestamp}</tagNameFormat>
|
||||||
|
<!-- 排除检查 -->
|
||||||
|
<checkModificationExcludes>
|
||||||
|
<checkModificationExclude>pom.xml</checkModificationExclude>
|
||||||
|
</checkModificationExcludes>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<!-- 版本管理工具 -->
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>versions-maven-plugin</artifactId>
|
||||||
|
<version>${versions-maven-plugin.version}</version>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<!--生成doc jar包-->
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-javadoc-plugin</artifactId>
|
||||||
|
<version>${maven-javadoc-plugin.version}</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>attach-javadocs</id>
|
||||||
|
<goals>
|
||||||
|
<goal>jar</goal>
|
||||||
|
</goals>
|
||||||
|
<!-- 不让像@Param 这种后面没写值的东西 报错。-->
|
||||||
|
<configuration>
|
||||||
|
<additionalJOption>-Xdoclint:none</additionalJOption>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
<configuration>
|
||||||
|
<source>${java.version}</source>
|
||||||
|
<encoding>UTF-8</encoding>
|
||||||
|
<skip>${maven-javadoc-plugin.skip}</skip>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
<!--生成源码jar包-->
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-source-plugin</artifactId>
|
||||||
|
<version>${maven-source-plugin.version}</version>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>attach-sources</id>
|
||||||
|
<goals>
|
||||||
|
<goal>jar</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
<configuration>
|
||||||
|
<skipSource>${maven-source-plugin.skipSource}</skipSource>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
|
</plugins>
|
||||||
|
</pluginManagement>
|
||||||
|
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-deploy-plugin</artifactId>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-javadoc-plugin</artifactId>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-source-plugin</artifactId>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>versions-maven-plugin</artifactId>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-release-plugin</artifactId>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
|
||||||
|
|
||||||
|
<distributionManagement>
|
||||||
|
<repository>
|
||||||
|
<id>maven-snapshots</id>
|
||||||
|
<name>project snapshot repository</name>
|
||||||
|
<url>http://nexus.frp.feashow.cn/repository/maven-releases/</url>
|
||||||
|
</repository>
|
||||||
|
<snapshotRepository>
|
||||||
|
<id>maven-releases</id>
|
||||||
|
<name>project release repository</name>
|
||||||
|
<url>http://nexus.frp.feashow.cn/repository/maven-snapshots/</url>
|
||||||
|
</snapshotRepository>
|
||||||
|
</distributionManagement>
|
||||||
|
|
||||||
|
<!-- 在 Maven 中,可以通过使用 profiles 来在不同的构建环境中启用或禁用插件配置 -->
|
||||||
|
<profiles>
|
||||||
|
<profile>
|
||||||
|
<id>release</id>
|
||||||
|
<properties>
|
||||||
|
<maven-javadoc-plugin.skip>true</maven-javadoc-plugin.skip>
|
||||||
|
<maven-source-plugin.skipSource>true</maven-source-plugin.skipSource>
|
||||||
|
</properties>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-javadoc-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>attach-javadocs</id>
|
||||||
|
<goals>
|
||||||
|
<goal>jar</goal>
|
||||||
|
</goals>
|
||||||
|
<phase>none</phase>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
<configuration>
|
||||||
|
<skip>true</skip>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-source-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>attach-sources</id>
|
||||||
|
<goals>
|
||||||
|
<goal>jar</goal>
|
||||||
|
</goals>
|
||||||
|
<phase>none</phase>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</profile>
|
||||||
|
</profiles>
|
||||||
</project>
|
</project>
|
||||||
Reference in New Issue
Block a user