【发布时间】:2013-03-11 00:33:07
【问题描述】:
我在pom.xml 中为多模块maven 项目配置了maven2 发布插件。该项目位于单个 git 存储库中。释放过程不适用于 Windows。
在 git bash 下,我总是收到父级 pom.xml 的 fatal: 'C:\<PATH>\pom.xml' is outside repository 错误消息。 pom.xml 已到位,并且之前已添加到存储库中。我认为由于反斜杠路径分隔符,git 无法找到它。
我也尝试使用默认cmd下的发布插件。在发布过程结束时 git push 挂起。我想,它正在等待 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}-v@{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 的发布插件?
【问题讨论】:
-
请提供有关您正在运行的导致错误的命令的更多详细信息。
-
也许我遇到了一个错误:jira.codehaus.org/browse/MRELEASE-581
标签: git maven maven-2 maven-release-plugin git-bash