1. 程式人生 > >使用eclipse執行maven-release-plugin插件發布jar異常問題(.project)(Cannot prepare the release because you have local modifications )

使用eclipse執行maven-release-plugin插件發布jar異常問題(.project)(Cannot prepare the release because you have local modifications )

ins eclips ica svn excludes one list ati .project

開發是用的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>  

  

使用eclipse執行maven-release-plugin插件發布jar異常問題(.project)(Cannot prepare the release because you have local modifications )