0

I cant find a way to open a grails 3.3.8 project in netbeans 9 on the mac.

I have found several posts (see below) but none of them work.

This one says create the project via the command line, e.g. "grails create-app hello", then use The "open project" dialog to open the hello directory. However, when I open the hello grails application directory, the project name field is greyed out, and hitting the open button has no effect.

This article says to create the project using the grails plugin for netbeans. It says to go the plugins dialog in netbeans and search for grails. There is no grails plugin.

grails and java are installed with the required exports. Note, I installed netbeans from https://github.com/carljmosca/netbeans-macos-bundle as recommended in the official netbeans install guide.

Suggestions anyone?

Halvor Holsten Strand
  • 19,829
  • 17
  • 83
  • 99
John Little
  • 10,707
  • 19
  • 86
  • 158

1 Answers1

1

Well, I found an obscure post which lead to the answer.

It seems that they removed most of the plugins from netbeans 9, including the grails one.

A work around (not sure how safe it is) is to add the netbeans 8.2 provider:

Go to Tools | Plugins in Apache NetBeans (incubating) 9.0 and, in the Settings tab, register the NetBeans IDE 8.2 update center:

http://updates.netbeans.org/netbeans/updates/8.2/uc/final/distribution/catalog.xml.gz

Thanks to: https://blogs.apache.org/netbeans/entry/what-s-happened-to-my

I can now open a grails project, but I cant run it. It says "Grails home has not been set. Use menu Tools/Options/Groovy to set the environment."

The problem is, I have already set GRIALS_HOME in my .bash_profile,and that there is no options under tools menu.

tools menu with no optoins

After some effort, I found the grails home setting in Netbeans Menu->preferences->Miscellaneous-Groovy:

enter image description here

Now I can run grails programs, and also use the menus to create domain objects etc. Nice!

John Little
  • 10,707
  • 19
  • 86
  • 158
  • [1] Try **Tools > Options > Miscellaneous >** select the **Groovy** tab >**, then select the location of your Grails directory in the **Grails Home** field. You may need to click the **Activate Groovy** button on the Groovy tab before doing that. [2] Also see this answer to [Why I can't create new grails application in Netbeans 8.2?](https://stackoverflow.com/a/50429300/2985643). – skomisa Oct 16 '18 at 06:53
  • In netbeans 9, when you click on the tools menu, there is no menu item for options, and no dialog with options. I guess they changed it. I eventually found it under Netbeans menu->preferences->Miscellanious tab. A lot of time was wasted. – John Little Oct 16 '18 at 09:40
  • They didn't change anything with respect to **Options**. If NetBeans 9.0 is installed correctly there is definitely a menu entry named **Options** under **Tools**, and there is no entry named **Preferences** (which exists in Eclipse, but not in NetBeans). Can you post a screen shot of the menu entries in your **Tools** menu because if **Options** is missing and **Preferences** is present then something is very wrong with your installation of NetBeans 9.0. – skomisa Oct 16 '18 at 15:04