mschonaker / wagon-git

Git Wagon for Apache Maven
http://synergian.github.io/wagon-git/
83 stars 32 forks source link

wagon-git hangs on mvn deploy/mvn release:perform (Bitbucket configuration) #26

Closed jenslaufer closed 9 years ago

jenslaufer commented 10 years ago

I configured my pom.xml and settings.xml as said in documentation, but wagon-git is hanging while fetching from my bitbucket repository.

The Bitbucket repository with the name 'repo' is setup like this: a branch for snapshots named 'snapshots' a branch for releases name 'releases' I added on both brnaches a README.md

my pom.xml:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>de.aphtenbehandlung</groupId>
    <artifactId>aphtenbehandlung-web-app</artifactId>
    <packaging>war</packaging>
    <version>0.0.1-SNAPSHOT</version>
    <name>aphtenbehandlung-web-app Maven Webapp</name>
    <url>http://maven.apache.org</url>
    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.8.1</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
    <pluginRepositories>
        <pluginRepository>
            <id>synergian-repo</id>
            <url>https://raw.github.com/synergian/wagon-git/releases</url>
        </pluginRepository>
    </pluginRepositories>
    <build>
        <finalName>aphtenbehandlung-web-app</finalName>
        <plugins>
            <plugin>
                <groupId>org.codehaus.cargo</groupId>
                <artifactId>cargo-maven2-plugin</artifactId>
                <version>1.2.3</version>
                <configuration>
                    <container>
                        <containerId>tomcat7x</containerId>
                        <type>remote</type>
                    </container>
                    <deployables>
                        <deployable>
                            <groupId>${deploy.groupid}</groupId>
                            <artifactId>${deploy.artifactid}</artifactId>
                            <type>war</type>
                            <properties>
                                <context>${deploy.context}</context>
                            </properties>
                        </deployable>
                    </deployables>
                    <configuration>
                        <type>runtime</type>
                        <properties>
                            <cargo.hostname>aphtenbehandlung.de</cargo.hostname>
                            <cargo.protocol>http</cargo.protocol>
                            <cargo.servlet.port>80</cargo.servlet.port>
                            <cargo.remote.username>${remote.user}</cargo.remote.username>
                            <cargo.remote.password>${remote.pass}</cargo.remote.password>
                        </properties>
                    </configuration>
                    <deployer>
                        <type>remote</type>
                    </deployer>
                </configuration>
                <executions>
                    <execution>
                        <id>verify-deploy</id>
                        <phase>deploy</phase>
                        <goals>
                            <goal>deployer-undeploy</goal>
                            <goal>deployer-deploy</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
        <extensions>
            <extension>
                <groupId>ar.com.synergian</groupId>
                <artifactId>wagon-git</artifactId>
                <version>0.2.4</version>
            </extension>
        </extensions>
    </build>

    <distributionManagement>
        <repository>
            <id>releases.objectworkz.org</id>
            <name>Your Repo Name</name>
            <url>git:releases://git@bitbucket.org:jenslaufer/repo.git</url>
        </repository>
        <snapshotRepository>
            <id>snapshots.objectworkz.org</id>
            <name>Your Snapshot Repo Name</name>
            <url>git:snapshots://git@bitbucket.org:jenslaufer/repo.git</url>
        </snapshotRepository>
    </distributionManagement>

    <scm>
        <connection>scm:git:https://bitbucket.org/jenslaufer/aphtenbehandlung.git</connection>
        <developerConnection>scm:git:https://bitbucket.org/jenslaufer/aphtenbehandlung.git</developerConnection>
        <url>https://bitbucket.org/jenslaufer/aphtenbehandlung.git</url>
    </scm>
</project>

My settings.xml

<?xml version="1.0" encoding="UTF-8"?>
<settings
    xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 
