I\'m attempting to run the mvn release:prepare goal and it\'s hanging after the push. Any idea what I could be doing wrong?
[INFO] [INFO] -----
Considering the source of git builtin-push.c, that means that somehow, no remote are defined for the local Git repo used by the maven script.
static int do_push(const char *repo, int flags)
{
int i, errs;
struct remote *remote = remote_get(repo);
const char **url;
int url_nr;
if (!remote) {
if (repo)
die("bad repository '%s'", repo);
die("No destination configured to push to.");
}
As illustrated by this blog post, the maven config is not the all story.
~/foo/mikeci-archetype-springmvc-webapp$ git remote add origin git@github.com:amleggett/mikeci-archetype-springmvc-webapp.git
A remote add is still required, before specifying the maven scm parameters:
Updating the POM
For Maven to function effectively, you should always ensure that you include project VCS information in your POM file.
Now that we’ve added the archetype to a Git repository we can include the appropriateconfiguration:
scm:git:ssh://github.com/amleggett/${artifactId}.git
scm:git:ssh://git@github.com/amleggett/${artifactId}.git
http://github.com/amleggett/${artifactId}
The same blog post adds:
It’s important to understand the meaning of each of the child elements of
.
- The
element defines a read-only url and- the
element a read+write url.For both of these elements the url must adhere to the following convention:
scm::
- Finally, the
element content should point to a browsable location and for me this is the GitHub repository home page. Note that in all cases, I’m using an interpolated value which is my project artifactId.One handy tip is that you can verify this configuration by using the
maven-scm-plugin.
This plugin offers ‘vendor’ independent access to common VCS commands by offering a set of command mappings for the configured VCS. The validate goal should confirm all is well:
~/foo/mikeci-archetype-springmvc-webapp$ mvn scm:validate
[INFO] Preparing scm:validate
[INFO] No goals needed for project - skipping
[INFO] [scm:validate {execution: default-cli}]
[INFO] connectionUrl scm connection string is valid.
[INFO] project.scm.connection scm connection string is valid.
[INFO] project.scm.developerConnection scm connection string is valid.
[INFO] --------------------------------------------------------------
[INFO] BUILD SUCCESSFUL