Maven Deploy Error Code 400 Bad Request
Contents |
here for a quick overview of the site Help Center Detailed answers maven deploy return code is 400 reasonphrase bad request to any questions you might have Meta Discuss the workings maven deploy upload twice and policies of this site About Us Learn more about Stack Overflow the company Business error deploying artifact failed to transfer file return code is 401 Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the failed to deploy artifacts: could not transfer artifact Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up maven deploy + nexus failed on bad request up vote 4 down vote favorite 1 I am experiencing some problems with my build
Failed To Deploy Artifacts Could Not Transfer Artifact Return Code Is 401 Reasonphrase Unauthorized
process. the build is finishing fine and Jenkins starts to upload files to nexus. everything works well, but then it fails for some reason, the weirdest part is that the file that is mentioned to not be uploaded is actually uploaded and i can find it in nexus. here is the output: [INFO] ------------------------------------------------------------------------ [INFO] Reactor Build Order: [INFO] [INFO] pn-parent [INFO] pn-domain [INFO] pn-infra [INFO] pn-config [INFO] datalink-repository [INFO] pn-service [INFO] pn-backend [INFO] [INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1 [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building pn-parent 0.0.707 [INFO] ------------------------------------------------------------------------ [WARNING] The artifact junit:junit-dep:pom:4.11 has been relocated to junit:junit:pom:4.11 [INFO] [INFO] --- maven-jar-plugin:2.5:jar (default-cli) @ pn-parent --- [WARNING] JAR will be empty - no content was marked for inclusion! [INFO] Building jar: /var/lib/jenkins/jobs/webapps-server-side-release/workspace/pn-parent/target/pn-parent-0.0.707.jar [INFO] [INFO] --- maven-deploy-plugin:2.7:deploy (default-cli) @ pn-parent --- Uploading: http://maven.mycompany.com:8081/nexus/content/repositories/releases/com/mycompany/pn-parent/0.0.707/pn-parent-0.0.707.pom Uploaded: http://maven.mycompany.com:8081/nexus/content/repositories/releases/com/mycompany/pn-parent/0.0.707/pn-parent-0.0.707.pom (15 KB at 111.6 KB/sec) Downloading: http://maven.mycompany.com:8081/nexus/content/repositories/releases/com/mycompany/pn-parent/maven-metadata.xml Downloaded: http://maven.mycompany.com:8081/nexus/content/repositories/r
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn
Error Deploying Artifact Failed To Transfer File Return Code Is 500
more about Stack Overflow the company Business Learn more about hiring developers or failed to deploy artifacts: could not find artifact posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community failed to deploy artifacts could not transfer artifact reasonphrase forbidden Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Deploying release jar error -Return code is: 400, ReasonPhrase: Bad http://stackoverflow.com/questions/24806948/maven-deploy-nexus-failed-on-bad-request Request up vote 0 down vote favorite [ERROR] Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.7: deploy-file (default-cli) on project datatest: Failed to deploy artifacts: Could not transfer artifact com.sabre:datatest:jar:sources:1.3.2-release from/toupload-releases (http://maven.sabre.com/content/repositories/releases): Failed to transfer file: http://maven.sabre.com/content/repositories/releases/com/sabre/ datatest/1.3.2-release/datatest-1.3.2-release-sources.jar. Return code is: 400, ReasonPhrase: Bad Request. -> [Help 1] Not sure why am I getting this error ? java linux maven unix share|improve this question asked Apr 18 at 17:17 Diya Prakash http://stackoverflow.com/questions/36700369/deploying-release-jar-error-return-code-is-400-reasonphrase-bad-request 1 400 means you have already an artifact with this version. So you need to create a different version 1.3.3 for example.... –khmarbaise Apr 18 at 20:01 add a comment| active oldest votes Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook. Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Post as a guest Name Email discard By posting your answer, you agree to the privacy policy and terms of service. Browse other questions tagged java linux maven unix or ask your own question. asked 6 months ago viewed 505 times Related 372Force maven update41Error when deploying an artifact in Nexus0Not able to deploy snapshot artifact to nexus16Nexus accepts upload but says it failed1Error during prepare to release phase using Maven Relelase Plugin1How can I deploy a Maven snapshot to oss.jfrog.org? Return code: 4050Jenkins to nexus - Error deploying artifact: Failed to transfer file 4000maven release deploy twice and fail1Maven deploy is throwing error0How to redeploy artifact release to nexus without “400, ReasonPhrase: Bad Request.” answer? Hot
Error 400 when deploying releases to Nexus Date Wed, 06 Oct 2010 09:32:09 GMT This is expected as a release repo is set to not allow redeploys by default. What happens is that http://mail-archives.apache.org/mod_mbox/maven-users/201010.mbox/%3CAANLkTim4S7qF53QMZt0XdGxxa=gtgitKq18__GeAjwdd@mail.gmail.com%3E first the primary artifact (the jar) and the pom gets uploaded. The you https://support.sonatype.com/hc/en-us/articles/213464668-Troubleshooting-Artifact-Deployment-Failures try to uploaded sources jar and the pom again, which isn't allowed. A snapshot repo doesn't have this restriction normally and therefore works. You might be able to solve this by setting generatePom to false: http://maven.apache.org/plugins/maven-deploy-plugin/deploy-file-mojo.html#generatePom I haven't tried this personally, but the text indicates this should work. However, the name of failed to the param kind of indicates something else... /Anders On Wed, Oct 6, 2010 at 11:23, NickDeGraeve
deploy from Maven (or other build tools) make note of the HTTP status code returned. Then check below to see what the code means, and how to diagnose and fix the issue. Code 400 - Method not Allowed Nexus has received your deployment request but cannot process it because it is invalid. There are two common causes for this. The most common reason is that you are trying to re-deploy an artifact into a repository which does not allow redeployment. Check the "deployment policy" in your hosted repository configuration. If it is set to "disable redeploy" it means you cannot redeploy an artifact which is already in the repository. Note that this is the default setting for Nexus release repositories, since redeploying release artifacts is a maven anti-pattern. The second common reason for this code is that you are trying to deploy a release artifact into a snapshot repository, or vice versa. Code 401 - Unauthorized Either no login credentials were sent with the request, or login credentials which are invalid were sent. Checking the "authorization and authentication" system feed in the Nexus UI can help narrow this down. If credentials were sent there will be an entry in the feed. If no credentials were sent this is likely due to a mis-match between the id in your pom's distributionManagement section and your settings.xml's server section that holds the login credentials. Code 402 - Payment Required This error is returned if you are using Nexus Professional and your license has expired. Code 403 - Forbidden The login credentials sent were valid, but the user does not have permission to upload to the repository. Go to "administration/security" in the Nexus UI, and bring up the user (or the user's role if they are mapped via an external role mapping) and examine the role tree to see what repository privileges they have been assigned. A user will need create and update privileges for a repository to be able to deploy into it. Code 404 - Not Found The repository URL is invalid. Note that this code is returned after the artifact upload has completed, so it can be a bit confusing. Code 502 - Reverse Proxy Timeout You have a reverse proxy in front of Nexus (such as Nginx or Apache+mod_proxy) and the pending deployment request had no activity for the period of time specified in the reverse proxy's timeout setting. This could be due to the timeout being set to a very low value, the Nexus server being under very high load, or a bug in Nexus. If you need help diagnosing this contact support. Code 503 - Service unavailable This is not thrown by Nexus but in