You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Bernhard Friedreich <fr...@gmail.com> on 2013/03/22 09:30:26 UTC

mvn release using local git repository

Hi!

I'm having a problem with releasing one of our projects (multimodule).
We've got the following structure:

"github": repository (no commit access)
"fork on github": forked repository (commit access)
"local server": git clone (bare) of "fork on github"
local development machine: git clone of the repo on "local server"

(Reason for this approach is that the whole team is using the same
development version)

As we want to be able to push changes from our local server back to github
(through a pull request) we can not change the settings of the pom (the
project on github uses different developerconnections, scmconnections, ...).

Although we must be able to create new releases of our clone.

I theory this should work with something like this if I understood the docs
correctly:
mvn release:prepare
-Dproject.scm.developerConnection=scm:git:git@localserver:/home/git/repositories/ourproject
-Dproject.scm.connection=scm:git:git@localserver
:/home/git/repositories/ourproject

This doesn't change the pom.xml though and doesn't seem to work as at the
end it tries to push to github. I would guess that the pom.xml should be
modified to the provided arguments in the created tag - but they are not.

Please help.. Thanks :)

Best regards,
Bernhard Friedreich

Re: mvn release using local git repository

Posted by Robert Scholte <rf...@apache.org>.
Hi,

> mvn release:prepare
> -Dproject.scm.developerConnection=scm:git:git@localserver:/home/git/repositories/ourproject
> -Dproject.scm.connection=scm:git:git@localserver
> :/home/git/repositories/ourproject

Is this exactly how you execute it? You can't fill pom.xml entries like  
this.
If you need something like this, you should try:
<project>
   <scm>
     <developerConnection>${alternativeDeveloperConnection}</developerConnection>
   </scm>
</project>

and run mvn release:prepare  
-DalternativeDeveloperConnection=scm:git:git@localserver:/home/git/repositories/ourproject

There's no need to specify both connections: if both are specified the  
developerConnection is used.

Robert


Op Fri, 22 Mar 2013 09:30:26 +0100 schreef Bernhard Friedreich  
<fr...@gmail.com>:

> Hi!
>
> I'm having a problem with releasing one of our projects (multimodule).
> We've got the following structure:
>
> "github": repository (no commit access)
> "fork on github": forked repository (commit access)
> "local server": git clone (bare) of "fork on github"
> local development machine: git clone of the repo on "local server"
>
> (Reason for this approach is that the whole team is using the same
> development version)
>
> As we want to be able to push changes from our local server back to  
> github
> (through a pull request) we can not change the settings of the pom (the
> project on github uses different developerconnections, scmconnections,  
> ...).
>
> Although we must be able to create new releases of our clone.
>
> I theory this should work with something like this if I understood the  
> docs
> correctly:
> mvn release:prepare
> -Dproject.scm.developerConnection=scm:git:git@localserver:/home/git/repositories/ourproject
> -Dproject.scm.connection=scm:git:git@localserver
> :/home/git/repositories/ourproject
>
> This doesn't change the pom.xml though and doesn't seem to work as at the
> end it tries to push to github. I would guess that the pom.xml should be
> modified to the provided arguments in the created tag - but they are not.
>
> Please help.. Thanks :)
>
> Best regards,
> Bernhard Friedreich

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org