1
votes

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] (o.a.r.HttpRepo :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.

1
did u configure the network repo so it will download artifacts from maven-central in case it does not find them? - OhadR
also, there might be authentication issue with the repo. maybe it lacks credentials, so it redirects to login page (html tag...) - OhadR
I did configure maven-central, and authentication should not be a problem because those repos have no authentication. - jcd
@jcd It looks like this, cause your configuration tries to download artifacts from a bintray repository instead of maven central. - khmarbaise
Im not sure why that is, because I have "repo1" higher in the order than the bintray repo. but even if I get rid of that bintray repo entirely so that nothing will try to download from that repo, the errors shift to another repo. I am now seeing them for repository.codehaus.org. Also, in the artifactory I set up initially, many of those artifacts were coming from bintray. It must be some configuration that I am missing, or possibly a firewall problem? - jcd

1 Answers

2
votes

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.