spring-boot-maven-plugin,mvn 发布:准备不提交对 pom.xml 的更改

Edd*_*die 5 maven spring-boot

当使用 spring-boot-maven-plugin 进行发布时,它无法标记项目,自动增加项目版本并 git 将更改提交到 pom.xml,即使我使用命令 -B 也是如此。我在网上没有找到任何有用的东西,有什么办法让它发挥作用吗?

我的pom如下:

<?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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>xxx</groupId>
<artifactId>xxx</artifactId>
<version>1.0.0-SNAPSHOT</version>

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>1.2.5.RELEASE</version>
</parent>

......


<build>
    <pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <version>1.2.5.RELEASE</version>
            </plugin>
        </plugins>
    </pluginManagement>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
            <version>1.2.5.RELEASE</version>
        </plugin>
    </plugins>
</build>
Run Code Online (Sandbox Code Playgroud)

目标:干净发布:干净发布:准备发布:执行

其他 Maven 命令行参数:-B

Edd*_*die 0

就像 @St\xc3\xa9phaneNic​​oll 在评论中所说,Spring boot maven 插件没有发布目标,所以请记住

\n