Reputation: 474
my jenkins job throws this exception, while trying to connect to nexus repository i presume, anyone has any thoughts on that ? I can see it being mentioned in multiple other topics, but didn't found any solution in there for my issue.
The element type "hr" must be terminated by the matching end-tag "</hr>".
Could not resolve all files for configuration ':<dir>-web:xxx'.
and later
13:10:29 * What went wrong:
13:10:29 Execution failed for task ':xx-web:qqq'.
13:10:29 > Could not resolve all files for configuration ':xx-web:qqq'.
13:10:29 > Could not resolve mt.com.bbb.xx:xx-commons:0.0.9.
13:10:29 Required by:
13:10:29 project :xxx-web
13:10:29 > Could not resolve mt.com.bbb.xx:xx-commons:0.0.9.
13:10:29 > Could not parse POM http://<service>/repository/maven-public/.../xx-commons/0.0.9/xx-commons-0.0.9.pom
13:10:29 > The element type "hr" must be terminated by the matching end-tag "</hr>".
after build I see in the cache this file - (with clear wrong <\hr> tag)
<html>
<head><title>308 Permanent Redirect</title></head>
<body>
<hr><center><h1>308 Permanent Redirect</h1></center>
</body>
</html>
and when trying to simply wget
it from the host I get
root@jenkins-agent-t4dq3:/home/jenkins/workspace/# wget http://<url>/repository/maven-public/mt/com/xx/yy/0.0.9/yy-0.0.9.pom
--2020-03-10 06:40:14-- http://<url>/repository/maven-public/mt/com/xx/yy/0.0.9/xx-0.0.9.pom
Resolving <url> (<url>)... <ip>
Connecting to <url> (<url>)|<ip>|:80... connected.
HTTP request sent, awaiting response... 308 Permanent Redirect
2020-03-10 06:40:14 ERROR 308: Permanent Redirect.
Upvotes: 1
Views: 5612
Reputation: 11309
You need to tell Gradle about the repo location - Note that you need to figure out the correct location to use, localhost:8081
is probably not right:
repositories {
maven {
url "http://localhost:8081/nexus/content/groups/public"
}
}
Upvotes: 4