Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Considering the source of <a href="http://repo.or.cz/w/git/mingw.git/blame/5d74b7d56b82f42e3536b515400d03b0de21dec0:/builtin-push.c" rel="noreferrer"><code>git builtin-push.c</code></a>, that means that somehow, no remote are defined for the local Git repo used by the maven script.</p> <pre><code> 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."); } </code></pre> <p>As illustrated by this <a href="http://blogs.mikeci.com/2010/01/26/working-with-custom-maven-archetypes-part-2/" rel="noreferrer">blog post</a>, the maven config is not the all story.</p> <pre><code>~/foo/mikeci-archetype-springmvc-webapp$ git remote add origin git@github.com:amleggett/mikeci-archetype-springmvc-webapp.git </code></pre> <p>A <code>remote add</code> is still required, before specifying the maven scm parameters:</p> <blockquote> <p><strong>Updating the POM</strong></p> <p>For Maven to function effectively, you should always ensure that you include project VCS information in your POM file.<br> Now that we’ve added the archetype to a Git repository we can include the appropriate <code>&lt;scm&gt;</code> configuration:</p> </blockquote> <pre><code> &lt;scm&gt; &lt;connection&gt; scm:git:ssh://github.com/amleggett/${artifactId}.git &lt;/connection&gt; &lt;developerConnection&gt; scm:git:ssh://git@github.com/amleggett/${artifactId}.git &lt;/developerConnection&gt; &lt;url&gt; http://github.com/amleggett/${artifactId} &lt;/url&gt; &lt;/scm&gt; </code></pre> <p>The same blog post adds:</p> <blockquote> <p>It’s important to understand the meaning of each of the child elements of <code>&lt;scm&gt;</code>. </p> <ul> <li>The <code>&lt;connection&gt;</code> element defines a read-only url and</li> <li>the <code>&lt;developerConnection&gt;</code> element a read+write url. </li> </ul> <p>For both of these elements the url must adhere to the following convention:</p> </blockquote> <pre><code> scm:&lt;scm implementation&gt;:&lt;scm implementation-specific path&gt; </code></pre> <blockquote> <ul> <li>Finally, the <code>&lt;url&gt;</code> 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.</li> </ul> <p>One handy tip is that you can verify this configuration by using the <strong><code>maven-scm-plugin</code></strong>.<br> 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:</p> </blockquote> <pre><code>~/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 </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload