maven部署不适用于发布

maven部署不适用于发布,maven,repository,maven-3,nexus,snapshot,Maven,Repository,Maven 3,Nexus,Snapshot,嗨,我是maven构建工具的初学者。我构建了一个简单的maven JavaEE项目,并尝试构建它的远程nexus存储库。但我只能成功部署快照。发布部署时出现400个错误请求错误 这是我的Setting.xml配置 <servers> <server> <id>****</id> <username>****</user

嗨,我是maven构建工具的初学者。我构建了一个简单的maven JavaEE项目,并尝试构建它的远程nexus存储库。但我只能成功部署快照。发布部署时出现400个错误请求错误

这是我的
Setting.xml
配置

     <servers>
            <server>
                    <id>****</id>
                    <username>****</username>
                    <password>****</password>
            </server>
    </servers>

    <mirrors>
        <mirror>
                <id>nexus</id>
                <mirrorOf>central</mirrorOf>
                <url>http://******:8081/nexus/content/groups/net.******.timetrack/</url>
        </mirror>
    </mirrors>

<profiles>
    <profile>
            <id>nexus</id>
            <repositories>
                <repository>
                    <id>*****</id>
                    <url>http://******:8081/nexus/content/groups/net.*******.timetrack/</url>
                    <releases><enabled>true</enabled></releases>
                    <snapshots><enabled>true</enabled></snapshots>
                </repository>
            </repositories>

            <pluginRepositories>
                <pluginRepository>
                    <id>******</id>
                    <url>http://******:8081/nexus/content/groups/net.******.timetrack/</url>
                    <releases><enabled>true</enabled></releases>
                    <snapshots><enabled>true</enabled></snapshots>
                </pluginRepository>
            </pluginRepositories> 
        </profile>
</profiles>

<activeProfiles>
            <activeProfile>nexus</activeProfile>
</activeProfiles>
如果我运行
mvn clean deploy
with(用于快照)

然后给出400个错误请求错误

这是错误日志

[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. -> [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
如果有人请帮我解决这个问题

谢谢。

您可以将给定工件的发布版本只部署一次到给定的Nexus实例

如果您的Nexus中已经存在相同的版本,您将得到一个与您看到的相同的错误

http://*****:8081/nexus/content/groups/net.***.timetrack/
无法部署到组存储库中,请将此URL更改为托管版本存储库的URL

<groupId>net.*****.*****</groupId>
<artifactId>*****-**-****</artifactId>
<version>1.4-SNAPSHOT</version>
<packaging>war</packaging>
<groupId>net.*****.****</groupId>
<artifactId>****-***-*****</artifactId>
<version>1.4.1</version>
<packaging>war</packaging>
[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. -> [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
            <url>http://*******:8081/nexus/content/groups/net.****.timetrack/</url>