IntelliJ 12.0.1 - Grails 2.3.X Distribution in specified path is broken - grails

I am struggling to configure grails 2.3.X in IntelliJ idea 12.0.1. Grails 2.2.X is configured successfully.
Grails 2.3.2 is working properly from terminal. I can compile, test, run my application. But while trying to configure it in IntelliJ so that dependencies get resolved, I get the IntelliJ shouting straight to me(as pictured below).
Looks like Grails Distribution in specified path is broken. Cannot
determinate version.
What I see is changes in grails-2.3.x/dist/ to earlier version's grails-2.2.x/dist/.
Is this because there's no support for newer version(2.3.x) of grails in IntelliJ 12 or what ?
I want nothing else but my application (jar) dependencies to be resolved in the IDE.

Make sure you are running the latest version of IntelliJ IDEA - v12.1.6. There was a "Grails 2.3.0 not working" bug fixed in 12.1.6.
You may also want to take a look at the Grails SDK is not configured question. One of the IntelliJ IDEA developers has a detailed answer in that question that may help.
Also, this thread on the IntelliJ IDEA forum may be useful.

For Information to reload the dependencies in IntelliJ 12.1.6 , following path works fine.
Tools
-> Grails
-> Synchronize Grails settings

Related

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.

Errors when upgrading a Grails Project Groovy\Grails Tool Suite

I'm trying to run a Grails Application from the Grails In Action website. I've imported the 'hubbub' project into the GGTS app and have encountered build errors. The project was originally built with Grails 2.3.7 whereas I have version 2.4.4 on my system. Based on another Stack Overflow question I've changed the 'app.grails.version' in the application.properties file to grails version 2.4.4 which prompted a flurry of downloads in the command prompt terminating in a series of errors regarding problems with plugins. I can't run the app because I'm told that "Project 'hubbub' is missing required source folder: grails-app/utils". If I try to change 'app.grails.version' back to 2.3.7 I'm told that I need to configure a Grails installation of 2.3.7.
Am I doing something wrong here in trying to upgrade this Grails project? Or do I really have to install Grails 2.3.7 in order to get this to work?
(Sorry, I haven't posted the errors regarding plugin downloads but I can't seem to recreate them).
Thanks in advance!
Grails 2.4 is a big change over 2.3, mostly due to the use of the asset pipeline instead of resources.
Also simply changing the version in application.properties isn't enough, you also need to actually run the matching Grails framework.
See here for upgrading an app from 2.3 to 2.4: http://grails.github.io/grails-doc/2.4.x/guide/upgradingFrom23.html . From experience upgrading Grails apps from older versions must be done manually. One reason is that the upgrade command is obsolete and has been removed. Read the docs for breaking changes and address each change individually in the code. Upgrading patch levels are no problem (usually), but upgrading minor and major versions often are a lot of work.
Since you are learning, I would stick to 2.3.7 for your exercise (meaning that you must run 2.3.7, which you aren't doing). What you'll learn will remain valid. Do use 2.4.4 when building your own project from scratch.
If your project only missing grails-app/utils, try just to create it.
Take a look in your Project Properties -> Build Path. There are all the source folder defined. It can be helpful

Grails autocompile broken after upgrade from 2.1 to 2.2.4

I hope you might can help me.
I recently upgraded our grails project from version 2.1 to 2.2.4 and now the autocompile/reload is broken => Everytime a make changes in Controller/Services/Taglibs I have to restart the app to see them.
Console attributes like in this thread Grails autocompile not in development environment don't work for me. I also did some research on google but I couldn't find anything which helped.
Thanks for your help!
Edit:
Thanks for your help so far, I could solve the problem. I have updated the system class path to the path of the new grails version, now it works :-). It's somehow strange as the sdk was set correctly in Intellij Idea.
If you are using IntelliJIdea try using: (Tested on IntelliJIDea 11 and 12 with grails 2.2.2)
EDIT: Jar version case also included for different grails versions.
grails -Dserver.port=8096 -javaagent:${GRAILS_HOME}/lib/org.springsource.springloaded/springloaded-core/jars/springloaded-core-1.1.x.jar -Xverify:none run-app
NOTE: where 1.1.x is the version of jar in case of grails 2.2.2 it is 1.1.1 and in case of 2.2.4 it is 1.1.3
But, if you are using command line try using
grails -reloading run-app without any "-D" system property reloading should work fine. (Not tested though) Reference: http://jira.grails.org/browse/GRAILS-8951?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Issues with upgrade to Grails 2.2.0 using GGTS

