Git Product home page Git Product logo

wagon-git's People

Contributors

kaleksandrov avatar mschonaker avatar pwheel avatar riccardocossu avatar stanpalatnik avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wagon-git's Issues

Error when deploying jars to bitbucket

I am getting following error when I deploy to bitbucket :
[WARNING] Error injecting: ar.com.synergian.wagongit.GitWagon
java.lang.NoClassDefFoundError: org/apache/maven/scm/log/ScmLogger

I checked out that ScmLogger is there in the build path of my project but than also it is generating ClassNotFountException.

URLs for Bitbucket

I tried to release with the URLs suggested for bitbucket

git:releases://[email protected]:yourbitbucketusername/your-bitbucket-repo.git

This was NOT working.

Instead this worked for me:

git:releases://https://bitbucket.org/yourbitbucketusername/your-bitbucket-repo.git

Wagon-git downloads zero-length jars

We are using version 0.2.3 and we are using wagon-git in the same build as other repositories.
Basically we only want to put a few jars on git (the ones which are not available in public repositories), but let all the rest to be downloaded from usual sources (repo.maven.org and such).
The problem is that if wagon-git is called before standard http wagon and doesn't find what it's looking for in the git repo, instead of failing and passing the download to the next wagon it downloads a zero length file, which later results in a build error.
I think the problem is that the file not found error is misread as a zero length file and wagon-git tells that everything went fine (so no other wagon kicks in after that).

Here's an extract of the debug log (the git repo is private, so please just trust me that the file isn't there):

