title: How to deploy multiproject with Maven?
body: <p>I would like deploy several java project with a parent pom. My tree is : </p>
  
  <pre><code>pom.xml
   └── /project 1
        └── pom.xml
   └── /project 2
         └── pom.xml
  </code></pre>
  
  <p>For not duplicate code, I would like write in the parent pom to deploy my apps :</p>
  
  <pre><code>    &lt;distributionManagement&gt;
        &lt;repository&gt;
          &lt;id&gt;myName&lt;/id&gt;
          &lt;url&gt;scp://myURL&lt;/url&gt;
        &lt;/repository&gt;
     &lt;/distributionManagement&gt;
  </code></pre>
  
  <p>and </p>
  
  <pre><code>        &lt;extensions&gt;
            &lt;extension&gt;
               &lt;groupId&gt;org.apache.maven.wagon&lt;/groupId&gt;
               &lt;artifactId&gt;wagon-ssh&lt;/artifactId&gt;
               &lt;version&gt;2.4&lt;/version&gt;
             &lt;/extension&gt;
          &lt;/extensions&gt;
  </code></pre>
  
  <p>When I use a command "mvn deploy" I have :</p>
  
  <pre><code>[INFO] ------------------------------------------------------------------------
  [ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.8.1:deploy (default-deploy) on project project1: Deployment failed: repository element was not specified in the POM inside distributionManagement element or in -DaltDeploymentRepository=id::layout::url parameter -&gt; [Help 1]
  [ERROR]
  [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
  [ERROR] Re-run Maven using the -X switch to enable full debug logging.
  [ERROR]
  [ERROR] For more information about the errors and possible solutions, please read the following articles:
  [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
  </code></pre>
  
  <p>Thanks in advance !</p>