how to create grails project in GGTS using version 3.1.6 - grails

I am new to Grail, I have created a small project in Grails 2.4.4 using the GGTS tool, but an unable to create the same project in grails version 3.1.6.
It's showing an error like the one below when I create a new poject under version 3.1.6:
couldn't find or load main class org.codehaus.groovy.grails.cli.support.GrailsStarter
How can I solve this problem?

GGTS officially doesn't have support for Grails 3.x but this
this article can surely help.

Related

Error creating Grails project in NetBeans

The error I have is the following:
Warning |
Unrecognized flag: non-interactive.
Resolving dependencies..
Error |
Specify an application name or use --inplace to create an application in the current directory
I'm following the steps that come on the NetBeans page.
I have installed:
Grails 3.3.8.
Groovy 2.4.15.
NetBeans 8.2.
From console create a project using grails create-app hello world and in this case it seems that there were no problems.
NetBeans doesn't currently support Grails 3.x as far as I know, however you might be able to import it as a Gradle project. I know that Netbeans is working on updating there Groovy support soon, maybe that will help...
The best IDE for Grails is Intellij Ultimate, which costs money, however you can use the community version, you just won't get GSP support.

Cannot configure Grails 3.0.4 in GGTS, Grails installed using GVM

I have installed GGTS 3.6.4 and also Groovy & Grails using GVM on my MAC OS.
In GGTS, Preferences - Configure Grails Installation - Add, I want to add the latest grails installed by GVM in /Users/user/.gvm/grails/current
I have also enabled the hidden folders in Mac.
grails version 3.x.x doesn't contain build.properties file.
So, you should follow the following steps:
Create /grails-3.x.x/build.properties file.
Inside build.properties write the content version name as
grails.version=3.1.1
Now, open GGTS .
Go to Window/Preferences.
Type grails in the 'type filter text'.
Select Grails.
Now click on Add button on the right panel to add grails version 3.x.x .
Select the grails version from the My computer.
You are ready to go.
Your GGTS will recognize it as now Grails installation.
According to the GGTS website, it only supports Grails 1.3/2.x (not the latest Grails 3.x). Pivotal discontinued support for GGTS earlier this year.
The best IDE alternative currently is IntelliJ IDEA. Grails 3 is built on Gradle, so no special support for Grails is necessary as IDEA already has excellent support for Gradle projects.

Grails Project not shown in NetBeans project window

I create a new Grails project from NetBeans but when I complete the project complition wizard, nothing to show in my NetBeans project window. My details configuration is:
NetBeans 8.0.2, JDK 8 64bit, Grails 3.0.1
I check my environment veriable setting for Java & Grails also. Everything seems ok, and one important thing is in command line when I type grails -version, it shows the version name and so on. I uninstall NetBeans, JDK, & Grails several times but same problem, I also try it for JDK 1.7 32 bit, no result. I'm used to with NetBeans, so I don't try to other IDE.
Maybe look where the project is defined on disk and open it into NetBeans.
I dont know how this case was solved, but to me it looks like the problem is still valid:
The New Project wizard (Groovy -> Grails Application) calls "grails create-app" but does not generate the nbproject directory.
My environment is:
NetBeans: 8.0.2; Grails Version: 3.0.4; Groovy Version: 2.4.4; JVM Version: 1.7.0_79
Netbeans 8.0.* does not have support for Grails 3.* projects. It can create project but cannot recognize and open the project since the project structure has been dramatically changed from Grails 2.* to 3.*. There was a task created to resolve this problem. Now it reads VERIFIED FIXED for version 8.1. So please upgrade to Netbeans 8.1.* in order to be able to handle Grails 3.* projects in Netbeans.

Migrating Grails 2.4 MultipleCompilationErrorsException

I'm going to migrate an existing Grails 2.0 plugin to 2.4.
According to the migration guide the following steps were done:
run set-grails-version 2.4.4
update to latest plugin versions (hibernate4, tomcat, release and etc)
In in Intellij I've changed plugin SDK version on 2.4.4. Now module->dependencies looks like
It looks good but when I do grails compile, I have MultipleCompilationErrorsException in SvnDeployer class of release:3.0.1 plugin with "unable to resolve" message: unable to resolve class org.apache.commons.io.FilenameUtils(it's strange, commons.io is included into grails library)
On SDK of 2.0 everything is fine, but when I change SDK version to 2.4, project can not be compiled.
From my experience, Grails upgrades are not really smooth especially between feature releases.
I recommend starting with the usual
grails clean
grails refresh-dependencies
grails compile
After that check if you still get the same kind of errors, see whether or not excluding the svn plugin helps (if you're not using it).

How to change the grails version in eclipse?

I am using
http://spring.io/tools/ggts
for grails development. But the version that comes with this eclipse bundle is above 2.2.0. I need to change the grails version and point it to 2.2.0. I have downloaded grails version 2.2.0. How can i change the grails in the eclipse so that it points to 2.2.0? Thanks for help!
You can configure as many versions of Grails as you like inside of GGTS. Open the preferences and navigate to Groovy -> Grails. Click the "Add" button to add new versions of Grails. Now when you create projects you can select which of the installed versions you want to use. You can also associate different versions of Grails with already existing projects.
I hope that helps.

Resources