Maven release:prepare : Cannot prepare the release because you have local modifications

前端 未结 6 1529
孤街浪徒
孤街浪徒 2021-02-20 08:48

I\'m facing a problem with continuum\'s release:prepare phase which fails in scm-check-modifications step with error :

[ERROR] org.apache.maven.shared.rel

相关标签:
6条回答
  • 2021-02-20 09:00

    For everybody who don't want to change the pom.xml a commandline option does the trick:

    mvn [...] -DcheckModificationExcludeList=pom.xml,.maven/spy.log

    I had the problem on our hudson / jenkins CI environment which complained about changes in the .maven/spy.log

    0 讨论(0)
  • 2021-02-20 09:10

    Removing my project's target folder from source control fixed this issue for me.

    0 讨论(0)
  • 2021-02-20 09:10
    <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-release-plugin</artifactId>
    <configuration>
        <checkModificationExcludes>
            <checkModificationExclude>pom.xml</checkModificationExclude>
            <checkModificationExclude>**</checkModificationExclude>
        </checkModificationExcludes>
    </configuration>
    

    0 讨论(0)
  • 2021-02-20 09:11

    This is just a workaround for the error . i faced same error with maven-release plugin version 2.5.3 and just sorted the error with maven-release 2.3.2

    0 讨论(0)
  • 2021-02-20 09:15

    I can confirm, that adding the plugin or configuring it to exclude the pom.xml check did work:

    <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-release-plugin</artifactId>
      <configuration>
        <checkModificationExcludes>
            <checkModificationExclude>pom.xml</checkModificationExclude>
        </checkModificationExcludes>
      </configuration>
    </plugin>
    
    0 讨论(0)
  • 2021-02-20 09:18

    For me solution is staging and commiting pom.xml or any other changed file to push git

    0 讨论(0)
提交回复
热议问题