NeverGiveUp7 2016-03-18 11:25 采纳率: 88.9%
浏览 13163
已采纳

Maven 项目打包上传服务器的时候出现问题 急急急!

图片说明

用下面的命令传到服务器的时候出现了下面的错误,求大神指导
clean package deploy
。。。。。。
[INFO] --- maven-install-plugin:2.4:install (default-install) @ DEMO ---
[INFO] Installing E:\WORK\DEMO\target\DEMO.jar to C:\Users\Administrator.m2\repository\com\cmcc\dsp\open\client\DEMO\0.0.5-SNAPSHOT\DEMO-0.0.5-SNAPSHOT.jar
[INFO] Installing E:\WORK\DEMO\pom.xml to C:\Users\Administrator.m2\repository\com\cmcc\dsp\open\client\DEMO\0.0.5-SNAPSHOT\DEMO-0.0.5-SNAPSHOT.pom
[INFO] Installing E:\WORK\DEMO\target\DEMO-jar-with-dependencies.jar to C:\Users\Administrator.m2\repository\com\cmcc\dsp\open\client\DEMO\0.0.5-SNAPSHOT\DEMO-0.0.5-SNAPSHOT-jar-with-dependencies.jar
[INFO]
[INFO] --- maven-deploy-plugin:2.7:deploy (default-deploy) @ DEMO ---
[INFO] Downloading: http://XXXX/nexus/content/repositories/cxb/com/cmcc/dsp/open/client/DEMO/0.0.5-SNAPSHOT/maven-metadata.xml
[INFO] Uploading: http://XXXX/nexus/content/repositories/cxb/com/cmcc/dsp/open/client/DEMO/0.0.5-SNAPSHOT/DEMO-0.0.5-20160318.111746-1.jar
[INFO] Uploading: http://XXXX/nexus/content/repositories/cxb/com/cmcc/dsp/open/client/DEMO/0.0.5-SNAPSHOT/DEMO-0.0.5-20160318.111746-1.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8.572 s
[INFO] Finished at: 2016-03-18T19:17:46+08:00
[INFO] Final Memory: 27M/287M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project DEMO: Failed to deploy artifacts: Could not transfer artifact com.cmcc.dsp.open.client:DEMO:jar:0.0.5-20160318.111746-1 from/to local-nexus (http://XXXX/nexus/content/repositories/cxb/): Failed to transfer http://XXXX/nexus/content/repositories/cxb/com/cmcc/dsp/open/client/DEMO/0.0.5-SNAPSHOT/DEMO-0.0.5-20160318.111746-1.jar. Error code 400, 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

POM.xml 中配置了:


local-nexus
http://XXX/nexus/content/repositories/cxb/

settings中配置了密码:
    <servers>
    <server>
        <id>public-nexus</id>
        <username>XXX</username>
        <password>YYYYY</password>
    </server>
    <server>
        <id>local-nexus</id>
        <username>XXX</username>
        <password>YYYYY</password>
    </server>
</servers>

感觉没有什么问题,请大神指导一下
  • 写回答

3条回答 默认 最新

  • NeverGiveUp7 2016-03-18 11:38
    关注

    下面是错误的具体描述:
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 8.934 s
    [INFO] Finished at: 2016-03-18T19:31:27+08:00
    [INFO] Final Memory: 27M/441M
    [INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project DEMO: Failed to deploy artifacts: Could not transfer artifact com.cmcc.dsp.open.client:DEMO:jar:0.0.5-20160318.113127-1 from/to local-nexus (http://XXXXX/nexus/content/repositories/cxb/): Failed to transfer http://XXXXX/nexus/content/repositories/cxb/com/cmcc/dsp/open/client/DEMO/0.0.5-SNAPSHOT/DEMO-0.0.5-20160318.113127-1.jar. Error code 400, Bad Request -> [Help 1]
    org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7:deploy (default-deploy) on project DEMO: Failed to deploy artifacts: Could not transfer artifact com.cmcc.dsp.open.client:DEMO:jar:0.0.5-20160318.113127-1 from/to local-nexus (http://XXXXX/nexus/content/repositories/cxb/): Failed to transfer http://XXXXX/nexus/content/repositories/cxb/com/cmcc/dsp/open/client/DEMO/0.0.5-SNAPSHOT/DEMO-0.0.5-20160318.113127-1.jar. Error code 400, Bad Request
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:108)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:76)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:116)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:157)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
    Caused by: org.apache.maven.plugin.MojoExecutionException: Failed to deploy artifacts: Could not transfer artifact com.cmcc.dsp.open.client:DEMO:jar:0.0.5-20160318.113127-1 from/to local-nexus (http://XXXXX/nexus/content/repositories/cxb/): Failed to transfer http://XXXXX/nexus/content/repositories/cxb/com/cmcc/dsp/open/client/DEMO/0.0.5-SNAPSHOT/DEMO-0.0.5-20160318.113127-1.jar. Error code 400, Bad Request
    at org.apache.maven.plugin.deploy.DeployMojo.execute(DeployMojo.java:193)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
    ... 19 more
    Caused by: org.apache.maven.artifact.deployer.ArtifactDeploymentException: Failed to deploy artifacts: Could not transfer artifact com.cmcc.dsp.open.client:DEMO:jar:0.0.5-20160318.113127-1 from/to local-nexus (http://XXXXX/nexus/content/repositories/cxb/): Failed to transfer http://XXXXX/nexus/content/repositories/cxb/com/cmcc/dsp/open/client/DEMO/0.0.5-SNAPSHOT/DEMO-0.0.5-20160318.113127-1.jar. Error code 400, Bad Request
    at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:143)
    at org.apache.maven.plugin.deploy.AbstractDeployMojo.deploy(AbstractDeployMojo.java:167)
    at org.apache.maven.plugin.deploy.DeployMojo.execute(DeployMojo.java:157)
    ... 21 more
    Caused by: org.eclipse.aether.deployment.DeploymentException: Failed to deploy artifacts: Could not transfer artifact com.cmcc.dsp.open.client:DEMO:jar:0.0.5-20160318.113127-1 from/to local-nexus (http://XXXXX/nexus/content/repositories/cxb/): Failed to transfer http://XXXXX/nexus/content/repositories/cxb/com/cmcc/dsp/open/client/DEMO/0.0.5-SNAPSHOT/DEMO-0.0.5-20160318.113127-1.jar. Error code 400, Bad Request
    at org.eclipse.aether.internal.impl.DefaultDeployer.deploy(DefaultDeployer.java:337)
    at org.eclipse.aether.internal.impl.DefaultDeployer.deploy(DefaultDeployer.java:268)
    at org.eclipse.aether.internal.impl.DefaultRepositorySystem.deploy(DefaultRepositorySystem.java:413)
    at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:139)
    ... 23 more
    Caused by: org.eclipse.aether.transfer.ArtifactTransferException: Could not transfer artifact com.cmcc.dsp.open.client:DEMO:jar:0.0.5-20160318.113127-1 from/to local-nexus (http://XXXXX/nexus/content/repositories/cxb/): Failed to transfer http://XXXXX/nexus/content/repositories/cxb/com/cmcc/dsp/open/client/DEMO/0.0.5-SNAPSHOT/DEMO-0.0.5-20160318.113127-1.jar. Error code 400, Bad Request
    at io.tesla.aether.connector.AetherRepositoryConnector$3.wrap(AetherRepositoryConnector.java:883)
    at io.tesla.aether.connector.AetherRepositoryConnector$3.wrap(AetherRepositoryConnector.java:877)
    at io.tesla.aether.connector.AetherRepositoryConnector$PutTask.flush(AetherRepositoryConnector.java:764)
    at io.tesla.aether.connector.AetherRepositoryConnector.put(AetherRepositoryConnector.java:343)
    at org.eclipse.aether.internal.impl.DefaultDeployer.deploy(DefaultDeployer.java:331)
    ... 26 more
    Caused by: io.tesla.aether.connector.TransferException: Failed to transfer http://XXXXX/nexus/content/repositories/cxb/com/cmcc/dsp/open/client/DEMO/0.0.5-SNAPSHOT/DEMO-0.0.5-20160318.113127-1.jar. Error code 400, Bad Request
    at io.tesla.aether.connector.AetherRepositoryConnector.handleResponseCode(AetherRepositoryConnector.java:371)
    at io.tesla.aether.connector.AetherRepositoryConnector.access$900(AetherRepositoryConnector.java:95)
    at io.tesla.aether.connector.AetherRepositoryConnector$PutTask.run(AetherRepositoryConnector.java:734)
    at io.tesla.aether.connector.AetherRepositoryConnector.put(AetherRepositoryConnector.java:330)
    ... 27 more
    [ERROR]
    [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

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 做个有关计算的小程序
  • ¥15 MPI读取tif文件无法正常给各进程分配路径
  • ¥15 如何用MATLAB实现以下三个公式(有相互嵌套)
  • ¥30 关于#算法#的问题:运用EViews第九版本进行一系列计量经济学的时间数列数据回归分析预测问题 求各位帮我解答一下
  • ¥15 setInterval 页面闪烁,怎么解决
  • ¥15 如何让企业微信机器人实现消息汇总整合
  • ¥50 关于#ui#的问题:做yolov8的ui界面出现的问题
  • ¥15 如何用Python爬取各高校教师公开的教育和工作经历
  • ¥15 TLE9879QXA40 电机驱动
  • ¥20 对于工程问题的非线性数学模型进行线性化