Grails 3.0.1 - Folders missing? - grails

I downloaded Grails 2.4.4 and created a test project (using NetBeans) and it was successful.
I downloaded Grails 3.0.1 and created a test project (using NetBeans) NetBeans says project created successfully but it did not load the project in to project explorer.
I compared Groovy folders of 2.4.4 and 3.0.1 and noticed that few folders are missing in the installation.
I confirmed that I downloaded the correct package.
These are the folders/files missing in Grails 3.0.1
folders
conf,
doc,
plugins,
script
files
build.properties,
readme

Grails 3.0 was a complete re-write of Grails and lots of things have changed. Not the least of which is the folder and file structure. Since Grails 3.0 is based on Spring Boot and Gradle a lot of what was very Grails specific has been removed and replaced with both of these.
This blog entry gives a good amount of detail on what has changed in Grails 3.0. It even talks about directory/file structures.

Related

Intellig IDEA x Grails

I tested several IDEs for developing grails applications. Tested the Spring IDE, did not like because I thought slow and crashes every time.
Tested by netbeans, and the result was the same as before.
Was reading about IntelliJ IDEA. Current problem, even doing the command "grails integrate-with --intellij" mentioned on the website https://grails.org/IDEA+Integration not enabled the option of creating projects in grails .
After running the command above returns nothing.
What should I do?
you will need the ultimate edition of IntelliJ to get grails support
With ultimate you can simply open an existing grails project (see this answer) or create a project from the File/New Project... menu.
grails integrate-with --intellij creates three files in the directory (yourproject.(iml|ipr|iws)). You can open the .ipr file with IntelliJ and have the project loaded (it might ask to convert the file).
Also you can just create new project (pick Gradle and then Grails) or you can just use the directory as existing source where you create-app-ed your project and IntellIj will see, that it is Grails.
Be aware, that it will only work with the Ultimate Edition and not the Community Edition

How do I configured GGTS 3.4.0 to use the internally shipped Grails runtime?

I've been using a previous version of GGTS with an externally configured Grails 2.1.1 runtime path. Upgrading to GGTS 3.4.0 I'd like to use the Grails that ships with GGTS (2.2.4), but I don't know how to configure the preferences to use the internally shipped grails version.
I skip the option to install Grails from GGTS/STS when I install it - I prefer to manage that myself. Go to Window|Preferences and then to the Grails node under the Groovy node. You can easily add as many Grails installations as you want from there, and choose which one is the default.
I found the answer. I did a brand new install and noticed that a brand new install creates a grails-2.2.4 sub-directory. The upgrade does not give you the option and I assumed it would.

I can't create Grails project in Intellij 11

I can't find the way to create Grails project. When i choose New Project --> Create project from scratch, I don't see anywhere to choose Grails project, how can i configure this issue? And how can i run Grails app?
Just use: File => New Project => Create project from scratch
In the modal form after that is shown after, you can select 'Grails' as the project type.
If you don't see this option, that is because you have installed the Community Edition of IntelliJ, which has no Grails support. You need the Ultimate Edition for that. Trust me, it's worth it.
Look here for a comparison sheet
Create the Grails app on the command-line using:
grails create-app myapp
In IntelliJ, create a new project, or open an existing project. Then in the File menu, choose New Module and choose the option "Import Grails application from existing sources"
http://grails.org/doc/latest/guide/gettingStarted.html#requirements
You can still use Community Edition for Grails development, but you will miss out on
all the Grails specific features like automatic
classpath management, GSP editor and quick access to Grails commands.
To integrate Grails with Community Edition run the following command
to generate appropriate project files:
grails integrate-with --intellij

Grails Paypal plugin with Netbeans

I downloaded and installed the paypal plugin http://www.grails.org/PayPal+Plugin using netbeans. Though the website mentioned there will be a controller and domain class created. However, I don't see it. Can someone advice if I installed correctly?
The Controller and domain class are located within the plugin itself. Browse the source of the plugin to see them.
The plugin is probably located in a hidden directory under your profile. Not the Netbeans project folder. For instance on grails 2.0 on Linux:
/home/user/.grails/2.0.0.M2/projects/testapp/plugins/paypal-0.6.4.
Each plugin is like a complete project with directory structure.
Your project has use of the plugin when it's installed, and includes it when you build it.

Effective grails plugin development

This has been very upsetting for me up till now. Here is what I am trying to do:
IDE I'm using is Intellij IDEA.
Building a grails application.
Grails application specifies two dependencies on in house grails plugins also being developed in IntelliJ as separate grails plugin projects.
Now to make any changes to plugins, I update the source code in plugin projects and use mavan-install (Maven Publisher plugin) to deploy to local Maven repository.
I have to uninstall the plugin in core grails project. Delete the plugin cache from ivy and then run the core grails project which gets the latest copy of plugin from local maven repository.
What's the effective and ideal way to achieve this? A single change makes me do some 5 minutes of labour work to even test and run core application.
Any recommendations/ best practices?
Use inline plugins for this - see section "Specifying Plugin Locations" in http://grails.org/doc/latest/guide/12.%20Plug-ins.html#12.1%20Creating%20and%20Installing%20Plug-ins
By specifying the plugin project directory with grails.plugin.location.<plugin-name> as the location of the installed plugin, you can edit the real files and the changes will affect the test application, and there's no need to sync anything up.

Resources