質問

I've been struggling with a Maven 3.0.5 build, trying to deploy to Sonatype repo, using maven release plugin and maven gpg plugin in a Windows XP system. My problem is exactly the same as this SO question, but none of the solutions provided there is working for me.

The relevant fragments of my pom.xml are:

<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>

The ouptut of my build is the following:

---
[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

The build hangs here.

I've tried all the solutions provided in the previously referenced SO question and all of them produce the same result.

役に立ちましたか?

解決

After a long fight with this, there were two problems mainly. The first one was related to the urls specified in scm section of the pom.xml file. My schemas were https and github was prompting me for the user, but there were no output on the screen showing that prompt. So the first step was changing the url schemas to the following:

<scm>
    <connection>scm:git:git@github.com:pentasoft/s3-static-uploader.git</connection>
    <developerConnection>scm:git:git@github.com:pentasoft/s3-static-uploader.git</developerConnection>
    <url>https://github.com/pentasoft/s3-static-uploader</url>
</scm>

where the https schemas have been replaced by the ssh schema.

After fixing this there was a second problem regarding to the ssh access to Github. When launching the build, Github was answering with the following:

The authenticity of host 'github.com (207.97.227.239)' can't be established. 
RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48. 
Are you sure you want to continue connecting (yes/no)?

As in the previous problem these prompt doesn't show and the feel is that the build is hanged again. In order to fix this, I issued the command ssh -T git@github.com (see this Github guide) and I answered yes to that question in order to avoid that prompt in the future.

After all this the build is not hanged anymore (following the instructions of @AWhitford in the previously referenced SO question).

May be all this would have been easier with a non Windows box...

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top