How to disable maven release plugin check local modifications?

user710818 picture user710818 · Feb 4, 2012 · Viewed 26.7k times · Source

I use maven release plugin. In my pom exists and Ant task that automatically fix some properties files with additional information. This fixes should not be in SCM. But maven don't finish with success for error:

Cannot prepare the release because you have local modifications 

Does it possible to set some parameters to don't check local modifications?

Thanks.

Answer

Andrew Logvinov picture Andrew Logvinov · Feb 4, 2012

I'm not very familiar with maven-release-plugin, but I can see that there is a checkModificationExcludes property that you can use for your purpose. The config should be somewhat like this:

<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-release-plugin</artifactId>
  <version>2.2.2</version>
  <configuration>
    ...
    <checkModificationExcludes>
      <checkModificationExclude>file_1</checkModificationExclude>
      <checkModificationExclude>dir_1/file_2</checkModificationExclude>
    </checkModificationExcludes>
  </configuration>
</plugin>