简体   繁体   中英

Artifactory not downloading some jars or POMS correctly, strange POM parsing error

I set up an artifactory locally, which works great, and then we tried to set one up over our network. I did my best to configure it like the local one. However, we are having issues with artifactory showing weird things in the repo caches. It will say it downloaded a jar but the jar is actually corrupt. Also, it doesnt put the POM in the cache. Looking at the logs, I am getting this type of error over and over:

[ERROR] (oarHttpRepo :294) - jcenter: Failed to download ' http://jcenter.bintray.com/org/apache/maven/plugins/maven-compiler-plugin/2.3.2/maven-compiler-plugin-2.3.2.pom '. Received status code 200 and caught exception: Failed to read POM for 'org/apache/maven/plugins/maven-compiler-plugin/2.3.2/maven-compiler-plugin-2.3.2.pom': Expected root element 'project' but found 'html' (position: START_TAG seen ...TD HTML 4.01//EN" " http://www.w3.org/TR/html4/strict.dtd ">\\n\\n... @3:7) .

I tried supressing POM consistency checks based on what I saw here , but that didnt work.

It's most certainly a proxy misconfiguration. Artifactory tries to download files from jcenter and gets an error message from the proxy. Two problems here:

  1. Artifactory is not configured to use a proxy to get to outside world (to jcenter, namely).
  2. Proxy itself is misconfigured and returns status code 200 on an error (and emits error message in html page).

Combination of the two brings to wierd situation when Artifactory thinks it stored the file correctly, when actually some error html page is stored. Since you have the pom consistency checks turned on, Artifactory tries to parse the pom on save and fails.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM