我在pom.xml
中为多模块maven项目配置了maven2发布插件。该项目位于一个单一的git仓库中。发布过程在Windows上不起作用。多模块Maven项目在Windows上使用git发布
在git bash我总是得到fatal: 'C:\<PATH>\pom.xml' is outside repository
错误消息为父pom.xml
。 pom.xml
已准备就绪,并且之前已添加到回购协议中。我认为git无法找到它,因为反斜杠路径分隔符。
我也试过在默认的cmd下使用release插件。在发布过程结束时,git推着挂了。我想,这是ssh密码。 cmd我无法配置ssh代理,所以我必须以交互方式输入每种类型的密码。我也尝试添加密码作为命令行参数,没有任何改变。
我也试着设置pushChanges
选项为false
以防止自动推送,它也挂了。
有关部分从父pom.xml
:
<properties>
<maven.build.timestamp.format>yyyy-MM-dd</maven.build.timestamp.format>
<timestamp>${maven.build.timestamp}</timestamp>
</properties>
<scm>
<connection>scm:git:ssh://<host>/<project>.git</connection>
<url><gitweb url></url>
</scm>
<!-- more here -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.4</version>
<configuration>
<tagNameFormat>
release-${timestamp}[email protected]{project.version}
</tagNameFormat>
<autoVersionSubmodules>true</autoVersionSubmodules>
<pushChanges>false</pushChanges>
</configuration>
<executions>
<execution>
<id>default</id>
<goals>
<goal>prepare</goal>
</goals>
</execution>
</executions>
</plugin>
我运行此命令:
mvn release:prepare -B
是否有任何机会,以在Windows上使用版本的插件使用Git?
尝试请提供你正在运行产生错误的命令的详细信息。 – 2013-03-21 14:27:20
也许我碰到一个bug:http://jira.codehaus.org/browse/MRELEASE-581 – Hubidubi 2013-03-21 16:42:31