maven中运行maven-release-plugin插件异常问题

因为我们开发是用的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>

猜你喜欢

转载自guying1028.iteye.com/blog/1733535