title: Maven: repository element was not specified in the POM inside distributionManagement?
body: <p>I am trying to run the command, <code>mvn release:perform</code>, but I get this error:</p>
  
  <blockquote>
  <pre><code>Failed to execute goal
  org.apache.maven.plugins:maven-deploy-plugin:2.5:deploy
  (default-deploy) on project git-demo:
  Deployment failed: repository element
  was not specified in the POM inside
  distributionManagement element or in
  -DaltDeploymentRepository=id::layout::url
  parameter
  </code></pre>
  </blockquote>
  
  <p>Here's my <code>pom.xml</code> file:</p>
  
  <pre><code>&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;groupId&gt;com.sonatype.blog&lt;/groupId&gt;
      &lt;artifactId&gt;git-demo&lt;/artifactId&gt;
      &lt;packaging&gt;jar&lt;/packaging&gt;
      &lt;version&gt;1.1-SNAPSHOT&lt;/version&gt;
      &lt;name&gt;git-demo&lt;/name&gt;
      &lt;url&gt;http://maven.apache.org&lt;/url&gt;
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;junit&lt;/groupId&gt;
              &lt;artifactId&gt;junit&lt;/artifactId&gt;
              &lt;version&gt;3.8.1&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  
      &lt;scm&gt;
          &lt;connection&gt;scm:git:git@github.com:Christian-Achilli-KP/git-demo.git&lt;/connection&gt;
          &lt;url&gt;scm:git:git@github.com:Christian-Achilli-KP/git-demo.git&lt;/url&gt;
          &lt;developerConnection&gt;scm:git:git@github.com:Christian-Achilli-KP/git-demo.git&lt;/developerConnection&gt;
      &lt;/scm&gt;
  
      &lt;distributionManagement&gt;
          &lt;!-- use the following if you're not using a snapshot version. --&gt;
          &lt;repository&gt;
              &lt;id&gt;localSnap&lt;/id&gt;
              &lt;name&gt;RepositoryProxyRel&lt;/name&gt;
              &lt;url&gt;http://127.0.0.1:8080/nexus/content/repositories/releases/&lt;/url&gt;
          &lt;/repository&gt;
          &lt;!-- use the following if you ARE using a snapshot version. --&gt;
          &lt;snapshotRepository&gt;
              &lt;id&gt;MylocalSnap&lt;/id&gt;
              &lt;name&gt;RepositoryProxySnap&lt;/name&gt;
              &lt;url&gt;http://127.0.0.1:8080/nexus/content/repositories/snapshots/&lt;/url&gt;
          &lt;/snapshotRepository&gt;
      &lt;/distributionManagement&gt;
      &lt;build&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-release-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.1&lt;/version&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>Actually I can see the </p>
  
  <blockquote>
    <p>repository</p>
  </blockquote>
  
  <p>declaration inside the </p>
  
  <blockquote>
    <p>distributionManagent</p>
  </blockquote>
  
  <p>tag.</p>
  
  <p>Here's my <code>settings.xml</code>:</p>
  
  <pre><code>&lt;settings&gt;
      &lt;servers&gt;
          &lt;server&gt;
              &lt;id&gt;localSnap&lt;/id&gt;
              &lt;username&gt;deployment&lt;/username&gt;
              &lt;password&gt;****&lt;/password&gt;
          &lt;/server&gt;
  
          &lt;server&gt;
              &lt;id&gt;MylocalSnap&lt;/id&gt;
              &lt;username&gt;deployment&lt;/username&gt;
              &lt;password&gt;****&lt;/password&gt;
          &lt;/server&gt;
  
          &lt;server&gt;
              &lt;id&gt;myserver&lt;/id&gt;
              &lt;username&gt;tomcat&lt;/username&gt;
              &lt;password&gt;tomcat&lt;/password&gt;
          &lt;/server&gt;
      &lt;/servers&gt;
      &lt;mirrors&gt;
          &lt;mirror&gt;
              &lt;!--This sends everything else to /public --&gt;
              &lt;id&gt;nexus&lt;/id&gt;
              &lt;mirrorOf&gt;*&lt;/mirrorOf&gt;
              &lt;url&gt;http://127.0.0.1:8080/nexus/content/groups/public/&lt;/url&gt;
          &lt;/mirror&gt;
      &lt;/mirrors&gt;
      &lt;profiles&gt;
          &lt;profile&gt;
              &lt;id&gt;nexus&lt;/id&gt;
              &lt;properties&gt;
                  &lt;project.build.sourceEncoding&gt;MacRoman&lt;/project.build.sourceEncoding&gt;
                  &lt;project.reporting.outputEncoding&gt;MacRoman&lt;/project.reporting.outputEncoding&gt;
              &lt;/properties&gt;
  
              &lt;!--Enable snapshots for the built in central repo to direct --&gt;
              &lt;!--all requests to nexus via the mirror --&gt;
              &lt;repositories&gt;
                  &lt;repository&gt;
                      &lt;id&gt;central&lt;/id&gt;
                      &lt;url&gt;http://central&lt;/url&gt;
                      &lt;releases&gt;&lt;enabled&gt;true&lt;/enabled&gt;&lt;/releases&gt;
                      &lt;snapshots&gt;&lt;enabled&gt;true&lt;/enabled&gt;&lt;/snapshots&gt;
                  &lt;/repository&gt;
              &lt;/repositories&gt;
              &lt;pluginRepositories&gt;
                  &lt;pluginRepository&gt;
                      &lt;id&gt;central&lt;/id&gt;
                      &lt;url&gt;http://central&lt;/url&gt;
                      &lt;releases&gt;&lt;enabled&gt;true&lt;/enabled&gt;&lt;/releases&gt;
                      &lt;snapshots&gt;&lt;enabled&gt;true&lt;/enabled&gt;&lt;/snapshots&gt;
                  &lt;/pluginRepository&gt;
              &lt;/pluginRepositories&gt;
          &lt;/profile&gt;
      &lt;/profiles&gt;
  
      &lt;activeProfiles&gt;
          &lt;activeProfile&gt;nexus&lt;/activeProfile&gt;
      &lt;/activeProfiles&gt;
  
  &lt;/settings&gt;
  </code></pre>
  
  <p>Any advice why it complains?</p>