![chrysanthemum](https://cloud.githubusercontent.com/assets/2699798/2983008/9442873c-dc1c-11e3-81f6-e383e3547d11.jpg)
http://maven.apache.org/xsd/settings-1.0.0.xsd"
    xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <profiles>
        <profile>
            <id>artifactory</id>
            <repositories>
                <repository>
                    <snapshots>
                        <enabled>false</enabled>
                    </snapshots>
                    <id>jboss</id>
                    <name>jboss</name>
                    <url>https://repository.jboss.org/nexus/content/groups/public/</url>
                </repository>
                <repository>
                    <id>releases.objectworkz.org</id>
                    <name>Releases repo</name>
                    <releases>
                        <enabled>true</enabled>
                    </releases>
                    <snapshots>
                        <enabled>false</enabled>
                    </snapshots>
                    <url>https://api.bitbucket.org/1.0/repositories/jenslaufer/repo/raw/releases</url>
                </repository>
                <repository>
                    <id>snapshots.objectworkz.org</id>
                    <name>Snapshots repo</name>
                    <releases>
                        <enabled>false</enabled>
                    </releases>
                    <snapshots>
                        <enabled>true</enabled>
                    </snapshots>
                    <url>https://api.bitbucket.org/1.0/repositories/jenslaufer/repo/raw/snapshots</url>
                </repository>
            </repositories>
        </profile>

        <profile>
            <id>web.deploy</id>
            <properties>
                <remote.user>admin</remote.user>
                <remote.pass>xxxx</remote.pass>
            </properties>
        </profile>
    </profiles>
    <activeProfiles>
        <!--<activeProfile>artifactory</activeProfile> -->
        <activeProfile>prodkey</activeProfile>
        <activeProfile>web.deploy</activeProfile>
    </activeProfiles>

    <servers>
        <server>
            <id>bitbucket.org</id>
            <username>jenslaufer</username>
            <password>XXX</password>
        </server>
        <server>
            <id>releases.objectworkz.org</id>
            <username>jenslaufer</username>
            <password>XXX</password>
        </server>
        <server>
            <id>snapshots.objectworkz.org</id>
            <username>jenslaufer</username>
            <password>XXXX</password>
        </server>
    </servers>
    <proxies>
        <proxy>
            <active>false</active>
            <protocol>http</protocol>
            <host>emea-webproxy.gfk.com</host>
            <port>3128</port>
            <username>jslauf</username>
            <password>XXXXXXX</password>
            <nonProxyHosts>skywalker|localhost|127.0.0.1</nonProxyHosts>
        </proxy>
    </proxies>
</settings>
jenslaufer commented 10 years ago

I forgot to send you the console output:

[INFO] --- maven-install-plugin:2.4:install (default-install) @ aphtenbehandlung
-web-app ---
[INFO] Installing C:\Users\jslauf\git\aphtenbehandlung\aphtenbehandlung-web-app\
target\aphtenbehandlung-web-app.war to C:\Users\jslauf\.m2\repository\de\aphtenb
ehandlung\aphtenbehandlung-web-app\0.0.1-SNAPSHOT\aphtenbehandlung-web-app-0.0.1
-SNAPSHOT.war
[INFO] Installing C:\Users\jslauf\git\aphtenbehandlung\aphtenbehandlung-web-app\
pom.xml to C:\Users\jslauf\.m2\repository\de\aphtenbehandlung\aphtenbehandlung-w
eb-app\0.0.1-SNAPSHOT\aphtenbehandlung-web-app-0.0.1-SNAPSHOT.pom
[INFO]
[INFO] --- maven-deploy-plugin:2.7:deploy (default-deploy) @ aphtenbehandlung-we
b-app ---
Downloading: git:snapshots://git@bitbucket.org:jenslaufer/repo.git/de/aphtenbeha
ndlung/aphtenbehandlung-web-app/0.0.1-SNAPSHOT/maven-metadata.xml
[DEBUG] Invoked openConnectionInternal()
[INFO] Executing: cmd.exe /X /C "git init"
[INFO] Working directory: C:\Users\jslauf\AppData\Local\Temp\wagon-git-2584144ad
e38dcf9122606925f3d98acd58245b1
[INFO] [git] Initialized empty Git repository in C:/Users/jslauf/AppData/Local/T
emp/wagon-git-2584144ade38dcf9122606925f3d98acd58245b1/.git/
[DEBUG] RAN: git init / $? = 0
[INFO] Executing: cmd.exe /X /C "git remote add origin git@bitbucket.org:jenslau
fer/repo.git"
[INFO] Working directory: C:\Users\jslauf\AppData\Local\Temp\wagon-git-2584144ad
e38dcf9122606925f3d98acd58245b1
[DEBUG] RAN: git remote add origin git@bitbucket.org:jenslaufer/repo.git / $? =
0
[INFO] Executing: cmd.exe /X /C "git fetch --progress"
[INFO] Working directory: C:\Users\jslauf\AppData\Local\Temp\wagon-git-2584144ad
e38dcf9122606925f3d98acd58245b1
jenslaufer commented 10 years ago

Seems that the problem is connected with Windows I am running Windows7 and git version 1.9.2.msysgit.0 The system hangs at it expects to type in the username/password, but does not give the opportunity to type it in.

On a Ubuntu machine I am asked for username and password and I am getting alsmost through to the end

mschonaker commented 10 years ago

I'm not familiar with msysgit. But, anyway, as the documentation says, wagon-git uses your installation of git. You can configure msysgit like this https://help.github.com/articles/working-with-ssh-key-passphrases#platform-windows or you could add username and password in the SSH URLs (something that for obvious reasons I don't recommend).

Please use version 0.2.3. Release 0.2.4 has showed some problems.