程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 編程語言 >> 更多編程語言 >> 編程解疑 >> maven-Maven 項目打包上傳服務器的時候出現問題 急急急!

maven-Maven 項目打包上傳服務器的時候出現問題 急急急!

編輯:編程解疑
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>

感覺沒有什麼問題,請大神指導一下

最佳回答:


下面是錯誤的具體描述:
[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

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved