On the Grails Plugin Site (http://www.grails.org/plugins/), every plugin lists the versions of Grails that it is compatible with; something like Grails version : 1.2 > *.
Does this mean that the plugin is compatible with all versions of Grails starting with 1.2 or up to 1.2?
Yes, it means that version is supported for mentioned and above versions. But do read that whether the plugin is deprecated or not. For that you need to go to plugin and then see the details at the bottom.
For example, Cloud Foundary is depreciated but it is still listed on Grails plugin page.
http://www.grails.org/plugin/cloud-foundry
Related
I need to setup a Windows working environment for Grails. I'd like to use GGTS as an IDE but got several errors compiling a sample project. Currently I'm using jdk1.8.0_40 and Grails 2.5.0. which results in this error (but in the end the project is working):
Groovy:Unexpected problem with AST transform: The Spock compiler
plugin cannot execute because Spock 1.0.0-groovy-2.4 is not compatible
with Groovy 2.3.10. For more information, see http://versioninfo.spockframework.org
On top of that there are two Java Exception Breakpoints which are listed as "unknown". Only info regarding version support I could find is:
Java SDK 1.5+ for Grails 1.2 or greater
GGTS itself seems not to run with the latest grails (3.0.1) since I simply cannot add it (directory appears not to be a grails installation).
Should I use Java 7 instead?
This issue is not related to JDK 1.8 or 1.7, but its is related to the GGTS IDE 3.6.4 Groovy Compiler version. As the error clarifies that Spock 1.0.0 version needs Groovy 2.4 compiler.
GGTS 3.6.4.RELEASE-e4.4.2 IDE comes with Groovy 2.3.10 compiler by Default.
Install Groovy Compiler 2.4 Feature and "switch to 2.4" will resolve this issue.
Refer: http://docs.codehaus.org/display/GROOVY/Compiler+Switching+within+Groovy-Eclipse
If you cannot switch compilers from the IDE Groovy Compiler preference page, follow the instructions to perform the switch from outside of Eclipse:
(Grails 2.5.0 uses Spock 1.0.0 (and internally Groovy 2.4.3 and this is why your project is compiling & working fine as the Grails runtime environment is taking over)
As an additional experience report to the answer above, thus providing another solution variant: I had to use the http://dist.springsource.org/snapshot/GRECLIPSE/e4.4 update site (as opposed to the release version mentioned in the link above) to make the 2.4 compiler feature available in the update manager.
After installation, the compiler errors are gone.
I noticed that project-specific groovy compiler is set in the Groovy Compiler preference page in new grails projects. By selecting "I don't care" for "Groovy compiler" it will default to the workspace groovy compiler which is usually correct (for me it's version 2.4). This worked for me but experience may vary.
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).
In Spring Tool Suite 3.5.1.Release , how do I set a project-specific Grails version?
I have multiple versions of Grails configured in STS.
Older versions of STS had a section called Grails in the "Properties for project" window where a particular version of Grails could be selected.
After upgrading to 3.5.1.Release I no longer see this option.
Thanks!
Since GGTS version 3.5.0 the Grails version GGTS uses now always follows the application.properties file in your project. So just change the grails version number in that file.
You may need to do some other things to actually upgrade your project to work with that newer version of Grails of course.
Please go through following step for customize your grails version in GGTS.
1) Go to Window toolbar.
2) Select Preferences.
3) Type grails on textbox and Search
you can see grails installations: where you can add and remove your different grails version. if you need to add grails version please add path of your grails version and select check box for that grails version. after adding and removing grails version you must click on OK button
Anyone know if I write a Grails plugin using Grails 2.2.1 (which uses Groovy 2.0) and use some Groovy 2.0 features e.g. #TypeChecked and if a Grails project that is using an earlier version of Grails and an earlier version Groovy use this plugin?
the plugins and groovy versions of course are not backward-compatible in terms of new features. you shall prepare a backward-compatible version of your plugin by removing groovy 2.x features out of it
this plugin requires plugin Editor Library to be installed.
The plugin Editor Library is requested in version >= 2.10.1.10.2 (release version 2) but only 3.46.1.22.43 (of release version different from 2) was found.
The following plugin is affected: Struts2 Support
Now i have resolved another plugin for Struts 2 support. This plugin is called Netbeans Struts2 Plug-in and its a re-pack for the plugin i was trying to install. Though this plugin in not certified but it is working good. The developers have tested it on netbeans 7.4 but i'm using it not netbeans8 and i have not suffered any issues.
I have found another way, that is using maven. That is also a good way but i would not recommend it if you have slow internet connection.