我一直在努力构建 Maven 3.0.5,尝试部署到 Sonatype 存储库,在 Windows XP 系统中使用 maven 发布插件和 maven gpg 插件。我的问题与这个SO question完全相同,但是那里提供的解决方案都不适合我。
我的 pom.xml 的相关片段是:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.4.1</version>
<configuration>
<arguments>-Dgpg.passphrase=${gpg.passphrase}</arguments>
<!-- see http://jira.codehaus.org/browse/MGPG-9 -->
<mavenExecutorId>forked-path</mavenExecutorId>
</configuration>
</plugin>
<profiles>
<profile>
<id>release-sign-artifacts</id>
<activation>
<property>
<name>performRelease</name>
<value>true</value>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<configuration>
<passphrase>${gpg.passphrase}</passphrase>
</configuration>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<scm>
<connection>scm:git:https://github.com/pentasoft/s3-static-uploader.git</connection>
<developerConnection>scm:git:https://github.com/pentasoft/s3-static-uploader.git</developerConnection>
<url>https://github.com/pentasoft/s3-static-uploader</url>
<tag>s3-static-uploader-1.0</tag>
</scm>
我的构建的输出如下:
---
[INFO] BUILD SUCCESS
[INFO] ---------------------------------------------------------------------
---
[INFO] Total time: 29.737s
[INFO] Finished at: Fri Jul 05 15:58:20 CEST 2013
[INFO] Final Memory: 16M/40M
[INFO] ---------------------------------------------------------------------
---
[INFO] Checking in modified POMs...
[INFO] Executing: cmd.exe /X /C "git add -- pom.xml s3-static-uploader-plugin\po
m.xml s3-static-uploader-example1\pom.xml"
[INFO] Working directory: c:\Inetpub\wwwroot\Pentasoft.git\s3-static-uploader
[INFO] Executing: cmd.exe /X /C "git status"
[INFO] Working directory: c:\Inetpub\wwwroot\Pentasoft.git\s3-static-uploader
[INFO] Executing: cmd.exe /X /C "git commit --verbose -F C:\DOCUME~1\jgg\CONFIG~
1\Temp\maven-scm-870876840.commit pom.xml s3-static-uploader-plugin\pom.xml s3-s
tatic-uploader-example1\pom.xml"
[INFO] Working directory: c:\Inetpub\wwwroot\Pentasoft.git\s3-static-uploader
[INFO] Executing: cmd.exe /X /C "git symbolic-ref HEAD"
[INFO] Working directory: c:\Inetpub\wwwroot\Pentasoft.git\s3-static-uploader
[INFO] Executing: cmd.exe /X /C "git push https://github.com/pentasoft/s3-static
-uploader.git master:master"
[INFO] Working directory: c:\Inetpub\wwwroot\Pentasoft.git\s3-static-uploader
构建挂在这里。
我已经尝试了之前引用的 SO 问题中提供的所有解决方案,并且所有解决方案都产生了相同的结果。