Reputation: 1172
Not even sure where to start at this point. I've installed grails 3.2.4 I'm using IntelliJ IDEA Ultimate 2016.1. I can create a new grails project using grails-3.2.4 and it appears to succeed, the Grails Console shows the create-app was successful. The project creates and an IDEA window opens, but displays the message:
Gradle 'myProject' project refresh failed
Error: Cause: unable to find valid certification path to requested target
I have no idea where this error comes from or how to specify a keystore. If I go into the project directory (~/myProject) and attempt to run grails from the command line, it attempts to start before erroring out with:
Error Error initializing classpath: Operation timed out
I tried adding proxy information to the gradle.properties file:
systemProp.http.proxyHost=proxy-server.company.com
systemProp.http.proxyPort=80
This seemingly has no effect.
The project in IntelliJ doesn't even seem to have grails support beyond the initial grails console output... I cannot right-click to create new Grails objects on the project. The "Tools" menu does not have a "Grails" sub-menu. Run configurations do not allow me to select a grails project to run. I'm at this point I'm just stabbing at things trying to get a new project created and running in grails 3.
Update: I got past the initial unable to find certification path
error by downloading the gradle-version-bin.zip file and referencing it from the gradle-wrapper.properties
locally instead of at the external distribution URL it tries to use out-of-the box. This seems to allow it to try to update, but times out with the error
Operation timed out. If you are behind an HTTP proxy, please configure the proxy settings either in IDE or Gradle.
My IDE proxy settings are correct (Preferences --> Appearance --> System Settings --> HTTP Proxy) using an Automatic proxy configuration URL (as confirmed by running "Check Connection" from the preferences window). Also tried adding the proxyHost to gradle.properties
as I said above. It seems that the update is not using the proxy, though.
Update 2: After getting gradle downloaded manually and installed locally, I eventually updated the maven repository URLs in build.gradle
to use http instead of https. Once I did this, I was able to refresh the project in the gradle window. After this finished, the gradle view finally showed that there was a project and grails commands were available.
Not too savvy with certificates, but I think I should be able to download dependencies from secure repositories.
Upvotes: 1
Views: 1818
Reputation: 464
After you created the project using grails create-app name, you need to import the project to intellij idea. Open IDE go to file->new->project from existing sources. Then select the build.gradle file in your generated project. Click ok.
this will import the grails project into your IDE.
to run grails project, right click on grails-app/init/${projectName}/Application.groovy and click on run Application.
you are good to go.
If IDE is not recognizing your grails then go to tools -> grails -> change sdk version -> put the grails installation path there.
Upvotes: 1