audit: check Maven Central URLs, prefer redirector (#311)

Should help with being more consistent and makes sure to suggest the
HTTPS redirector even if equally valid HTTP URLs for specific hosts or
`central.maven.org` are used.
This commit is contained in:
Martin Afanasjew 2016-06-02 09:36:27 +02:00
parent e4d0187120
commit 1c00fed119

View File

@ -1269,6 +1269,12 @@ class ResourceAuditor
#{u}
EOS
end
# Check for Maven Central urls, prefer HTTPS redirector over specific host
urls.each do |u|
next unless u =~ %r{https?://(?:central|repo\d+)\.maven\.org/maven2/(.+)$}
problem "#{u} should be `https://search.maven.org/remotecontent?filepath=#{$1}`"
end
end
def problem(text)