Issue
i have a project with its pom file and i am tring to build it with mvn install command but its failed
i got the following error
INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:17 min
[INFO] Finished at: 2015-02-26T09:32:31+03:00
[INFO] Final Memory: 7M/112M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project PROJECT-web: Could not resolve dependencies for project co
m.prod.PROJECT:PROJECT-web:war:0.0.1-SNAPSHOT: Failed to collect dependencies at com.prod.comp:PROJECT
-web:jar:0.0.1-SNAPSHOT: Failed to read artifact descriptor for com.prod.comp:comp-web:jar:0.0.1-S
NAPSHOT: Could not transfer artifact com.prod.comp:comp-web:pom:0.0.1-SNAPSHOT from/to prodLocalRe
p (http://121.0.0.44:8080/artifactory/prod-repo): Error transferring file: Server returned HTTP res
ponse code: 502 for URL: http://121.0.0.44:8080/artifactory/prod-repo/com/prod/comp/comp-web/0.0.1
-SNAPSHOT/comp-web-0.0.1-SNAPSHOT.pom from http://121.0.0.44:8080/artifactory/prod-repo/com/prod/G
ACA/comp-web/0.0.1-SNAPSHOT/comp-web-0.0.1-SNAPSHOT.pom with proxyInfo ProxyInfo{host='compproxy', u
serName='null', port=8080, type='http', nonProxyHosts='null'} -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project PROJECT-we
b: Could not resolve dependencies for project com.prod.PROJECT:PROJECT-web:war:0.0.1-SNAPSHOT: Fail
ed to collect dependencies at com.prod.comp:comp-web:jar:0.0.1-SNAPSHOT
note that: maven downloaded many jars but stopped with this error
so my question is if i understood the error right are there some jars that prod-repo is running on their own reprository and servers?
the pom.xml
Solution
The 502 error message indicates that the server behind the proxy is not available. Now from the stacktrace it's hard to figure out if that is the server behind http://121.0.0.44:8080 or that it's another maven repository which is being questioned for a an artifact.
Answered By - Jeroen
Answer Checked By - Marilyn (JavaFixing Volunteer)