I cannot figure out why grails fails to resolve dependency.
When I ran
grails war --stacktrace --verbose
I could see in the log:
...
Server access Error: Connection timed out: connect url=https://repo.grails.org/grails/plugins/org/grails/plugins/tomcat/8.0.33/tomcat-8.0.33.pom
...
but the link could be opened and downloaded in the browser. I thought that proxy might cause it. But after I set it with:
grails add-proxy client --host=<ip> --port=<port>
the error remained.
I'm using
Grails 2.5.6
Java 1.8
Windows 10
I cannot figure out how dependency resolution mechanism works in Grails. I also tried to run Grails 3.3.9 right after the extraction of the downloaded zip-archive. I ran grails not from a Grails-project folder.
And the first I saw was:
| Error Error occurred running Grails CLI: Could not find artifact org.grails:grails-bom:pom:3.3.9 in nexus (http://<ip>:<port>/nexus/content/groups/public) (Use --stacktrace to see the full trace)
How does it know about
http://<ip>:<port>/nexus/content/groups/public
This is a setting from my Maven. How are they related?
After you run grails add-proxy client ...
you need to tell Grails to use that proxy with grails set-proxy client
.
If you want to review it, the proxy config is stored in %USERPROFILE%\\.grails\\ProxySettings.groovy
add-proxy
should add the proxy definition and set-proxy
should set an unique line currentProxy='client'
Grails 3 uses Gradle as the build system so I guess you configured Gradle to use a Maven repo in %USERPROFILE%\\.gradle\\settings.gradle
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.