无法准备发布,因为您有本地修改:

Cannot prepare the release because you have local modifications :

我正在尝试做一个 Maven realeas 准备,但这个错误一直在发生 我试图将根 pom 排除在检查之外,但它现在转到其他 pom

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.5.3:prepare (default-cli) on project sfg-pet-clinic: Cannot prepare the release because you h
ave local modifications : 

[ERROR] [pet-clinic-data/pom.xml:modified]

[ERROR] [pet-clinic-web/pom.xml:modified]

这是我的根 pom 示例:

<build>
    <pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <configuration>
                    <goals>install</goals>
                    <checkModificationExcludes>
                        <checkModificationExclude>pom.xml</checkModificationExclude>
                    </checkModificationExcludes>
                </configuration>
            </plugin>
        </plugins>
    </pluginManagement>
</build>
<scm>
    <developerConnection>scm:git:https://github.com/OmarSharif93/sfg-pet-clinic.git</developerConnection>
</scm>

我该怎么做才能解决这个问题?

我提交了 pom.xml 并解决了问题。