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

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

    点赞 评论
  • 夜半无声 2016-03-18 11:53

    都抛400错误了!应该是传参什么的不对吧!

    点赞 评论
  • mazi2004 2016-03-18 14:25

    maven环境搭建的有问题

    点赞 评论

相关推荐 更多相似问题