[DEBUG] RAN: git pull origin releases / $? = 0
git:releases://[email protected]/ - Session: Opened
[DEBUG] Invoked get(org/apache/httpcomponents/httpclient/4.3/httpclient-4.3.jar, //.m2/repository/org/apache/httpcomponents/httpclient/4.3/httpclient-4.3.jar.tmp32d4207243a74453)
Downloading: org/apache/httpcomponents/httpclient/4.3/httpclient-4.3.jar from git:releases://https://[email protected]/<our repo bitbucket).
Transfer finished. 0 bytes copied in 0.0 seconds

[Feature request] Shallow clone

Hi,

This is not a bug but a feature request.

I'm working from China and network is not always stable ... so that, with a repository getting bigger and bigger with history, sometimes, the deployment gets stuck because the network gets broken (that is the beauty of this location ... it happens sometimes, not on a regular basis ...).
In our case, the repository only contains 2 small jars, but past history makes the git repository too big, over a size limit that broke the connection (in my case : 8,4Mo)

Having a way to clone only the latest commit and not the whole history would make this easier to deploy. For that I was thinking about shallow clone (clone --depth=1) that might do the trick.

At some point, it creates another repo in /private/var/folders/.... instead of current directory.

I had been stuck for a while then I ran
./gradlew uploadArchives --debug
and found out that it created another path for the repo which is:
/private/var/folders/tw/74ynfd_11pq126n9lhm80y6c0000gn/T/wagon-git-bd76c7d81db864eb8cbd409f5e56afe3b4cc8209
and it tried to push it up but it didn't work because there was a git conflict problem.

Does this work correctly or it should do in the current directory?
I use this gradle script for publishing https://github.com/JeroenMols/GitAsMaven/blob/master/publish-bitbucket.gradle

Bootstrap

Find a way to make this plugin deploy itself on github.

Maven version warning during deploy

[INFO] [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-javadoc-plugin is missing.
[INFO] [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-deploy-plugin is missing.
[INFO] [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-source-plugin is missing.

wagon-git folder

The generated wagon-git folder should be created inside the target folder instead of the root folder of the maven project.

Adding of new artifacts fails because of missing maven-metadata.xml

This was introduced by recent changes for 0.2.4, since 0.2.3 worked fine in this use case (I guess that's why file.exists() was there in the first place...).

Everything works fine with directories which are already on the git repo, but fails when a new one is created (for example you create a new library with a different artifact Id).
That's because the wagon somehow assumes that a maven-metadata.xml should be on the repo, which is not the case since this is the first time you do a deploy.

The workaround is to usually use 0.2.4 and rollback to 0.2.3 when you need to add a new artifact or a new version number for an existing artifact.

Cannot configure permanent installation

I wish to deploy some private 3rd party jars to a bitbucket repo.
I configured according to http://synergian.github.io/wagon-git/installation.html:

  1. Dowloaded wagon-git-0.2.5-shaded.jar into ~/.m2/lib
  2. Added credentials in ~/.m2/settings.xml
<settings>
    <servers>
         <server>
             <id>bitbucket</id>
             <username>...</username>
             </password>...</password>
...

But

mvn deploy:deploy-file $@ \
    -DpomFile=./ext-library.pom \
    -Dfile=./ext-library.jar \
	-DgroupId=com.acme \
    -DartifactId=ext-library \
    -Dversion=1.0 \
    -DgeneratePom=false \
    -DrepositoryId=bitbucket \
    -Durl=git:master://[email protected]:myaccount/mavenrepo.git
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-deploy-plugin:2.7:deploy-file (default-cli) @ standalone-pom ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.882 s
[INFO] Finished at: 2017-11-30T19:00:24+01:00
[INFO] Final Memory: 8M/188M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy-file (default-cli) on project standalone-pom: Failed to deploy artifacts/metadata: Cannot access git:master://[email protected]:myaccount/mavenrepo.git with type default using the available connector factories: BasicRepositoryConnectorFactory: Cannot access git:master://[email protected]:myaccount/mavenrepo.git using the registered transporter factories: WagonTransporterFactory: java.util.NoSuchElementException
[ERROR] role: org.apache.maven.wagon.Wagon
[ERROR] roleHint: git
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

HTTPS Git credentials aren't filled from Maven settings

We're attempting to do the following:

    <repository>
      <id>maven-releases</id>
      <name>My Maven Repo</name>
      <url>git:releases://https://github.com/username/repo.git</url>
    </repository>

Yep - that's an HTTPS URL. If the HTTPS Git credentials are cached by Git, then everything works very well.

Sadly, in a CI environment (like Jenkins) we don't have the ability to manipulate the Git credentials cache - at which point the user (Jenkins) is asked for the username and password.

And this, obviously, fails the build.

Now, having set up the username and password in the Maven settings, the information is available to Maven. Unfortunately, this plugin doesn't use the information.

Sadly we can't do the obvious thing and use SSH. We're on a managed Jenkins instance, and don't have access to underlying filesystem. Incidentally, the same reason we can't pre-seed git-credentials with the information.

Does anyone have any ideas?

wagongit: Unable to create branch

I had everything working with wagon-git perfectly for a few days, given the following config:

    <extensions>
        <extension>
            <groupId>ar.com.synergian</groupId>
            <artifactId>wagon-git</artifactId>
            <version>0.2.1</version>
        </extension>
    </extensions>
...
<pluginRepositories>
    <pluginRepository>
        <id>synergian-repo</id>
        <url>https://raw.github.com/synergian/wagon-git/releases</url>
    </pluginRepository>
</pluginRepositories>
<distributionManagement>
    <repository>
        <id>my-maven-repo</id>
        <name>my-maven-repo</name>
        <url>git:releases://[email protected]:myUserName/my-maven-repo.git</url>
    </repository>
</distributionManagement>

So I'm not quite sure what changed after a reboot, perhaps a session expired that I should have configured explicitly ... I don't know ... this is what I see now when I run mvn clean deploy now:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project XXX: Failed to deploy artifacts: Could not transfer artifact XXX from/to XXX (git:releases://[email protected]:XXX/XXX.git): Unable to pull git repository: Unable to create branch
...
Caused by: org.sonatype.aether.transfer.ArtifactTransferException: Could not transfer artifact com.fermyon:router-commons:jar:1.4.4 from/to xxx-maven-repo (git:releases://[email protected]:xxx/xxx-maven-repo.git): Unable to pull git repository: Unable to create branch
...
Caused by: org.apache.maven.wagon.ConnectionException: Unable to pull git 
...
Caused by: ar.com.synergian.wagongit.GitException: Unable to create branch

Any suggestions as to what could be wrong? Is this a bug?
I had NOT configured ~/.m2/settings.xml last time for publishing when it all just worked ... and now when I try configuring it ... the error show up with or without it.

fail with maven deploy

Hi I'm trying to use wagon-git to deploy to my bitbucket repo. I get this error on mvn deploy. settings.xml and pom.xml extensions as per doco.

[INFO] [deploy:deploy {execution: default-deploy}]
[FATAL ERROR] org.apache.maven.plugin.deploy.DeployMojo#execute() caused a linkage error (java.lang.NoSuchMethodError) and may be out-of-date. Check the realms:
[FATAL ERROR] Plugin realm = app0.child-container[org.apache.maven.plugins:maven-deploy-plugin:2.8]
urls[0] = file:/Users/ukuhnhardt/.m2/repository/org/apache/maven/plugins/maven-deploy-plugin/2.8/maven-deploy-plugin-2.8.jar
urls[1] = file:/Users/ukuhnhardt/.m2/repository/org/codehaus/plexus/plexus-utils/3.0.15/plexus-utils-3.0.15.jar
[FATAL ERROR] Container realm = plexus.core
urls[0] = file:/opt/local/share/java/maven2/lib/maven-2.2.1-uber.jar
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] org.codehaus.plexus.util.cli.Commandline.createArg()Lorg/codehaus/plexus/util/cli/Arg;
[INFO] ------------------------------------------------------------------------
[INFO] Trace
java.lang.NoSuchMethodError: org.codehaus.plexus.util.cli.Commandline.createArg()Lorg/codehaus/plexus/util/cli/Arg;
    at org.apache.maven.scm.provider.git.gitexe.command.GitCommandLineUtils.getBaseGitCommandLine(GitCommandLineUtils.java:95)
    at ar.com.synergian.wagongit.GitBackend.run(GitBackend.java:61)
    at ar.com.synergian.wagongit.GitBackend.pushAll(GitBackend.java:156)
    at ar.com.synergian.wagongit.GitWagon.closeConnection(GitWagon.java:116)
    at org.apache.maven.wagon.AbstractWagon.disconnect(AbstractWagon.java:222)
    at org.apache.maven.artifact.manager.DefaultWagonManager.disconnectWagon(DefaultWagonManager.java:798)

See a commit message when a repository is used for a dependency

We are currently trying to leverage this plugin, but we are observing a commit being made when a git maven repo is used within another project

Project A (depends on) Project B

When I run "mvn clean install" I see that it finds Project B in git and downloads it as a dependency (great), but I am also seeing a commit on Project B repository every time.

[INFO] Executing: /bin/sh -c cd /tmp/wagon-git-aaefa864d73892359dd283c166e773f28ec6039f && git commit --allow-empty -m '[wagon-git] commit to branch snapshots 5/24/17 4:33 PM'
[INFO] Working directory: /tmp/wagon-git-aaefa864d73892359dd283c166e773f28ec6039f
[INFO] [git] [snapshots 01b7e88] [wagon-git] commit to branch snapshots 5/24/17 4:33 PM
[INFO] Executing: /bin/sh -c cd /tmp/wagon-git-aaefa864d73892359dd283c166e773f28ec6039f && git push --progress origin snapshots
[INFO] Working directory: /tmp/wagon-git-aaefa864d73892359dd283c166e773f28ec6039f
[INFO] [git] Counting objects: 1, done.
[INFO] [git] Writing objects: 100% (1/1)   
[INFO] [git] Writing objects: 100% (1/1), 228 bytes | 0 bytes/s, done.
[INFO] [git] Total 1 (delta 0), reused 0 (delta 0)
[INFO] [git] remote: 
[INFO] [git] remote: Create pull request for snapshots:        
[INFO] [git] remote:   https://bitbucket.org/xxxx/repo-snapshots-utility-common-domain/pull-requests/new?source=snapshots&t=1 

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

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://[email protected]:jenslaufer/repo.git</url>
        </repository>
        <snapshotRepository>
            <id>snapshots.objectworkz.org</id>
            <name>Your Snapshot Repo Name</name>
            <url>git:snapshots://[email protected]: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>

Option to avoid [wagon-git] empty commits

It would be nice to have an option to avoid wagon-git automatically creating an empty commit for each jar it tries to process.

The reason is that we are using the git protocol for pulling down jars as well as pushing them(because we want to use the SSH key instead of username/password combo). This causes an insane amount of commits to be created.

Maybe as simple as an environment variable? I can create a pull request quick if you agree.

Problem on Ubuntu linux

I try to release with

mvn release:prepare release:perform

I am getting almost through the build, but getting this error at the end

[INFO] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project aphtenbehandlung-web-app: Failed to retrieve remote metadata de.aphtenbehandlung:aphtenbehandlung-web-app/maven-metadata.xml: Could not transfer metadata de.aphtenbehandlung:aphtenbehandlung-web-app/maven-metadata.xml from/to releases.objectworkz.org (git:releases://https://bitbucket.org/jenslaufer/repo.git): Unable to get file: /tmp/wagon-git-3003d0e6f37d3cd60977e2a521641247e9169e99/de/aphtenbehandlung/aphtenbehandlung-web-app/maven-metadata.xml (No such file or directory) -> [Help 1]
[INFO] [ERROR]

Could not transfer artifact

My project is hosted on Openshift and I'm trying to add a dependency on an artifact hosted in a private bitbucket repo using wagon-git. I set up the settings.xml file with the username and ran "mvn clean install -s path_to_settings.xml"

Build fails with this error:
Failed to read artifact descriptor for com.company.name:name-model:jar:1.0: Could not transfer artifact.com.company.name:name-model:pom:1.0 from/to name-repo (git:releases://[email protected]:name/name-mavenrepo.git): No connector available to access repository name-repo (git:releases://[email protected]:name/name-mavenrepo.git) of type default using the available factories WagonRepositoryConnectorFactory

Uploading to bitbucket deletes all other files in repository

I'm using wagon-git in my gradle project.
It was working fine for a bit, but currently everytime I want to push a new version, it deletes all the other files in the repository. I have to revert the branch to a previous revision to fix the issue.
How do I fix this? How can I get it working again?
build.gradle

repositories {
mavenLocal()
mavenCentral()
maven { url "https://raw.github.com/synergian/wagon-git/releases" }
}
...
configurations {
deployerJars
}
...
uploadArchives {
configuration = configurations.archives
repositories.mavenDeployer {
configuration = configurations.deployerJars
repository(url: "git:releases://https://${bitbucketUsername}:${bitbucketPassword}@bitbucket.org/.git")
}
}

promblem with mavenDeployer in Android Studio

Hi

I want to upload a Android Library to my private Bitbucket.
The problem is, that the wagon-git do not take the right credentials.
It takes the local credentials, that are used in windows and not the given in authentication(...)

my uploadArchives:


configurations {
    deployerJar
}


dependencies {
   ...
    deployerJar "ar.com.synergian:wagon-git:0.2.5"
}

uploadArchives {
    repositories.mavenDeployer {
        configuration = configurations.deployerJar
        pom.groupId = 'de.XXXXXXXXX'
        pom.artifactId = 'foo'
        pom.version = '3.1.1'

        repository(url: "git:releases://https://[email protected]/<company>/>mavenrepo>.git") {
            authentication(userName: "some_user", password: '**********')
        }
    }
}

the upload works but the commit is done by the user, that is registered in the windows installation of Git.

How should I do this with a private Bitbucket? All linked tutorials did not work in android studio.

Connection Timeout on Sync Gradle for 'play-services-analytics-impl'

I'm getting connection timeout (503) when I try to sync gradle. Full error message is this:
Could not GET 'https://raw.github.com/synergian/wagon-git/releases/com/google/android/gms/play-services-analytics-impl/'. Received status code 503 from server: Connection timed out

How can I resolve this? It started today.

Deploying 3rd party jars

Hi,

I followed the guide here: http://synergian.github.io/wagon-git/installation.html to deploy a 3rd party jar but received the following exception:

Exception in thread "main" java.lang.NoSuchMethodError: org.codehaus.plexus.util.xml.pull.MXParser.<init>(Lorg/codehaus/plexus/util/xml/pull/EntityReplacementMap;)V
    at org.apache.maven.settings.io.xpp3.SettingsXpp3Reader.read(SettingsXpp3Reader.java:523)
    at org.apache.maven.settings.io.xpp3.SettingsXpp3Reader.read(SettingsXpp3Reader.java:557)
    at org.apache.maven.settings.io.DefaultSettingsReader.read(DefaultSettingsReader.java:92)
    at org.apache.maven.settings.building.DefaultSettingsBuilder.readSettings(DefaultSettingsBuilder.java:169)
    at org.apache.maven.settings.building.DefaultSettingsBuilder.build(DefaultSettingsBuilder.java:91)
    at org.apache.maven.cli.MavenCli.settings(MavenCli.java:766)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:209)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:157)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
mvn_deploy.sh: line 7: -Durl=git:releases://[email protected]:my-repo-url.git: No such file or directory

I have included the 0.2.3 shaded jar in $M2_HOME/lib.
Any ideas?

Wagon-git releases URL returning error 400

Hi! I'm trying to use wagon-git for private bitbucket maven repo for use with gradle following some of the guides posted on README.
However, https://raw.github.com/synergian/wagon-git/releases is issuing errors, is that the right location for using the plugin ? Or am I missing something and that should be user-url ?

Thanks!

Versions overhaul

Hello,
First of all, thank you for the great way to achieve that very difficult task.
I have just one request.

Can you update the repository dependencies (small overhaul)?

Thank you in advance.

Multi remote doesn't really work

When using different remotes in the same project:

synergian-private Synergian Private Releases git:releases://[email protected]:synergian/private-maven-repo.git bundler-site bundler github homepage git:gh-pages://[email protected]:synergian/bundler.git

One for releases. One for site. Sites gets published in the first remote.

Remotes are not being switched, but newer branches (like gh-pages) are being created in the first remote.

Need to control the lifecycle better. Even a solution could be cleaning up the cloned repository and pull, although very slow.

Make unique snapshots optional

I'm working on a Java library that I'm using with Scala, and unfortunately sbt doesn't understand unique snapshots with timestamps. If there were some way to disable unique timestamp snapshots that would be awesome.

Cannot deploy jar on Bitbucket

I try to deploy jar on Bitbucket repo, but during excecuting deploying script, I entered password to repo 4 times, also I've got next error:

[DEBUG] RAN: git commit --allow-empty -m [wagon-git] commit to branch site 1/21/15 4:30 PM / $? = 128
Session error: org.apache.maven.wagon.ConnectionException: Unable to push git repostory: Unable to commit files
Session error: org.apache.maven.wagon.ConnectionException: Unable to push git repostory: Unable to commit files
[ERROR] Error disconnecting wagon - ignored
org.apache.maven.wagon.ConnectionException: Unable to push git repostory: Unable to commit files
at ar.com.synergian.wagongit.GitWagon.closeConnection(GitWagon.java:122)
at org.apache.maven.wagon.AbstractWagon.disconnect(AbstractWagon.java:232)
at org.apache.maven.plugins.site.AbstractDeployMojo.deploy(AbstractDeployMojo.java:332)
at org.apache.maven.plugins.site.AbstractDeployMojo.deployTo(AbstractDeployMojo.java:281)
at org.apache.maven.plugins.site.AbstractDeployMojo.execute(AbstractDeployMojo.java:163)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:582)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: ar.com.synergian.wagongit.GitException: Unable to commit files
at ar.com.synergian.wagongit.GitBackend.pushAll(GitBackend.java:174)
at ar.com.synergian.wagongit.GitWagon.closeConnection(GitWagon.java:116)
... 25 more

Using this script:
mvn clean deploy site-deploy -DperformRelease -Dwagon.git.debug=true

ssh key can't have another name than "“id_rsa”"

I tried to deploy an aar library to my private bitbucket Repository (from windows7). On my PC I used 2 different RSA ssh key: the default named "id_rsa" was for another purpose so I defined a specific "mybitbucketkey" rsa key for bitbucket and in my /.ssh dir I wrote a config file defining the alias :
Host bitbucket.org
HostName bitbucket.org
PreferredAuthentications publickey
IdentityFile ~/.ssh/ mybitbucketkey

This works perfectly for any commit (from git bash or Android Studio) but doesn't work for deploying artifact with wagon-git (through gradle). I obtained a "permission denied". The only solution was to use only the ssh key named "id_rsa".
Is there a way to use another generated private key than "id_rsa"?

Not compatible with Android plugin 3.0

I upgraded to Android plugin 3.0 and Gradle 4.1 but when using the same gradle tasks (with the necessary changes compile -> implementation etc) the uploadArchives tasks can no longer determine the outputs. Is this because of the new variant aware behavior of the plugin ? I basically used the same file made the changes for 3.0 and I get the error "Task declared no outputs". When I use the source file and the javadoc artifacts those are uploaded just the actual aar cannot be found. Can you help with this ?

Increased resolution time when using wagon-git

Hi! Thanks for the awesome tool! We just set up a private bitbucket repo using wagon-git, and on this project we both publish an android aar and consume another private dependency from our private repo. We found it resolves dependencies unusually slow, sometimes timing out still.
Probably its our own fault, but if you could shed some light if it may have something to do with the plugin, please let me know!
Our repositories look like this:

allprojects {
    repositories {
        jcenter()
        maven {
            credentials {
                username USERNAME
                password PASSWORD
            }
            url "https://api.bitbucket.org/1.0/repositories/my-team/private-repo/raw/releases"
        }
        maven {
            url "https://raw.githubusercontent.com/synergian/wagon-git/releases"
        }
    }
}

When executing gradle with --info flag we can spot a lot of stuff like this:

Resource missing. [HTTP GET: https://raw.githubusercontent.com/synergian/wagon-git/releases/com/nostra13/universalimageloader/universal-image-loader/maven-metadata.xml]
Failed to get resource: GET. [HTTP HTTP/1.1 400 Bad Request: https://raw.githubusercontent.com/synergian/wagon-git/releases/com/nostra13/universalimageloader/universal-image-loader/]
Resource missing. [HTTP GET: https://raw.githubusercontent.com/synergian/wagon-git/releases/com/google/code/gson/gson/maven-metadata.xml]
Failed to get resource: GET. [HTTP HTTP/1.1 400 Bad Request: https://raw.githubusercontent.com/synergian/wagon-git/releases/com/google/code/gson/gson/]
Resource missing. [HTTP GET: https://raw.githubusercontent.com/synergian/wagon-git/releases/com/octo/android/robospice/robospice-spring-android/maven-metadata.xml]
Failed to get resource: GET. [HTTP HTTP/1.1 400 Bad Request: https://raw.githubusercontent.com/synergian/wagon-git/releases/com/octo/android/robospice/robospice-spring-android/]
Resource missing. [HTTP GET: https://raw.githubusercontent.com/synergian/wagon-git/releases/org/codehaus/jackson/jackson-mapper-asl/maven-metadata.xml]
Failed to get resource: GET. [HTTP HTTP/1.1 400 Bad Request: https://raw.githubusercontent.com/synergian/wagon-git/releases/org/codehaus/jackson/jackson-mapper-asl/]
Resource missing. [HTTP GET: https://raw.githubusercontent.com/synergian/wagon-git/releases/com/aurelhubert/ahbottomnavigation/maven-metadata.xml]
Failed to get resource: GET. [HTTP HTTP/1.1 400 Bad Request: https://raw.githubusercontent.com/synergian/wagon-git/releases/com/aurelhubert/ahbottomnavigation/]
Resource missing. [HTTP GET: https://raw.githubusercontent.com/synergian/wagon-git/releases/io/socket/socket.io-client/maven-metadata.xml]
Failed to get resource: GET. [HTTP HTTP/1.1 400 Bad Request: https://raw.githubusercontent.com/synergian/wagon-git/releases/io/socket/socket.io-client/]
Resource missing. [HTTP GET: https://raw.githubusercontent.com/synergian/wagon-git/releases/com/facebook/android/facebook-android-sdk/maven-metadata.xml]
Failed to get resource: GET. [HTTP HTTP/1.1 400 Bad Request: https://raw.githubusercontent.com/synergian/wagon-git/releases/com/facebook/android/facebook-android-sdk/]
Resource missing. [HTTP GET: https://raw.githubusercontent.com/synergian/wagon-git/releases/com/android/support/support-v4/maven-metadata.xml]
Failed to get resource: GET. [HTTP HTTP/1.1 400 Bad Request: https://raw.githubusercontent.com/synergian/wagon-git/releases/com/android/support/support-v4/]

Many dependencies are searching the wagon-git releases, which of course makes no sense. I tried in another working project, which already consumes third party repos, such as this:

allprojects {
    repositories {
        jcenter()
        maven { url "https://jitpack.io" }
        maven { url 'https://maven.fabric.io/public' }
        maven { url "https://raw.githubusercontent.com/synergian/wagon-git/releases" }
    }
}

And the same behavior can be found when print --info output, many dependencies search wagon-git, fail, then properly resolve on the other repos.

Best regards,
Rafael

Error using

Hello I made all the settings , but you need to get the result failed. Your plugin crashes at this site :

[INFO] [git] create mode 100644 ru/enterix/netty-smpp-lib/0.2.0-SNAPSHOT/maven-
metadata.xml
[INFO] [git] create mode 100644 ru/enterix/netty-smpp-lib/0.2.0-SNAPSHOT/maven-
metadata.xml.md5
[INFO] [git] create mode 100644 ru/enterix/netty-smpp-lib/0.2.0-SNAPSHOT/maven-
metadata.xml.sha1
[INFO] [git] create mode 100644 ru/enterix/netty-smpp-lib/0.2.0-SNAPSHOT/netty-
smpp-lib-0.2.0-20130923.165031-1.jar
[INFO] [git] create mode 100644 ru/enterix/netty-smpp-lib/0.2.0-SNAPSHOT/netty-
smpp-lib-0.2.0-20130923.165031-1.jar.md5
[INFO] [git] create mode 100644 ru/enterix/netty-smpp-lib/0.2.0-SNAPSHOT/netty-
smpp-lib-0.2.0-20130923.165031-1.jar.sha1
[INFO] [git] create mode 100644 ru/enterix/netty-smpp-lib/0.2.0-SNAPSHOT/netty-
smpp-lib-0.2.0-20130923.165031-1.pom
[INFO] [git] create mode 100644 ru/enterix/netty-smpp-lib/0.2.0-SNAPSHOT/netty-
smpp-lib-0.2.0-20130923.165031-1.pom.md5
[INFO] [git] create mode 100644 ru/enterix/netty-smpp-lib/0.2.0-SNAPSHOT/netty-
smpp-lib-0.2.0-20130923.165031-1.pom.sha1
[INFO] [git] create mode 100644 ru / enterix / netty-smpp-lib / maven-metadata.xml
[INFO] [git] create mode 100644 ru / enterix / netty-smpp-lib / maven-metadata.xml.md
5
[INFO] [git] create mode 100644 ru / enterix / netty-smpp-lib / maven-metadata.xml.sh
a1
[INFO] Executing: cmd.exe / X / C "git push - progress origin snapshots"
Here -> [INFO] Working directory: C: \ Users \ RUSTAM \ AppData \ Local \ Temp \ wagon-git-5464a50b5
3b58238fe1bfebfbdac40a83b7a73f2

Further, nothing happens.

What I do not it?

Build error on release

[INFO] [INFO] [deploy:deploy {execution: default-deploy}]
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [ERROR] BUILD ERROR
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] Error deploying artifact: While configuring wagon for 'synergian-private': Unable to apply wagon configuration.
[INFO]
[INFO] Cannot find setter nor field in ar.com.synergian.wagongit.GitWagon for 'httpHeaders'
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] For more information, run Maven with the -e switch
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] Total time: 9 seconds
[INFO] [INFO] Finished at: Sat Sep 24 20:54:12 ART 2011
[INFO] [INFO] Final Memory: 35M/488M
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Maven execution failed, exit code: '1'

git remote add origin <url> failed.

Execute git remote add origin <url> failed when I use GitHub for Windows with this plugin.

In GitBackend.java

if (!run("remote", new String[] { "add", "origin", remote }))
    throw new GitException("git remote failed");

This works for me.

if (!run("remote", new String[] { "add", "origin", remote })){
    log.warn("git remote add failed, try git remote set-url");
    if(!run("remote", new String[] { "set-url", "origin", remote })){
        throw new GitException("git remote failed");
    }
}

Can't pull projects

Hi, i'm trying to use your plugin to upload a JSF project, developed with Eclipse, on a Bitbucket repository.
Sadly i'm receiving this error:
"Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project pokerLiveMaps-dataModel: Failed to deploy artifacts: Could not transfer artifact it.katuiros:pokerLiveMaps-dataModel:jar:0.0.1 from/to Katuiros-bitbucket (git:releases://[email protected]:Katuiros/plm.git): Unable to pull git repository: git init failed"

The repository is private, but i configured the .m2/settings.xml correctly as you said with username and password for the id "Katuiros-bitbucket".

This is the piece of pom.xml code in which i configured the plugin:

"
[...]

<!-- More Project Information -->
<name>${project.artifactId}</name>
<distributionManagement>
    <repository>
        <id>Katuiros-bitbucket</id>
        <name>plm</name>
        <url>git:releases://[email protected]:Katuiros/plm.git</url>
    </repository>
</distributionManagement>

  <build>
   [...]
   <!-- Wagon Git plugin -->
    <extensions>
        <extension>
            <groupId>ar.com.synergian</groupId>
            <artifactId>wagon-git</artifactId>
            <version>0.2.0</version>
        </extension>
    </extensions>
    </build>

<!-- Environment Settings -->
<repositories>
</repositories>
<pluginRepositories>
    <pluginRepository>
        <id>synergian-repo</id>
        <url>https://raw.github.com/synergian/wagon-git/releases</url>
    </pluginRepository>
</pluginRepositories>

[...]
"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.