maven deploy does not work for releases
<p>Hi I am a beginner for maven build tool. I built a simple maven JavaEE project and I tried to build it remote <strong>nexus repository</strong>. But i can deploy successfully only for snapshots. Releases deploying gives 400 bad request error.</p>

<p>here is my <code>Setting.xml</code> configuration</p>

<pre><code>     &lt;servers&gt;
            &lt;server&gt;
                    &lt;id&gt;****&lt;/id&gt;
                    &lt;username&gt;****&lt;/username&gt;
                    &lt;password&gt;****&lt;/password&gt;
            &lt;/server&gt;
    &lt;/servers&gt;

    &lt;mirrors&gt;
        &lt;mirror&gt;
                &lt;id&gt;nexus&lt;/id&gt;
                &lt;mirrorOf&gt;central&lt;/mirrorOf&gt;
                &lt;url&gt;http://******:8081/nexus/content/groups/net.******.timetrack/&lt;/url&gt;
        &lt;/mirror&gt;
    &lt;/mirrors&gt;

&lt;profiles&gt;
    &lt;profile&gt;
            &lt;id&gt;nexus&lt;/id&gt;
            &lt;repositories&gt;
                &lt;repository&gt;
                    &lt;id&gt;*****&lt;/id&gt;
                    &lt;url&gt;http://******:8081/nexus/content/groups/net.*******.timetrack/&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;******&lt;/id&gt;
                    &lt;url&gt;http://******:8081/nexus/content/groups/net.******.timetrack/&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;
</code></pre>

<p>and here is my <code>pom.xml</code>'s distribution management</p>

<pre><code>&lt;distributionManagement&gt;
        &lt;repository&gt;
            &lt;uniqueVersion&gt;false&lt;/uniqueVersion&gt;
            &lt;id&gt;*****&lt;/id&gt;
            &lt;name&gt;******&lt;/name&gt;
            &lt;url&gt;http://*******:8081/nexus/content/groups/net.******.timetrack/&lt;/url&gt;
            &lt;layout&gt;default&lt;/layout&gt;
        &lt;/repository&gt;
        &lt;snapshotRepository&gt;
            &lt;uniqueVersion&gt;true&lt;/uniqueVersion&gt;
            &lt;id&gt;*****&lt;/id&gt;
            &lt;name&gt;***** Snapshots&lt;/name&gt;
            &lt;url&gt;http://******:8081/nexus/content/repositories/snapshots/&lt;/url&gt;
            &lt;layout&gt;legacy&lt;/layout&gt;
        &lt;/snapshotRepository&gt;
    &lt;/distributionManagement&gt;
</code></pre>

<p>If I run <code>mvn clean deploy</code> with (for a snapshot)</p>

<pre><code>&lt;groupId&gt;net.*****.*****&lt;/groupId&gt;
&lt;artifactId&gt;*****-**-****&lt;/artifactId&gt;
&lt;version&gt;1.4-SNAPSHOT&lt;/version&gt;
&lt;packaging&gt;war&lt;/packaging&gt;
</code></pre>

<p>then successfully deploy in to nexus repository snapshot directory.</p>

<p>If it I run <code>mvn clean deploy</code> with (for a release)</p>

<pre><code>&lt;groupId&gt;net.*****.****&lt;/groupId&gt;
&lt;artifactId&gt;****-***-*****&lt;/artifactId&gt;
&lt;version&gt;1.4.1&lt;/version&gt;
&lt;packaging&gt;war&lt;/packaging&gt;
</code></pre>

<p>then it gives 400-bad request error</p>

<p>Here is the log for the error</p>

<pre><code>[INFO] 
[INFO] --- maven-war-plugin:2.6:war (default-war) @ ****-****-***** ---
[INFO] Packaging webapp
[INFO] Assembling webapp [*****-time-tracker] in [/home/dilanka/Projects/time_tracker/samples/GitLab/****/***-time-tracker/target/*****-time-tracker-1.4]
[INFO] Processing war project
[INFO] Copying webapp resources [/home/dilanka/Projects/time_tracker/samples/GitLab/*****/****-time-tracker/src/main/webapp]
[INFO] Webapp assembled in [115 msecs]
[INFO] Building war: /home/dilanka/Projects/time_tracker/samples/GitLab/TimeTracker/*****-time-tracker/target/****-time-tracker-1.4.war
[INFO] 
[INFO] --- maven-install-plugin:2.4:install (default-install) @ ****-time-tracker ---
[INFO] Installing /home/dilanka/Projects/time_tracker/samples/GitLab/TimeTracker/****-time-tracker/target/****-time-tracker-1.4.war to /home/dilanka/maven3-repo/net/*****/timetrack/****-time-tracker/1.4/****-time-tracker-1.4.war
[INFO] Installing /home/dilanka/Projects/time_tracker/samples/GitLab/TimeTracker/****-time-tracker/pom.xml to /home/dilanka/maven3-repo/net/****/timetrack/****-time-tracker/1.4/****-time-tracker-1.4.pom
[INFO] 
[INFO] --- maven-deploy-plugin:2.7:deploy (default-deploy) @ ****-time-tracker ---
Uploading: http://*****:8081/nexus/content/groups/net.*****.timetrack/net/****s/timetrack/***-time-tracker/1.4/****-time-tracker-1.4.war
Uploading: http://*****:8081/nexus/content/groups/net.****.timetrack/net/****/timetrack/****-time-tracker/1.4/****-time-tracker-1.4.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 27.790 s
[INFO] Finished at: 2016-01-08T15:28:08+05:30
[INFO] Final Memory: 32M/252M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project ****-time-tracker: Failed to deploy artifacts: Could not transfer artifact net.****.timetrack:*****-time-tracker:war:1.4 from/to ***** (http://*****:8081/nexus/content/groups/net.****.timetrack/): Failed to transfer file: http://*****:8081/nexus/content/groups/net.****.timetrack/net/*****/timetrack/*****-time-tracker/1.4/****-time-tracker-1.4.war. Return code is: 400, ReasonPhrase: Bad Request. -&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>If any body please help me to solve this problem.</p>

<p>Thanks.</p>