Recently using Grails, beginning with the 3.0.2 version, has been wrapped nullpointer error, later used in 2.5.0 version, you can create the project, but after entering the project catalog, then execute the grails program, error, the steps are as follows:
1. Grails Create-app HelloWorld//Success
2. CD HelloWorld
3. Grails//error, information is as follows
| Configuring Classpath
| Error Resolve error obtaining dependencies:could not transfer artifact org.grails.plugins:tomcat:zip:7.0.55.2 From/to grailscentral (https://repo.grails.org/grails/plugins): Connect to repo.grails.org:443 timed off (use-- StackTrace to see the full trace)
The literal view is not connected, and then try to modify the proxy address (my company needs to use an agent to access the extranet), or failure.
It was later discovered that it was necessary to set up Grails's proxy line, as follows:
1. Setting commands
Grails add-proxy myproxy--host=<server>--port=<port>--username=<username>--password=< Password>grails set-proxy myproxy
2. Open ~/.grails/proxysettings.groovy, found the content as follows (WIN7 platform error, Mac platform Normal, you can notice):
myproxy=[' Http.proxyhost ': true, ' http.proxyport ': true, ' http.proxyuser ': ', ' http.proxypassword ': ', ' Http.nonproxyhosts ': ']
Currentproxy= ' myproxy '
Then manually modify the host and port, and then perform grails, successfully.
Grails Agent proxy settings deployment Grails encounters error Resolve Error obtaining dependencies: Error, and workaround