Iā€™m trying to upgrade Grails to version 2.2.0. I used gvm and installed Grails 2.2.0. After this I changed my project in GGTS to use Grails version 2.2.0 and Groovy version 2.0.0. But when I finally tried to run the project, I got the following error:
Error occurred during initialization of VMError opening zip file or JAR manifest
missing : null
agent library failed to init: instrument
What is the problem?
We had the same problem.
This is due to eclipse saving old run configuration for the previous grails version.
Just remove old launch configuration and retry.
To remove old launch configuration :
go to Run\RunConfiguration\Grails
select all nodes and remove them.
I had the same problem when I started using Grails 2.2.0 - The solution Ian mentioned works, here is the link to the issue and resolution that occurred in my project
Grails 2.2.0 error
Added on 1/15/2013 Other suggestions based on 2.2.0/ivy cache issues
I am running on windows, a couple of things to try.
Based on your error message seems like the issue might be related to the Ivy cached, I would suggest cleaning that out using the clean command.
I would also go ahead and delete the Icy cache folders on your machine at \ivy-cache(after backing it up just in case)
Read grails documentation at http://grails.org/doc/2.0.0/guide/gettingStarted.html, refer to section 2.3 regarding Ivy cache ā€“ there might be issues running 2.x and 1.x grails projects side by side.
When install, I do not have to install groovy explicitly - I just install grails and that take care of the groovy code implicitly. Is that possible for you to do? To rule out dependency issues?
On my version of grails I have the groovy version showing up as 2.0.5 ā€“ I assume you meant grails 2.2.0 ā€“ can you ensure that you have a groovy version installed with is compatible with grails 2.2.0?
If possible try your code on a fresh device where grails has not been installed before. This is to rule out interference due to other existing issues
It's a known issue to do with the fact that the version of the springloaded reloading agent used by 2.2 (and 2.1.3) has a different name from that used by previous versions of Grails. There's a workaround in the bug report, or you can upgrade to a nightly build of GGTS which knows about the new name (as described in this bug report).
I am using GGTS 3.2 with Groovy compiler 2.1.1 on Windows XP.
Had imported a project from GGTS 3.1, upgraded compiler to 2.1.1 and got in mess, so
deleted the project and removed it from .grails cache, then re-created project from scratch. When it came to running the project I got the ivy error.
Removing the old launch configuration via Run->RunConfiguration...Grails fixed problem without switching to a night build of GGTS.
(BTW Deleting ivy-cache didn't help at all)

creating a Grails application in IntelliJ IDEA 9.0.x fails to prompt for "create-app"

When I create a Grails application in IntelliJ 9 on Snow Leopard I am not prompted to create an application. IntelliJ finished the wizard and creates an empty project that is not a Grails application. I have tried two different Apple computers (MacBook Pro and Mac Pro) it does not work on either. The same steps on a Linux system results in a prompt to "create-app" and a Grails application.
I have already tried the steps in Intellij IDEA setup on OS X
Is there a specific place that Grails needs to be installed? Has anyone else seen this behavior?
Thanks
Answer: Make sure that the grails directory is writable.
Just tried this on Snow Leopard running Intellij 94.633 (EAP) + grails 1.2.1 and the create new project wizard has worked just fine.
Started with 'create new project', selected a grails module, was then prompted to 'create-app' or 'create-plugin' and was presented with a completed project.
Might be an idea to try the same EAP build if no joy you will have to file a bug with jetbrains. They are pretty good at responding to issues, you should get some sort of feed back pretty soon.
This is actually the first time I've actually done that in intellji, previously I've always just used the grails command line and then just imported the application to Intellij.
Make sure that the grails directory is writable.
I moved my grails install from /opt/grails-1.2.1 to /Users/dave/grails-1.2.1 and I can now create or import grails applications.

Resources