====== Setup Grails 3 Development Environment ====== - Download the latest version (or any version) from [[https://grails.org/]] - Upzip it to a known directory, ''d:\grails-3.3.6'', for example. - Download and install the required JDK for your Grails version from Oracle. For example, Grails 3.3.6 requires ''Java JDK 1.8'' to run. [[https://www.oracle.com/technetwork/java/javase/downloads/index.html]] - Edit either the environment variables for the system or your account. Here I choose my own user variables instead of system variables. {{ :setup_grails_3_development_environment_env.jpg?direct&200 |}} - Add GRAILS_HOME, and JAVA_HOME to the path Grails, and Java JDK installed respectively. Then Add ''%GRAILS_HOME%\bin'' in the existing Path variable so that your can call the grails' executable in the console. {{ :setup_grails_3_development_environment_env2.png?direct&400 |}} - The installation is completed. To try it out, Open a command prompt.{{ :setup_grails_3_development_environment_env3.png?direct&200 |}} - Go to the directory you want to create the Hello World project. In my case, it is ''d:\grailsApp''. Type the command ''grails create-app helloworld'' to create a new project named helloworld. D:\grailsApp>grails create-app helloworld - Change directory to the newly create ''helloworld'' directory, and type the command ''grails''. Grails will download the require library. It might take sometime for download for the first time. After that, we will enter the grails mode D:\grailsApp>cd helloworld D:\grailsApp\helloworld>grails BUILD SUCCESSFUL | Enter a command name to run. Use TAB for completion: grails> - To see which commands we can run in grails mode, press ''Tab'' key. The interesting one would be ''assemble'', ''compile'', ''clean'', ''run-app'', and ''stop-app'' grails> assemble bug-report clean compile console create-controller create-domain-class create-functional-test create-integration-test create-interceptor create-scaffold-controller create-script create-service create-taglib create-unit-test dependency-report generate-all generate-async-controller generate-controller generate-views gradle help install install-templates list-plugins open plugin-info run-app schema-export shell stats stop-app test-app url-mappings-report grails> - The Development Environment has now been set up.