使用eclipse执行maven-release-plugin插件发布jar异常问题(.project)(Cannot prepare the release because you have local modifications )

开发是用的eclipse,里面有工程文件.project这种文件,运行release:prepare的时候报异常: 
Cannot prepare the release because you have local modifications 

 

提示你有文件没有提交,正常的文件可以提交,但是这种文件我们得让插件自己过滤掉。 
配置如下: 

<plugin>  
                <groupId>org.apache.maven.plugins</groupId>  
                <artifactId>maven-release-plugin</artifactId>  
                 <version>2.2.1</version>  
                <configuration>  
                    <tagBase>https://127.0.0.1/svn/maven_svn/tags/</tagBase>  
                    <checkModificationExcludes>  
                        <checkModificationExclude>.project</checkModificationExclude>  
                        <checkModificationExclude>.classpath</checkModificationExclude>  
                    </checkModificationExcludes>  
                </configuration>  
            </plugin>  

  

或者:

plugin>  
                <groupId>org.apache.maven.plugins</groupId>  
                <artifactId>maven-release-plugin</artifactId>  
                 <version>2.2.1</version>  
                <configuration>  
                    <tagBase>https://127.0.0.1/svn/maven_svn/tags/</tagBase>  
<checkModificationExcludeList>.project,.classpath</checkModificationExcludeList>  
                </configuration>  
            </plugin>  

  

posted @ 2017-12-21 16:15  YatHo  Views(1755)  Comments(0Edit  收藏  举报