Re: Problem with wagon-scm and gitexe
So looking at the git SCM code (git-commons and gitexe) and at the wagon-scm code, the problem I see is that there is no syntax in the git SCM url to specify a branch to which to deploy the site. Not a surprise, since git generally wants to clone an entire repository and then push and pull things. The desired process would be something along the lines of the following. (In UN*X-y/scripty/Velocity-y format.) mkdir ${checkoutDirectory} cd ${checkoutDirectory} git init git remote add origin ${gitRepoUrl} git pull origin refs/heads/${siteBranch} replace the contents of the checkout directory, except for the .git subdirectory, with the site docs git add . git commit -a -m Deploy site documentation. git push origin master:${siteBranch} rm -Rf ${checkoutDirectory} This works. Obviously, we wouldn't want to mess up the git SCM for other uses. Does the release plugin use the wagon? I *really* don't want to end up looking at all the Maven source code. Any ideas on where changes need to be made? In wagon-scm? In gitexe or git-commons? I see no way to configure wagons, which I find a bit of a lack. I suppose the URL structure and username/password info in settings.xml is supposed to take care of everything. Should there be a branch element in the git scm url structure a la the module element in CVS scm urls? -K On Apr 1, 2010, at 4:24 PM, Kathryn Huxtable wrote: Yeah, that's more or less what I mean. -K On Apr 1, 2010, at 4:09 PM, Mark Struberg wrote: I honestly doubt that wagon-scm + CVS currently works when using branches (from glimpsing at the sources). And I'm not sure what you mean with forking it. Wouldn't it be much easier to simply checkout wagon-scm and if you found a way to provide the branch as ScmVersion (ScmBranch and ScmTag are subclassses of ScmVersion [3]), then simply open a Jira issue and add your changes as patch. Patches are always highly welcome :) txs and LieGrue, strub [3] http://maven.apache.org/scm/apidocs/org/apache/maven/scm/ScmBranch.html --- Kathryn Huxtable kath...@kathrynhuxtable.org schrieb am Do, 1.4.2010: Von: Kathryn Huxtable kath...@kathrynhuxtable.org Betreff: Re: Problem with wagon-scm and gitexe An: Maven Users List users@maven.apache.org Datum: Donnerstag, 1. April, 2010 22:43 Uhr Thanks, Mark, These are good points. I'm thinking that the issues are in wagon-scm, which is listed as being in progress, so I can't really expect perfection. And they *do* say it's only been tested with svn and cvs. I'm thinking that I may be modding wagon-svn, more to see what's going on than to fork a project. All of this is by the way. I really should be working on my project, not fiddling with tools, but fiddling with tools is fun sometimes. -K On Apr 1, 2010, at 3:37 PM, Mark Struberg wrote: Kathryn, I haven't used wagon-scm, so I can only make vague assumptions. Basically all the branches and tag stuff should be working in maven-scm-provider-gitexe. But I'm not sure how wagon-scm tells us what branch it likes to use. From looking at the source [1] I only can see that all ScmVersion parameters are always given as null. So I'm not sure if that could work at all. Please keep in mind that SVN is really exceptional with handling branches by copying the trunk to a new location. This way you get an own URL which you won't get in most other SCMs like CVS, PVCS, git or hg. In fact SVN doesn't have a 'real' branch and tag concept but internally always performs a full shallow copy. So it would be interesting if this would also work e.g. with CVS. LieGrue, strub [1] http://svn.apache.org/viewvc/maven/wagon/trunk/wagon-providers/wagon-scm/src/main/java/org/apache/maven/wagon/providers/scm/ScmWagon.java?view=markup --- Kathryn Huxtable kath...@kathrynhuxtable.org schrieb am Do, 1.4.2010: Von: Kathryn Huxtable kath...@kathrynhuxtable.org Betreff: Re: Problem with wagon-scm and gitexe An: Maven Users List users@maven.apache.org Datum: Donnerstag, 1. April, 2010 19:21 Uhr Since it seems to be my practice to have second thought after sending a message, I'll add that I can check out the gh-pages branch of my git repository into a separate directory and deploy there using a file: URL and then commit that and push it. That works. I just think it should be able to be automated. -K On Apr 1, 2010, at 12:14 PM, Kathryn Huxtable wrote: I know the docs say that wagon-scm has only been tested with CVS and Subversion, and I've run it with Subversion successfully. Is anyone working on getting it to work with Git, or does it already? I created a very simply project with a README and a pom.xml and nothing else. It's at http://github.com/khuxtable/test-project It uses versions 1.3 of the gitexe and scm-manager-plexus extensions and version 1.0-beta-6 of the scm wagon. What I would like to do is deploy my site docs (all generated
Re: Problem with wagon-scm and gitexe
Here's an alternative script: mkdir ${checkoutDirectory} cd ${checkoutDirectory} git init git remote add -t ${siteBranch} origin ${gitRepoUrl} git fetch git checkout ${siteBranch} replace the contents of the checkout directory, except for the .git subdirectory, with the site docs git add . git commit -a -m Deploy site documentation git push rm -Rf ${checkoutDirectory} -K On Apr 2, 2010, at 11:28 AM, Kathryn Huxtable wrote: So looking at the git SCM code (git-commons and gitexe) and at the wagon-scm code, the problem I see is that there is no syntax in the git SCM url to specify a branch to which to deploy the site. Not a surprise, since git generally wants to clone an entire repository and then push and pull things. The desired process would be something along the lines of the following. (In UN*X-y/scripty/Velocity-y format.) mkdir ${checkoutDirectory} cd ${checkoutDirectory} git init git remote add origin ${gitRepoUrl} git pull origin refs/heads/${siteBranch} replace the contents of the checkout directory, except for the .git subdirectory, with the site docs git add . git commit -a -m Deploy site documentation. git push origin master:${siteBranch} rm -Rf ${checkoutDirectory} This works. Obviously, we wouldn't want to mess up the git SCM for other uses. Does the release plugin use the wagon? I *really* don't want to end up looking at all the Maven source code. Any ideas on where changes need to be made? In wagon-scm? In gitexe or git-commons? I see no way to configure wagons, which I find a bit of a lack. I suppose the URL structure and username/password info in settings.xml is supposed to take care of everything. Should there be a branch element in the git scm url structure a la the module element in CVS scm urls? -K On Apr 1, 2010, at 4:24 PM, Kathryn Huxtable wrote: Yeah, that's more or less what I mean. -K On Apr 1, 2010, at 4:09 PM, Mark Struberg wrote: I honestly doubt that wagon-scm + CVS currently works when using branches (from glimpsing at the sources). And I'm not sure what you mean with forking it. Wouldn't it be much easier to simply checkout wagon-scm and if you found a way to provide the branch as ScmVersion (ScmBranch and ScmTag are subclassses of ScmVersion [3]), then simply open a Jira issue and add your changes as patch. Patches are always highly welcome :) txs and LieGrue, strub [3] http://maven.apache.org/scm/apidocs/org/apache/maven/scm/ScmBranch.html --- Kathryn Huxtable kath...@kathrynhuxtable.org schrieb am Do, 1.4.2010: Von: Kathryn Huxtable kath...@kathrynhuxtable.org Betreff: Re: Problem with wagon-scm and gitexe An: Maven Users List users@maven.apache.org Datum: Donnerstag, 1. April, 2010 22:43 Uhr Thanks, Mark, These are good points. I'm thinking that the issues are in wagon-scm, which is listed as being in progress, so I can't really expect perfection. And they *do* say it's only been tested with svn and cvs. I'm thinking that I may be modding wagon-svn, more to see what's going on than to fork a project. All of this is by the way. I really should be working on my project, not fiddling with tools, but fiddling with tools is fun sometimes. -K On Apr 1, 2010, at 3:37 PM, Mark Struberg wrote: Kathryn, I haven't used wagon-scm, so I can only make vague assumptions. Basically all the branches and tag stuff should be working in maven-scm-provider-gitexe. But I'm not sure how wagon-scm tells us what branch it likes to use. From looking at the source [1] I only can see that all ScmVersion parameters are always given as null. So I'm not sure if that could work at all. Please keep in mind that SVN is really exceptional with handling branches by copying the trunk to a new location. This way you get an own URL which you won't get in most other SCMs like CVS, PVCS, git or hg. In fact SVN doesn't have a 'real' branch and tag concept but internally always performs a full shallow copy. So it would be interesting if this would also work e.g. with CVS. LieGrue, strub [1] http://svn.apache.org/viewvc/maven/wagon/trunk/wagon-providers/wagon-scm/src/main/java/org/apache/maven/wagon/providers/scm/ScmWagon.java?view=markup --- Kathryn Huxtable kath...@kathrynhuxtable.org schrieb am Do, 1.4.2010: Von: Kathryn Huxtable kath...@kathrynhuxtable.org Betreff: Re: Problem with wagon-scm and gitexe An: Maven Users List users@maven.apache.org Datum: Donnerstag, 1. April, 2010 19:21 Uhr Since it seems to be my practice to have second thought after sending a message, I'll add that I can check out the gh-pages branch of my git repository into a separate directory and deploy there using a file: URL and then commit that and push it. That works. I just think it should be able to be automated. -K On Apr 1, 2010, at 12:14 PM, Kathryn Huxtable wrote: I know the docs say that wagon-scm has only been tested with CVS
Re: Problem with wagon-scm and gitexe
Kathryn, I think there is a conceptional misunderstanding here. Subversion is actually almost the ONLY SCM which has different URLs on different branches. Usually the version gets set via the -DscmVersion parameter which transfers into the ScmVersion parameter in various functions of the maven-scm-api! Your attempt with first determining/setting the branch with native git commands would actually work with git, but I'd prefer to give wagon-scm the branch as parameter and use that inside the code. txs and LieGrue, strub --- Kathryn Huxtable kath...@kathrynhuxtable.org schrieb am Fr, 2.4.2010: Von: Kathryn Huxtable kath...@kathrynhuxtable.org Betreff: Re: Problem with wagon-scm and gitexe An: Maven Users List users@maven.apache.org Datum: Freitag, 2. April, 2010 18:56 Uhr Here's an alternative script: mkdir ${checkoutDirectory} cd ${checkoutDirectory} git init git remote add -t ${siteBranch} origin ${gitRepoUrl} git fetch git checkout ${siteBranch} replace the contents of the checkout directory, except for the .git subdirectory, with the site docs git add . git commit -a -m Deploy site documentation git push rm -Rf ${checkoutDirectory} -K On Apr 2, 2010, at 11:28 AM, Kathryn Huxtable wrote: So looking at the git SCM code (git-commons and gitexe) and at the wagon-scm code, the problem I see is that there is no syntax in the git SCM url to specify a branch to which to deploy the site. Not a surprise, since git generally wants to clone an entire repository and then push and pull things. The desired process would be something along the lines of the following. (In UN*X-y/scripty/Velocity-y format.) mkdir ${checkoutDirectory} cd ${checkoutDirectory} git init git remote add origin ${gitRepoUrl} git pull origin refs/heads/${siteBranch} replace the contents of the checkout directory, except for the .git subdirectory, with the site docs git add . git commit -a -m Deploy site documentation. git push origin master:${siteBranch} rm -Rf ${checkoutDirectory} This works. Obviously, we wouldn't want to mess up the git SCM for other uses. Does the release plugin use the wagon? I *really* don't want to end up looking at all the Maven source code. Any ideas on where changes need to be made? In wagon-scm? In gitexe or git-commons? I see no way to configure wagons, which I find a bit of a lack. I suppose the URL structure and username/password info in settings.xml is supposed to take care of everything. Should there be a branch element in the git scm url structure a la the module element in CVS scm urls? -K On Apr 1, 2010, at 4:24 PM, Kathryn Huxtable wrote: Yeah, that's more or less what I mean. -K On Apr 1, 2010, at 4:09 PM, Mark Struberg wrote: I honestly doubt that wagon-scm + CVS currently works when using branches (from glimpsing at the sources). And I'm not sure what you mean with forking it. Wouldn't it be much easier to simply checkout wagon-scm and if you found a way to provide the branch as ScmVersion (ScmBranch and ScmTag are subclassses of ScmVersion [3]), then simply open a Jira issue and add your changes as patch. Patches are always highly welcome :) txs and LieGrue, strub [3] http://maven.apache.org/scm/apidocs/org/apache/maven/scm/ScmBranch.html --- Kathryn Huxtable kath...@kathrynhuxtable.org schrieb am Do, 1.4.2010: Von: Kathryn Huxtable kath...@kathrynhuxtable.org Betreff: Re: Problem with wagon-scm and gitexe An: Maven Users List users@maven.apache.org Datum: Donnerstag, 1. April, 2010 22:43 Uhr Thanks, Mark, These are good points. I'm thinking that the issues are in wagon-scm, which is listed as being in progress, so I can't really expect perfection. And they *do* say it's only been tested with svn and cvs. I'm thinking that I may be modding wagon-svn, more to see what's going on than to fork a project. All of this is by the way. I really should be working on my project, not fiddling with tools, but fiddling with tools is fun sometimes. -K On Apr 1, 2010, at 3:37 PM, Mark Struberg wrote: Kathryn, I haven't used wagon-scm, so I can only make vague assumptions. Basically all the branches and tag stuff should be working in maven-scm-provider-gitexe. But I'm not sure how wagon-scm tells us what branch it likes to use. From looking at the source [1] I only can see that all ScmVersion parameters are always given as null. So I'm not sure if that could work at all. Please keep in mind that SVN is really exceptional with handling branches by copying the trunk to a new location. This way you get an own URL which you won't get in most other SCMs like CVS, PVCS, git or hg. In fact SVN doesn't have a 'real' branch and tag concept but internally always performs a full shallow copy. So it would be interesting if this would also work
Re: Problem with wagon-scm and gitexe
I don't really think there's a conceptual misunderstanding on my part, since the format for the CVS URL in the SCM code allows for a module_name as part of the URL, and not in standard URL syntax. But I take your point. My basic question of the moment is, who calls putDirectory? Is it called from the release plugin? It seems to be getting called from the site plugin. The wagon documentation leaves something to be desired for the unfamiliar developer. Yes, there are javadocs, but they don't tell you *how* the public methods and classes are used. I'm trying to figure that out without complaining too much, or looking at all the code that uses wagons. -K On Apr 2, 2010, at 12:43 PM, Mark Struberg wrote: Kathryn, I think there is a conceptional misunderstanding here. Subversion is actually almost the ONLY SCM which has different URLs on different branches. Usually the version gets set via the -DscmVersion parameter which transfers into the ScmVersion parameter in various functions of the maven-scm-api! Your attempt with first determining/setting the branch with native git commands would actually work with git, but I'd prefer to give wagon-scm the branch as parameter and use that inside the code. txs and LieGrue, strub --- Kathryn Huxtable kath...@kathrynhuxtable.org schrieb am Fr, 2.4.2010: Von: Kathryn Huxtable kath...@kathrynhuxtable.org Betreff: Re: Problem with wagon-scm and gitexe An: Maven Users List users@maven.apache.org Datum: Freitag, 2. April, 2010 18:56 Uhr Here's an alternative script: mkdir ${checkoutDirectory} cd ${checkoutDirectory} git init git remote add -t ${siteBranch} origin ${gitRepoUrl} git fetch git checkout ${siteBranch} replace the contents of the checkout directory, except for the .git subdirectory, with the site docs git add . git commit -a -m Deploy site documentation git push rm -Rf ${checkoutDirectory} -K On Apr 2, 2010, at 11:28 AM, Kathryn Huxtable wrote: So looking at the git SCM code (git-commons and gitexe) and at the wagon-scm code, the problem I see is that there is no syntax in the git SCM url to specify a branch to which to deploy the site. Not a surprise, since git generally wants to clone an entire repository and then push and pull things. The desired process would be something along the lines of the following. (In UN*X-y/scripty/Velocity-y format.) mkdir ${checkoutDirectory} cd ${checkoutDirectory} git init git remote add origin ${gitRepoUrl} git pull origin refs/heads/${siteBranch} replace the contents of the checkout directory, except for the .git subdirectory, with the site docs git add . git commit -a -m Deploy site documentation. git push origin master:${siteBranch} rm -Rf ${checkoutDirectory} This works. Obviously, we wouldn't want to mess up the git SCM for other uses. Does the release plugin use the wagon? I *really* don't want to end up looking at all the Maven source code. Any ideas on where changes need to be made? In wagon-scm? In gitexe or git-commons? I see no way to configure wagons, which I find a bit of a lack. I suppose the URL structure and username/password info in settings.xml is supposed to take care of everything. Should there be a branch element in the git scm url structure a la the module element in CVS scm urls? -K On Apr 1, 2010, at 4:24 PM, Kathryn Huxtable wrote: Yeah, that's more or less what I mean. -K On Apr 1, 2010, at 4:09 PM, Mark Struberg wrote: I honestly doubt that wagon-scm + CVS currently works when using branches (from glimpsing at the sources). And I'm not sure what you mean with forking it. Wouldn't it be much easier to simply checkout wagon-scm and if you found a way to provide the branch as ScmVersion (ScmBranch and ScmTag are subclassses of ScmVersion [3]), then simply open a Jira issue and add your changes as patch. Patches are always highly welcome :) txs and LieGrue, strub [3] http://maven.apache.org/scm/apidocs/org/apache/maven/scm/ScmBranch.html --- Kathryn Huxtable kath...@kathrynhuxtable.org schrieb am Do, 1.4.2010: Von: Kathryn Huxtable kath...@kathrynhuxtable.org Betreff: Re: Problem with wagon-scm and gitexe An: Maven Users List users@maven.apache.org Datum: Donnerstag, 1. April, 2010 22:43 Uhr Thanks, Mark, These are good points. I'm thinking that the issues are in wagon-scm, which is listed as being in progress, so I can't really expect perfection. And they *do* say it's only been tested with svn and cvs. I'm thinking that I may be modding wagon-svn, more to see what's going on than to fork a project. All of this is by the way. I really should be working on my project, not fiddling with tools, but fiddling with tools is fun sometimes. -K On Apr 1, 2010, at 3:37 PM, Mark Struberg wrote: Kathryn, I haven't used wagon-scm, so I can only make vague assumptions. Basically all the branches and tag
Re: Problem with wagon-scm and gitexe
Okay, I'm not a CVS user, but I tried using wagon-scm with the maven-scm-provider-cvsexe and a CVS URL and got: Transfer error: org.apache.maven.scm.manager.NoSuchScmProviderException: No such provider: 'cvs'. I had given it the following site URL: urlscm:cvs:ext:usern...@cvs.apache.org:/cvs/root:module/url I know the connection stuff isn't valid, but surely that's not why I got that error... Also, one of the things I pointed out earlier on the particular git clone command used by wagon-scm is the /. after the git repo name. This seems to be an SVN holdover. -K On Apr 2, 2010, at 12:59 PM, Kathryn Huxtable wrote: I don't really think there's a conceptual misunderstanding on my part, since the format for the CVS URL in the SCM code allows for a module_name as part of the URL, and not in standard URL syntax. But I take your point. My basic question of the moment is, who calls putDirectory? Is it called from the release plugin? It seems to be getting called from the site plugin. The wagon documentation leaves something to be desired for the unfamiliar developer. Yes, there are javadocs, but they don't tell you *how* the public methods and classes are used. I'm trying to figure that out without complaining too much, or looking at all the code that uses wagons. -K On Apr 2, 2010, at 12:43 PM, Mark Struberg wrote: Kathryn, I think there is a conceptional misunderstanding here. Subversion is actually almost the ONLY SCM which has different URLs on different branches. Usually the version gets set via the -DscmVersion parameter which transfers into the ScmVersion parameter in various functions of the maven-scm-api! Your attempt with first determining/setting the branch with native git commands would actually work with git, but I'd prefer to give wagon-scm the branch as parameter and use that inside the code. txs and LieGrue, strub --- Kathryn Huxtable kath...@kathrynhuxtable.org schrieb am Fr, 2.4.2010: Von: Kathryn Huxtable kath...@kathrynhuxtable.org Betreff: Re: Problem with wagon-scm and gitexe An: Maven Users List users@maven.apache.org Datum: Freitag, 2. April, 2010 18:56 Uhr Here's an alternative script: mkdir ${checkoutDirectory} cd ${checkoutDirectory} git init git remote add -t ${siteBranch} origin ${gitRepoUrl} git fetch git checkout ${siteBranch} replace the contents of the checkout directory, except for the .git subdirectory, with the site docs git add . git commit -a -m Deploy site documentation git push rm -Rf ${checkoutDirectory} -K On Apr 2, 2010, at 11:28 AM, Kathryn Huxtable wrote: So looking at the git SCM code (git-commons and gitexe) and at the wagon-scm code, the problem I see is that there is no syntax in the git SCM url to specify a branch to which to deploy the site. Not a surprise, since git generally wants to clone an entire repository and then push and pull things. The desired process would be something along the lines of the following. (In UN*X-y/scripty/Velocity-y format.) mkdir ${checkoutDirectory} cd ${checkoutDirectory} git init git remote add origin ${gitRepoUrl} git pull origin refs/heads/${siteBranch} replace the contents of the checkout directory, except for the .git subdirectory, with the site docs git add . git commit -a -m Deploy site documentation. git push origin master:${siteBranch} rm -Rf ${checkoutDirectory} This works. Obviously, we wouldn't want to mess up the git SCM for other uses. Does the release plugin use the wagon? I *really* don't want to end up looking at all the Maven source code. Any ideas on where changes need to be made? In wagon-scm? In gitexe or git-commons? I see no way to configure wagons, which I find a bit of a lack. I suppose the URL structure and username/password info in settings.xml is supposed to take care of everything. Should there be a branch element in the git scm url structure a la the module element in CVS scm urls? -K On Apr 1, 2010, at 4:24 PM, Kathryn Huxtable wrote: Yeah, that's more or less what I mean. -K On Apr 1, 2010, at 4:09 PM, Mark Struberg wrote: I honestly doubt that wagon-scm + CVS currently works when using branches (from glimpsing at the sources). And I'm not sure what you mean with forking it. Wouldn't it be much easier to simply checkout wagon-scm and if you found a way to provide the branch as ScmVersion (ScmBranch and ScmTag are subclassses of ScmVersion [3]), then simply open a Jira issue and add your changes as patch. Patches are always highly welcome :) txs and LieGrue, strub [3] http://maven.apache.org/scm/apidocs/org/apache/maven/scm/ScmBranch.html --- Kathryn Huxtable kath...@kathrynhuxtable.org schrieb am Do, 1.4.2010: Von: Kathryn Huxtable kath...@kathrynhuxtable.org Betreff: Re: Problem with wagon-scm and gitexe An: Maven Users List users@maven.apache.org Datum: Donnerstag, 1. April, 2010 22:43 Uhr Thanks
Re: Problem with wagon-scm and gitexe
On Apr 2, 2010, at 1:59 PM, Kathryn Huxtable kath...@kathrynhuxtable.org wrote: I don't really think there's a conceptual misunderstanding on my part, since the format for the CVS URL in the SCM code allows for a module_name as part of the URL, and not in standard URL syntax. But I take your point. My basic question of the moment is, who calls putDirectory? Is it called from the release plugin? It seems to be getting called from the site plugin. This is a bit like asking who calls System.out.println; it's not really answerable. Wagon exposes an API and anyone is free to use it. I've written a few (closed source) plugins which use putDirectory and I suspect I'm not alone in this. AFAIK, the release plugin does not call putDirectory. The site:deploy mojo does. The wagon documentation leaves something to be desired for the unfamiliar developer. Yes, there are javadocs, but they don't tell you *how* the public methods and classes are used. I'm trying to figure that out without complaining too much, or looking at all the code that uses wagons. Doesn't matter *how* they're used. The only thing that matters is the contract of the API. If someone uses the Wagon API incorrectly, it sucks to be them, but it's not really your problem. If the API contract needs clarification, that's a seperate issue, but I seem to remember the Wagon API being relatively obvious. IMHO, you should be writing your own wagon implementation and avoid using wagon-scm. This use case is very specific to github. This way, you're free to define your own URL syntax. Justin -K On Apr 2, 2010, at 12:43 PM, Mark Struberg wrote: Kathryn, I think there is a conceptional misunderstanding here. Subversion is actually almost the ONLY SCM which has different URLs on different branches. Usually the version gets set via the -DscmVersion parameter which transfers into the ScmVersion parameter in various functions of the maven-scm-api! Your attempt with first determining/setting the branch with native git commands would actually work with git, but I'd prefer to give wagon-scm the branch as parameter and use that inside the code. txs and LieGrue, strub --- Kathryn Huxtable kath...@kathrynhuxtable.org schrieb am Fr, 2.4.2010: Von: Kathryn Huxtable kath...@kathrynhuxtable.org Betreff: Re: Problem with wagon-scm and gitexe An: Maven Users List users@maven.apache.org Datum: Freitag, 2. April, 2010 18:56 Uhr Here's an alternative script: mkdir ${checkoutDirectory} cd ${checkoutDirectory} git init git remote add -t ${siteBranch} origin ${gitRepoUrl} git fetch git checkout ${siteBranch} replace the contents of the checkout directory, except for the .git subdirectory, with the site docs git add . git commit -a -m Deploy site documentation git push rm -Rf ${checkoutDirectory} -K On Apr 2, 2010, at 11:28 AM, Kathryn Huxtable wrote: So looking at the git SCM code (git-commons and gitexe) and at the wagon-scm code, the problem I see is that there is no syntax in the git SCM url to specify a branch to which to deploy the site. Not a surprise, since git generally wants to clone an entire repository and then push and pull things. The desired process would be something along the lines of the following. (In UN*X-y/scripty/Velocity-y format.) mkdir ${checkoutDirectory} cd ${checkoutDirectory} git init git remote add origin ${gitRepoUrl} git pull origin refs/heads/${siteBranch} replace the contents of the checkout directory, except for the .git subdirectory, with the site docs git add . git commit -a -m Deploy site documentation. git push origin master:${siteBranch} rm -Rf ${checkoutDirectory} This works. Obviously, we wouldn't want to mess up the git SCM for other uses. Does the release plugin use the wagon? I *really* don't want to end up looking at all the Maven source code. Any ideas on where changes need to be made? In wagon-scm? In gitexe or git-commons? I see no way to configure wagons, which I find a bit of a lack. I suppose the URL structure and username/password info in settings.xml is supposed to take care of everything. Should there be a branch element in the git scm url structure a la the module element in CVS scm urls? -K On Apr 1, 2010, at 4:24 PM, Kathryn Huxtable wrote: Yeah, that's more or less what I mean. -K On Apr 1, 2010, at 4:09 PM, Mark Struberg wrote: I honestly doubt that wagon-scm + CVS currently works when using branches (from glimpsing at the sources). And I'm not sure what you mean with forking it. Wouldn't it be much easier to simply checkout wagon-scm and if you found a way to provide the branch as ScmVersion (ScmBranch and ScmTag are subclassses of ScmVersion [3]), then simply open a Jira issue and add your changes as patch. Patches are always highly welcome :) txs and LieGrue, strub [3] http://maven.apache.org/scm/apidocs/org/apache/maven/scm/ScmBranch.html --- Kathryn Huxtable kath
Re: Problem with wagon-scm and gitexe
On Apr 2, 2010, at 2:03 PM, Justin Edelson wrote: On Apr 2, 2010, at 1:59 PM, Kathryn Huxtable kath...@kathrynhuxtable.org wrote: I don't really think there's a conceptual misunderstanding on my part, since the format for the CVS URL in the SCM code allows for a module_name as part of the URL, and not in standard URL syntax. But I take your point. My basic question of the moment is, who calls putDirectory? Is it called from the release plugin? It seems to be getting called from the site plugin. This is a bit like asking who calls System.out.println; it's not really answerable. Wagon exposes an API and anyone is free to use it. I've written a few (closed source) plugins which use putDirectory and I suspect I'm not alone in this. Well, yeah, but I was trying to get at the expectations. The wagon-scm thing adds the target to the end of the repo, which, as has been pointed out, only works for subversion. *I'm* not the one doing it! AFAIK, the release plugin does not call putDirectory. The site:deploy mojo does. That was my guess. The wagon documentation leaves something to be desired for the unfamiliar developer. Yes, there are javadocs, but they don't tell you *how* the public methods and classes are used. I'm trying to figure that out without complaining too much, or looking at all the code that uses wagons. Doesn't matter *how* they're used. The only thing that matters is the contract of the API. If someone uses the Wagon API incorrectly, it sucks to be them, but it's not really your problem. If the API contract needs clarification, that's a seperate issue, but I seem to remember the Wagon API being relatively obvious. I think it needs a bit of clarification. IMHO, you should be writing your own wagon implementation and avoid using wagon-scm. This use case is very specific to github. This way, you're free to define your own URL syntax. Well, that's what I was thinking about doing. It looks to me as if the wagon-scm is in pretty early stages and really only works with svn. I'm still boggled that wagons don't seem to be configurable. I'll take a closer look at the API javadocs. Again, I think there should be more site docs for wagons. Thanks very much for your response, -K - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Problem with wagon-scm and gitexe
On Apr 2, 2010, at 2:22 PM, Kathryn Huxtable wrote: On Apr 2, 2010, at 2:03 PM, Justin Edelson wrote: IMHO, you should be writing your own wagon implementation and avoid using wagon-scm. This use case is very specific to github. This way, you're free to define your own URL syntax. Well, that's what I was thinking about doing. It looks to me as if the wagon-scm is in pretty early stages and really only works with svn. I'm still boggled that wagons don't seem to be configurable. Okay, I see that wagons are configurable in the settings.xml file. Bleah. I've taken a chainsaw and hacked away at wagon-scm and have something that works to deploy to GitHub. I'll clean it up a bit and deploy it. Others who use GitHub may find it useful. Of course, I gather that things are changing quite a bit with Maven 3.0, but I haven't looked at it yet. -K - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Problem with wagon-scm and gitexe
Kathryn- I'm very curious to see your code. Please do let me know when it's posted somewhere (presumably github). Justin On Apr 2, 2010, at 7:08 PM, Kathryn Huxtable kath...@kathrynhuxtable.org wrote: On Apr 2, 2010, at 2:22 PM, Kathryn Huxtable wrote: On Apr 2, 2010, at 2:03 PM, Justin Edelson wrote: IMHO, you should be writing your own wagon implementation and avoid using wagon-scm. This use case is very specific to github. This way, you're free to define your own URL syntax. Well, that's what I was thinking about doing. It looks to me as if the wagon-scm is in pretty early stages and really only works with svn. I'm still boggled that wagons don't seem to be configurable. Okay, I see that wagons are configurable in the settings.xml file. Bleah. I've taken a chainsaw and hacked away at wagon-scm and have something that works to deploy to GitHub. I'll clean it up a bit and deploy it. Others who use GitHub may find it useful. Of course, I gather that things are changing quite a bit with Maven 3.0, but I haven't looked at it yet. -K - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Problem with wagon-scm and gitexe
I've deployed it to the URL below but it sucks. Seriously, I hacked it with a chainsaw. http://github.com/khuxtable/wagon-gitsite Actually, there are just a few changes necessary to the wagon-scm necessary to get it to work with git and site:deploy 1) Don't append the target directory to the repository. 2) Allow specification of the branch or revision information. The former is a one-line change and would be necessary, I think, for it to work with CVS anyway. The latter is pretty simple and would require configuring the scmRevision and scmRevisionType parameters in the settings.xml file, since parameters on the command line or the site plugin don't seem to propagate into the wagon. I'll submit patches for that, but in the spirit of Larry Wall (there's more than one way to do it) I'll go ahead and work on this and spiff it up. -K On Apr 2, 2010, at 7:13 PM, Justin Edelson wrote: Kathryn- I'm very curious to see your code. Please do let me know when it's posted somewhere (presumably github). Justin On Apr 2, 2010, at 7:08 PM, Kathryn Huxtable kath...@kathrynhuxtable.org wrote: On Apr 2, 2010, at 2:22 PM, Kathryn Huxtable wrote: On Apr 2, 2010, at 2:03 PM, Justin Edelson wrote: IMHO, you should be writing your own wagon implementation and avoid using wagon-scm. This use case is very specific to github. This way, you're free to define your own URL syntax. Well, that's what I was thinking about doing. It looks to me as if the wagon-scm is in pretty early stages and really only works with svn. I'm still boggled that wagons don't seem to be configurable. Okay, I see that wagons are configurable in the settings.xml file. Bleah. I've taken a chainsaw and hacked away at wagon-scm and have something that works to deploy to GitHub. I'll clean it up a bit and deploy it. Others who use GitHub may find it useful. Of course, I gather that things are changing quite a bit with Maven 3.0, but I haven't looked at it yet. -K - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Problem with wagon-scm and gitexe
Since it seems to be my practice to have second thought after sending a message, I'll add that I can check out the gh-pages branch of my git repository into a separate directory and deploy there using a file: URL and then commit that and push it. That works. I just think it should be able to be automated. -K On Apr 1, 2010, at 12:14 PM, Kathryn Huxtable wrote: I know the docs say that wagon-scm has only been tested with CVS and Subversion, and I've run it with Subversion successfully. Is anyone working on getting it to work with Git, or does it already? I created a very simply project with a README and a pom.xml and nothing else. It's at http://github.com/khuxtable/test-project It uses versions 1.3 of the gitexe and scm-manager-plexus extensions and version 1.0-beta-6 of the scm wagon. What I would like to do is deploy my site docs (all generated by the site plugin) to the gh-pages branch of the git repository. I don't see any way in the Git SCM URL structure to specify a branch. If there was a way to do this it would be cool. But at the moment, with the URL scm:git:ssh://g...@github.com/khuxtable/test-project.git I get the following: [INFO] [site:deploy {execution: default-cli}] scm:git:ssh://github.com/khuxtable/test-project.git - Session: Opened Uploading: . to scm:git:ssh://github.com/khuxtable/test-project.git [INFO] Executing: /bin/sh -c cd /Users/huxtable/Documents/workspace/test-project/. git ls-files [INFO] Working directory: /Users/huxtable/Documents/workspace/test-project/. [INFO] Executing: /bin/sh -c cd /var/folders/M+/M+95phY6GfOYTLYCJKW4Bk+++TI/-Tmp- git clone ssh://g...@github.com/khuxtable/test-project.git/. /var/folders/M+/M+95phY6GfOYTLYCJKW4Bk+++TI/-Tmp-/wagon-scm223596417.checkout [INFO] Working directory: /var/folders/M+/M+95phY6GfOYTLYCJKW4Bk+++TI/-Tmp- Transfer error: org.apache.maven.scm.ScmException: Unable to commit file. The git-clone command failed. ERROR: Repository not found. Make sure you include the .git, e.g. g...@github.com:defunkt/ambition.git fatal: The remote end hung up unexpectedly scm:git:ssh://github.com/khuxtable/test-project.git - Session: Disconnecting scm:git:ssh://github.com/khuxtable/test-project.git - Session: Disconnected I particularly like the /. after the repository name. Funny. The maven release plugin behaves fine with the same developerConnection as my site URL above. Any ideas? I'm happy to help out with making this work, though I'm not a committer at this point. -K - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Problem with wagon-scm and gitexe
Kathryn, I haven't used wagon-scm, so I can only make vague assumptions. Basically all the branches and tag stuff should be working in maven-scm-provider-gitexe. But I'm not sure how wagon-scm tells us what branch it likes to use. From looking at the source [1] I only can see that all ScmVersion parameters are always given as null. So I'm not sure if that could work at all. Please keep in mind that SVN is really exceptional with handling branches by copying the trunk to a new location. This way you get an own URL which you won't get in most other SCMs like CVS, PVCS, git or hg. In fact SVN doesn't have a 'real' branch and tag concept but internally always performs a full shallow copy. So it would be interesting if this would also work e.g. with CVS. LieGrue, strub [1] http://svn.apache.org/viewvc/maven/wagon/trunk/wagon-providers/wagon-scm/src/main/java/org/apache/maven/wagon/providers/scm/ScmWagon.java?view=markup --- Kathryn Huxtable kath...@kathrynhuxtable.org schrieb am Do, 1.4.2010: Von: Kathryn Huxtable kath...@kathrynhuxtable.org Betreff: Re: Problem with wagon-scm and gitexe An: Maven Users List users@maven.apache.org Datum: Donnerstag, 1. April, 2010 19:21 Uhr Since it seems to be my practice to have second thought after sending a message, I'll add that I can check out the gh-pages branch of my git repository into a separate directory and deploy there using a file: URL and then commit that and push it. That works. I just think it should be able to be automated. -K On Apr 1, 2010, at 12:14 PM, Kathryn Huxtable wrote: I know the docs say that wagon-scm has only been tested with CVS and Subversion, and I've run it with Subversion successfully. Is anyone working on getting it to work with Git, or does it already? I created a very simply project with a README and a pom.xml and nothing else. It's at http://github.com/khuxtable/test-project It uses versions 1.3 of the gitexe and scm-manager-plexus extensions and version 1.0-beta-6 of the scm wagon. What I would like to do is deploy my site docs (all generated by the site plugin) to the gh-pages branch of the git repository. I don't see any way in the Git SCM URL structure to specify a branch. If there was a way to do this it would be cool. But at the moment, with the URL scm:git:ssh://g...@github.com/khuxtable/test-project.git I get the following: [INFO] [site:deploy {execution: default-cli}] scm:git:ssh://github.com/khuxtable/test-project.git - Session: Opened Uploading: . to scm:git:ssh://github.com/khuxtable/test-project.git [INFO] Executing: /bin/sh -c cd /Users/huxtable/Documents/workspace/test-project/. git ls-files [INFO] Working directory: /Users/huxtable/Documents/workspace/test-project/. [INFO] Executing: /bin/sh -c cd /var/folders/M+/M+95phY6GfOYTLYCJKW4Bk+++TI/-Tmp- git clone ssh://g...@github.com/khuxtable/test-project.git/. /var/folders/M+/M+95phY6GfOYTLYCJKW4Bk+++TI/-Tmp-/wagon-scm223596417.checkout [INFO] Working directory: /var/folders/M+/M+95phY6GfOYTLYCJKW4Bk+++TI/-Tmp- Transfer error: org.apache.maven.scm.ScmException: Unable to commit file. The git-clone command failed. ERROR: Repository not found. Make sure you include the .git, e.g. g...@github.com:defunkt/ambition.git fatal: The remote end hung up unexpectedly scm:git:ssh://github.com/khuxtable/test-project.git - Session: Disconnecting scm:git:ssh://github.com/khuxtable/test-project.git - Session: Disconnected I particularly like the /. after the repository name. Funny. The maven release plugin behaves fine with the same developerConnection as my site URL above. Any ideas? I'm happy to help out with making this work, though I'm not a committer at this point. -K - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org __ Do You Yahoo!? Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen Massenmails. http://mail.yahoo.com - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Problem with wagon-scm and gitexe
Thanks, Mark, These are good points. I'm thinking that the issues are in wagon-scm, which is listed as being in progress, so I can't really expect perfection. And they *do* say it's only been tested with svn and cvs. I'm thinking that I may be modding wagon-svn, more to see what's going on than to fork a project. All of this is by the way. I really should be working on my project, not fiddling with tools, but fiddling with tools is fun sometimes. -K On Apr 1, 2010, at 3:37 PM, Mark Struberg wrote: Kathryn, I haven't used wagon-scm, so I can only make vague assumptions. Basically all the branches and tag stuff should be working in maven-scm-provider-gitexe. But I'm not sure how wagon-scm tells us what branch it likes to use. From looking at the source [1] I only can see that all ScmVersion parameters are always given as null. So I'm not sure if that could work at all. Please keep in mind that SVN is really exceptional with handling branches by copying the trunk to a new location. This way you get an own URL which you won't get in most other SCMs like CVS, PVCS, git or hg. In fact SVN doesn't have a 'real' branch and tag concept but internally always performs a full shallow copy. So it would be interesting if this would also work e.g. with CVS. LieGrue, strub [1] http://svn.apache.org/viewvc/maven/wagon/trunk/wagon-providers/wagon-scm/src/main/java/org/apache/maven/wagon/providers/scm/ScmWagon.java?view=markup --- Kathryn Huxtable kath...@kathrynhuxtable.org schrieb am Do, 1.4.2010: Von: Kathryn Huxtable kath...@kathrynhuxtable.org Betreff: Re: Problem with wagon-scm and gitexe An: Maven Users List users@maven.apache.org Datum: Donnerstag, 1. April, 2010 19:21 Uhr Since it seems to be my practice to have second thought after sending a message, I'll add that I can check out the gh-pages branch of my git repository into a separate directory and deploy there using a file: URL and then commit that and push it. That works. I just think it should be able to be automated. -K On Apr 1, 2010, at 12:14 PM, Kathryn Huxtable wrote: I know the docs say that wagon-scm has only been tested with CVS and Subversion, and I've run it with Subversion successfully. Is anyone working on getting it to work with Git, or does it already? I created a very simply project with a README and a pom.xml and nothing else. It's at http://github.com/khuxtable/test-project It uses versions 1.3 of the gitexe and scm-manager-plexus extensions and version 1.0-beta-6 of the scm wagon. What I would like to do is deploy my site docs (all generated by the site plugin) to the gh-pages branch of the git repository. I don't see any way in the Git SCM URL structure to specify a branch. If there was a way to do this it would be cool. But at the moment, with the URL scm:git:ssh://g...@github.com/khuxtable/test-project.git I get the following: [INFO] [site:deploy {execution: default-cli}] scm:git:ssh://github.com/khuxtable/test-project.git - Session: Opened Uploading: . to scm:git:ssh://github.com/khuxtable/test-project.git [INFO] Executing: /bin/sh -c cd /Users/huxtable/Documents/workspace/test-project/. git ls-files [INFO] Working directory: /Users/huxtable/Documents/workspace/test-project/. [INFO] Executing: /bin/sh -c cd /var/folders/M+/M+95phY6GfOYTLYCJKW4Bk+++TI/-Tmp- git clone ssh://g...@github.com/khuxtable/test-project.git/. /var/folders/M+/M+95phY6GfOYTLYCJKW4Bk+++TI/-Tmp-/wagon-scm223596417.checkout [INFO] Working directory: /var/folders/M+/M+95phY6GfOYTLYCJKW4Bk+++TI/-Tmp- Transfer error: org.apache.maven.scm.ScmException: Unable to commit file. The git-clone command failed. ERROR: Repository not found. Make sure you include the .git, e.g. g...@github.com:defunkt/ambition.git fatal: The remote end hung up unexpectedly scm:git:ssh://github.com/khuxtable/test-project.git - Session: Disconnecting scm:git:ssh://github.com/khuxtable/test-project.git - Session: Disconnected I particularly like the /. after the repository name. Funny. The maven release plugin behaves fine with the same developerConnection as my site URL above. Any ideas? I'm happy to help out with making this work, though I'm not a committer at this point. -K - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org __ Do You Yahoo!? Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen Massenmails. http://mail.yahoo.com - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: Problem with wagon-scm and gitexe
I honestly doubt that wagon-scm + CVS currently works when using branches (from glimpsing at the sources). And I'm not sure what you mean with forking it. Wouldn't it be much easier to simply checkout wagon-scm and if you found a way to provide the branch as ScmVersion (ScmBranch and ScmTag are subclassses of ScmVersion [3]), then simply open a Jira issue and add your changes as patch. Patches are always highly welcome :) txs and LieGrue, strub [3] http://maven.apache.org/scm/apidocs/org/apache/maven/scm/ScmBranch.html --- Kathryn Huxtable kath...@kathrynhuxtable.org schrieb am Do, 1.4.2010: Von: Kathryn Huxtable kath...@kathrynhuxtable.org Betreff: Re: Problem with wagon-scm and gitexe An: Maven Users List users@maven.apache.org Datum: Donnerstag, 1. April, 2010 22:43 Uhr Thanks, Mark, These are good points. I'm thinking that the issues are in wagon-scm, which is listed as being in progress, so I can't really expect perfection. And they *do* say it's only been tested with svn and cvs. I'm thinking that I may be modding wagon-svn, more to see what's going on than to fork a project. All of this is by the way. I really should be working on my project, not fiddling with tools, but fiddling with tools is fun sometimes. -K On Apr 1, 2010, at 3:37 PM, Mark Struberg wrote: Kathryn, I haven't used wagon-scm, so I can only make vague assumptions. Basically all the branches and tag stuff should be working in maven-scm-provider-gitexe. But I'm not sure how wagon-scm tells us what branch it likes to use. From looking at the source [1] I only can see that all ScmVersion parameters are always given as null. So I'm not sure if that could work at all. Please keep in mind that SVN is really exceptional with handling branches by copying the trunk to a new location. This way you get an own URL which you won't get in most other SCMs like CVS, PVCS, git or hg. In fact SVN doesn't have a 'real' branch and tag concept but internally always performs a full shallow copy. So it would be interesting if this would also work e.g. with CVS. LieGrue, strub [1] http://svn.apache.org/viewvc/maven/wagon/trunk/wagon-providers/wagon-scm/src/main/java/org/apache/maven/wagon/providers/scm/ScmWagon.java?view=markup --- Kathryn Huxtable kath...@kathrynhuxtable.org schrieb am Do, 1.4.2010: Von: Kathryn Huxtable kath...@kathrynhuxtable.org Betreff: Re: Problem with wagon-scm and gitexe An: Maven Users List users@maven.apache.org Datum: Donnerstag, 1. April, 2010 19:21 Uhr Since it seems to be my practice to have second thought after sending a message, I'll add that I can check out the gh-pages branch of my git repository into a separate directory and deploy there using a file: URL and then commit that and push it. That works. I just think it should be able to be automated. -K On Apr 1, 2010, at 12:14 PM, Kathryn Huxtable wrote: I know the docs say that wagon-scm has only been tested with CVS and Subversion, and I've run it with Subversion successfully. Is anyone working on getting it to work with Git, or does it already? I created a very simply project with a README and a pom.xml and nothing else. It's at http://github.com/khuxtable/test-project It uses versions 1.3 of the gitexe and scm-manager-plexus extensions and version 1.0-beta-6 of the scm wagon. What I would like to do is deploy my site docs (all generated by the site plugin) to the gh-pages branch of the git repository. I don't see any way in the Git SCM URL structure to specify a branch. If there was a way to do this it would be cool. But at the moment, with the URL scm:git:ssh://g...@github.com/khuxtable/test-project.git I get the following: [INFO] [site:deploy {execution: default-cli}] scm:git:ssh://github.com/khuxtable/test-project.git - Session: Opened Uploading: . to scm:git:ssh://github.com/khuxtable/test-project.git [INFO] Executing: /bin/sh -c cd /Users/huxtable/Documents/workspace/test-project/. git ls-files [INFO] Working directory: /Users/huxtable/Documents/workspace/test-project/. [INFO] Executing: /bin/sh -c cd /var/folders/M+/M+95phY6GfOYTLYCJKW4Bk+++TI/-Tmp- git clone ssh://g...@github.com/khuxtable/test-project.git/. /var/folders/M+/M+95phY6GfOYTLYCJKW4Bk+++TI/-Tmp-/wagon-scm223596417.checkout [INFO] Working directory: /var/folders/M+/M+95phY6GfOYTLYCJKW4Bk+++TI/-Tmp- Transfer error: org.apache.maven.scm.ScmException: Unable to commit file. The git-clone command failed. ERROR: Repository not found. Make sure you include the .git, e.g. g...@github.com:defunkt/ambition.git fatal: The remote end hung up unexpectedly scm:git:ssh://github.com/khuxtable/test-project.git - Session: Disconnecting scm:git:ssh://github.com/khuxtable/test-project.git - Session: Disconnected I
Re: Problem with wagon-scm and gitexe
Yeah, that's more or less what I mean. -K On Apr 1, 2010, at 4:09 PM, Mark Struberg wrote: I honestly doubt that wagon-scm + CVS currently works when using branches (from glimpsing at the sources). And I'm not sure what you mean with forking it. Wouldn't it be much easier to simply checkout wagon-scm and if you found a way to provide the branch as ScmVersion (ScmBranch and ScmTag are subclassses of ScmVersion [3]), then simply open a Jira issue and add your changes as patch. Patches are always highly welcome :) txs and LieGrue, strub [3] http://maven.apache.org/scm/apidocs/org/apache/maven/scm/ScmBranch.html --- Kathryn Huxtable kath...@kathrynhuxtable.org schrieb am Do, 1.4.2010: Von: Kathryn Huxtable kath...@kathrynhuxtable.org Betreff: Re: Problem with wagon-scm and gitexe An: Maven Users List users@maven.apache.org Datum: Donnerstag, 1. April, 2010 22:43 Uhr Thanks, Mark, These are good points. I'm thinking that the issues are in wagon-scm, which is listed as being in progress, so I can't really expect perfection. And they *do* say it's only been tested with svn and cvs. I'm thinking that I may be modding wagon-svn, more to see what's going on than to fork a project. All of this is by the way. I really should be working on my project, not fiddling with tools, but fiddling with tools is fun sometimes. -K On Apr 1, 2010, at 3:37 PM, Mark Struberg wrote: Kathryn, I haven't used wagon-scm, so I can only make vague assumptions. Basically all the branches and tag stuff should be working in maven-scm-provider-gitexe. But I'm not sure how wagon-scm tells us what branch it likes to use. From looking at the source [1] I only can see that all ScmVersion parameters are always given as null. So I'm not sure if that could work at all. Please keep in mind that SVN is really exceptional with handling branches by copying the trunk to a new location. This way you get an own URL which you won't get in most other SCMs like CVS, PVCS, git or hg. In fact SVN doesn't have a 'real' branch and tag concept but internally always performs a full shallow copy. So it would be interesting if this would also work e.g. with CVS. LieGrue, strub [1] http://svn.apache.org/viewvc/maven/wagon/trunk/wagon-providers/wagon-scm/src/main/java/org/apache/maven/wagon/providers/scm/ScmWagon.java?view=markup --- Kathryn Huxtable kath...@kathrynhuxtable.org schrieb am Do, 1.4.2010: Von: Kathryn Huxtable kath...@kathrynhuxtable.org Betreff: Re: Problem with wagon-scm and gitexe An: Maven Users List users@maven.apache.org Datum: Donnerstag, 1. April, 2010 19:21 Uhr Since it seems to be my practice to have second thought after sending a message, I'll add that I can check out the gh-pages branch of my git repository into a separate directory and deploy there using a file: URL and then commit that and push it. That works. I just think it should be able to be automated. -K On Apr 1, 2010, at 12:14 PM, Kathryn Huxtable wrote: I know the docs say that wagon-scm has only been tested with CVS and Subversion, and I've run it with Subversion successfully. Is anyone working on getting it to work with Git, or does it already? I created a very simply project with a README and a pom.xml and nothing else. It's at http://github.com/khuxtable/test-project It uses versions 1.3 of the gitexe and scm-manager-plexus extensions and version 1.0-beta-6 of the scm wagon. What I would like to do is deploy my site docs (all generated by the site plugin) to the gh-pages branch of the git repository. I don't see any way in the Git SCM URL structure to specify a branch. If there was a way to do this it would be cool. But at the moment, with the URL scm:git:ssh://g...@github.com/khuxtable/test-project.git I get the following: [INFO] [site:deploy {execution: default-cli}] scm:git:ssh://github.com/khuxtable/test-project.git - Session: Opened Uploading: . to scm:git:ssh://github.com/khuxtable/test-project.git [INFO] Executing: /bin/sh -c cd /Users/huxtable/Documents/workspace/test-project/. git ls-files [INFO] Working directory: /Users/huxtable/Documents/workspace/test-project/. [INFO] Executing: /bin/sh -c cd /var/folders/M+/M+95phY6GfOYTLYCJKW4Bk+++TI/-Tmp- git clone ssh://g...@github.com/khuxtable/test-project.git/. /var/folders/M+/M+95phY6GfOYTLYCJKW4Bk+++TI/-Tmp-/wagon-scm223596417.checkout [INFO] Working directory: /var/folders/M+/M+95phY6GfOYTLYCJKW4Bk+++TI/-Tmp- Transfer error: org.apache.maven.scm.ScmException: Unable to commit file. The git-clone command failed. ERROR: Repository not found. Make sure you include the .git, e.g. g...@github.com:defunkt/ambition.git fatal: The remote end hung up unexpectedly scm:git:ssh://github.com/khuxtable/test-project.git - Session: Disconnecting scm:git:ssh://github.com/khuxtable/test-project.git - Session