When I do a release of my project, I want to share the source with a wider group of people than I normally do during development. The code is shared via a Git repository. To do this, I have used the following:
- remote public repository - released code is pushed here, every week or so (http://example.com/public)
- remote private repository - non-release code is pushed here, more than daily (http://example.com/private)
In my local git repository, I have the following remotes defined:
origin http://example.com/private
public http://example.com/public
I am currently trying to configure the maven-release-plugin to manage versioning of the builds, and to manage tagging and pushing of code to the public repository. In my pom.xml, I have listed the <scm/> as follows:
<scm><connection>scm:git:http://example.com/public</connection></scm>
(Removing this line will cause mvn release:prepare to fail)
However, when calling
mvn release:clean release:prepare release:perform
Maven calls
git push origin tagname
rather than pushing to the URL specified in the POM.
So the questions are:
- Best practice: Should I just be tagging and committing in my private repo (origin), and pushing to public manually?
- Can I make Maven push to the repository that I choose, rather than defaulting to origin? I felt this was implied by the requirement of the <connection/> element in <scm/>.