I have a grails 2.4.0 application that uses the tomcat-7.0.70, hibernate4:4.3.5.5 and other plugins.
I had these URLs mentioned in my BuildConfig.groovy:
mavenRepo "https://mvnrepository.com"
mavenRepo "https://repo1.maven.org/maven2"
But I keep getting:
| Error Resolve error obtaining dependencies: Failed to read artifact descriptor for org.grails.plugins:tomcat:zip:7.0.70 (Use --stacktrace to see the full trace)
| Error Required Grails build dependencies were not found. This is normally due to internet connectivity issues (such as a misconfigured proxy) or missing repositories in grails-app/conf/BuildConfig.groovy. Please verify your configuration to continue.
Tried adding the URL:
mavenRepo "https://repo.grails.org"
To the top of these. But, I am still getting this error.
I tried commenting out the grailsCentral() and mavenCentral() repos as well in the BuildConfig.groovy.
On doing that, I got a certificate mismatch error:
Caused by: javax.net.ssl.SSLException: hostname in certificate didn't match: <repo.grails.org> != <*.jfrog.io> OR <*.jfrog.io> OR <jfrog.io>
Can anyone help?
Which version of Java are you using? I had this exact same issue using Java 7. I switched to Java 8 and was able to load the dependencies that way. My application requires Java 7 so once the dependencies were loaded I switched back and was able to build successfully.
Not sure the exact reason for this but it has something to do with the Maven repos forcing HTTPS connections.