title: How can I tell wagon-maven-plugin to use a username and password from my settings.xml?
body: <p>I'm generating the (non javadoc) documentation of a rest api using a plugin named <a href="http://enunciate.codehaus.org/executables.html#maven" rel="noreferrer">maven-enunciate-plugin</a>.  Now I want to upload it to my javadoc repository.  I'm using the <a href="http://mojo.codehaus.org/wagon-maven-plugin/upload-mojo.html" rel="noreferrer">wagon-maven-plugin</a> for this.</p>
  
  <p>The problem is, I can't figure out how to tell the wagon plugin to use the username/password in the settings.xml for this site.  If you use the <a href="http://maven.apache.org/plugins/maven-site-plugin/" rel="noreferrer">maven-site-plugin</a>, it seems to know how to do this by defining a <code>distributionManagement</code> tag, but I'm not using a maven-site-plugin plugin because I'm generating the documentation without it.  </p>
  
  <p>Here's my pom to show what I've tried:</p>
  
  <pre><code>&lt;profile&gt;
      &lt;id&gt;generate-rest-doc&lt;/id&gt;
      &lt;build&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.codehaus.enunciate&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-enunciate-plugin&lt;/artifactId&gt;                
                  &lt;version&gt;1.27&lt;/version&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;docs&lt;/goal&gt;
                          &lt;/goals&gt;
                          &lt;configuration&gt;
                              &lt;docsDir&gt;${project.build.directory}/docs&lt;/docsDir&gt;
                          &lt;/configuration&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
                  &lt;artifactId&gt;wagon-maven-plugin&lt;/artifactId&gt;
                  &lt;version&gt;1.0-beta-4&lt;/version&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;id&gt;upload-javadoc&lt;/id&gt;
                          &lt;phase&gt;package&lt;/phase&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;upload&lt;/goal&gt;
                          &lt;/goals&gt;
                          &lt;configuration&gt;
                              &lt;fromDir&gt;${project.build.directory}/docs&lt;/fromDir&gt;
                              &lt;includes&gt;*&lt;/includes&gt;
                              &lt;url&gt;scp://MY-REPO/var/www/html/projects/rest-war&lt;/url&gt;
                          &lt;/configuration&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
      &lt;distributionManagement&gt;
          &lt;site&gt;
              &lt;id&gt;javadoc&lt;/id&gt;
              &lt;url&gt;scp://MY-REPO/var/www/html/projects/-rest-war&lt;/url&gt;
          &lt;/site&gt;
      &lt;/distributionManagement&gt;
  &lt;/profile&gt;
  ....
      &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;1.0-beta-6&lt;/version&gt;
          &lt;/extension&gt;
      &lt;/extensions&gt;
  &lt;/build&gt;
  </code></pre>