You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by sc...@JAVACTIVITY.ORG on 2015/12/08 16:33:13 UTC
[maven-scm-plugin] Why does scm:update fail on a branch?
I am using the maven-scm-plugin with git.
I find that the following succeeds:
mvn -DscmVersion=abc -DscmVersionType=branch scm:bootstrap
whereas the following, seemingly identical except for the command fails:
mvn -X -DscmVersion=rpm -DscmVersionType=branch scm:update
[ERROR] Provider message:
[ERROR] The git-log command failed.
[ERROR] Command output:
[ERROR] fatal: ambiguous argument 'rpm': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions
This looks like a bug in the plugin, but I don't really know. Why would the same specification fail for update but succeed for bootstrap?
Other commands, such as scm:diff, scm:status, smc:checkout also work.
Is this a bug and is there a workaround?
RE: [maven-scm-plugin] Why does scm:update fail on a branch?
Posted by Martin Gainty <mg...@hotmail.com>.
Stephen:
branch update works *if* you specify scmVersionType=branch and valid branch name via scmVersion=branch-name
mvn -DscmVersionType=branch -DscmVersion=master -DconnectionUrl=git://git-wip-us.apache.org/repos/asf/maven-scm.git/maven-scm-plugin generate-sources
pom.xml plugin:
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-scm-plugin</artifactId> <version>1.9.4</version> <executions> <execution> <id>1</id> <phase>generate-sources</phase> <goals> <goal>update</goal> </goals> <configuration> <basedir>${project.basedir}</basedir> <connectionType>connection</connectionType> <connectionUrl>git://git-wip-us.apache.org/repos/asf/maven-scm.git/maven-scm-plugin</connectionUrl> <pushChanges>false</pushChanges> <scmVersionType>branch</scmVersionType> <scmVersion>master</scmVersion> <scmVersion>1.9.4</scmVersion> <runChangelog>false</runChangelog> <revisionKey>1.9.4</revisionKey> </configuration> </execution> </executions> </plugin>
?Martin
> To: users@maven.apache.org
> From: scohen@JAVACTIVITY.ORG
> Subject: RE: [maven-scm-plugin] Why does scm:update fail on a branch?
> Date: Tue, 8 Dec 2015 13:12:23 -0700
>
> The error message below should have been:
> [ERROR] fatal: ambiguous argument 'abc': unknown revision or path not in the working tree.
>
> --------- Original Message --------- Subject: [maven-scm-plugin] Why does scm:update fail on a branch?
> From: scohen@JAVACTIVITY.ORG
> Date: 12/8/15 9:33 am
> To: users@maven.apache.org
>
> I am using the maven-scm-plugin with git.
>
> I find that the following succeeds:
>
> mvn -DscmVersion=abc -DscmVersionType=branch scm:bootstrap
>
> whereas the following, seemingly identical except for the command fails:
>
> mvn -X -DscmVersion=rpm -DscmVersionType=branch scm:update
>
> [ERROR] Provider message:
> [ERROR] The git-log command failed.
> [ERROR] Command output:
> [ERROR] fatal: ambiguous argument 'rpm': unknown revision or path not in the working tree.
> Use '--' to separate paths from revisions
>
>
> This looks like a bug in the plugin, but I don't really know. Why would the same specification fail for update but succeed for bootstrap?
>
> Other commands, such as scm:diff, scm:status, smc:checkout also work.
>
> Is this a bug and is there a workaround?
RE: [maven-scm-plugin] Why does scm:update fail on a branch?
Posted by sc...@JAVACTIVITY.ORG.
The error message below should have been:
[ERROR] fatal: ambiguous argument 'abc': unknown revision or path not in the working tree.
--------- Original Message --------- Subject: [maven-scm-plugin] Why does scm:update fail on a branch?
From: scohen@JAVACTIVITY.ORG
Date: 12/8/15 9:33 am
To: users@maven.apache.org
I am using the maven-scm-plugin with git.
I find that the following succeeds:
mvn -DscmVersion=abc -DscmVersionType=branch scm:bootstrap
whereas the following, seemingly identical except for the command fails:
mvn -X -DscmVersion=rpm -DscmVersionType=branch scm:update
[ERROR] Provider message:
[ERROR] The git-log command failed.
[ERROR] Command output:
[ERROR] fatal: ambiguous argument 'rpm': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions
This looks like a bug in the plugin, but I don't really know. Why would the same specification fail for update but succeed for bootstrap?
Other commands, such as scm:diff, scm:status, smc:checkout also work.
Is this a bug and is there a workaround?