如何禁用Maven发布插件检查本地修改? [英] How to disable maven release plugin check local modifications?

查看:452
本文介绍了如何禁用Maven发布插件检查本地修改?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Maven发布插件。在我的POM存在和Ant任务自动修复一些属性文件与附加信息。这个修复不应该在SCM中。
但是maven没有成功完成错误:

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

是否可以设置一些参数来检查本地修改?

谢谢。

解决方案

我对maven-release-plugin不是很熟悉,但是我可以看到有一个可以用于你的目的的 checkModificationExcludes 属性。配置应该是这样的:

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


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.

解决方案

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>

这篇关于如何禁用Maven发布插件检查本地修改?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