Skip to content
Advertisement

Cannot prepare the release because you have local modifications :

I am trying to do a Maven realeas prepare but this error keeps happening I tried to execlude the root pom from being checked but it goes now to the other poms

[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]

and this is an example of my root 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>

what can I do to resolve this ?

Advertisement

Answer

I Committed the pom.xml and it solved the problem.

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement