Google-analytics integration with grails 4.x app - intellij-idea

I am new to grails and I was working on the grails demo app from https://guides.grails.org/creating-your-first-grails-app/guide/index.html . Now this app is using grails version 4.0.1 and I want to use google-analytics plugin https://grails.org/plugin/google-analytics with the app.
The problem is I can't find "grails install-plugin [plugin-name]" also I am not sure if the google-analytics plugin works with grails 4.x. Is there any way I can integrate the google-analytics plugin with my app.
Note: I am using a macbook pro and Intellij IDEA as the ide.

The problem is I can't find "grails install-plugin [plugin-name]" also
I am not sure if the google-analytics plugin works with grails 4.x.
There is no install-plugin command in Grails 4 (or Grails 3). The way to install plugins is to add a dependency on the plugin to build.gradle.
Also, the plugin you linked (https://grails.org/plugin/google-analytics) is not a Grails 4 plugin.

Related

Migrate the existing custom Cordova plugin written in version 6.3 to 8.0. (MFP)

I would like to know what are the prerequisites to migrate plugin from v6.3 to 8.0. The code written for the plugin is in Java, should we any additional steps? or the same code(6.3) will continue to work for migration?
Can any one suggest any tool for plugin migration (like how we have for MFP Cordova application)?
As of MFP 8.0, MFP client SDK is a Cordova plugin. If you have developed a custom Cordova plugin, this should work fine with MFP 8.0 as well. You can add your custom plugin to the Cordova project and use it as you would any other plugin.
Custom plugins are developed to meet specific requirements and the native implementation is specific to respective platforms. This is outside of MFP and there is no tool for custom plugin migration. Developer needs to do it themselves if a code change to their custom plugin is warranted.

grails version update from 3.1.11 to 3.1.16

I have a grails 3.1.16 application. In that i'm using some plugins of grails 3.1.11. When i'm running my application with grails run-app command its working fine.But when i make the war file and deploy it to tomcat it is picking wrong version of some files.
Initially my app is in grails 3.1.11. But i need some improvements that are done in 3.1.16(BeforeValidateHelper implements serializable). So i have updated the version my grails-app to 3.1.16. .But my plugins are made in 3.1.11 version. When i'm running grails run-app its working fine(BeforeValidateHelper implemented serializable). But when i'm deplying it as war file to tomcat, its showing BeforeValidateHelper is not serializable.
when i open http://localhost:8080 its showing grails 3.1.16 version(which is correct).
But its picking files of grails 3.1.11(BeforeValidateHelper)

Using Atlassian QuickReload with java 7

Developing a JIRA Plugin and would like to use the QuickReload feature. However I am using the 5.0.x SDK and that uses Java 7. QuickReload appears to need Java 8. Is there a way to get this working for java 7?
I have successfully used QuickReload with Java 7 on JIRA standalone releases as far back as JIRA 6.1 (without regard to the Plugin SDK version in use).
To get this to work, you can download the QuickReload sources, build it as a JAR with atlas-mvn package, and then upload the JAR as a plugin to JIRA. Then add a quickreload.properties to the root of your JIRA install directory and everything should work as expected.
(I suppose it's possible that newer versions of quickreload might require a higher version of Java, but this worked fine as of commit a8e25f30fbd.)

Grails 3.0 adding an inline plugin

I created simple grails 3.0 applications using commands below:
create-app admin --profile=web
create-plugin core --profile=plugin
Now, I wanted to use core as an inline plugin in admin build, which is a web application.
We can easily do that in grails version < 3.0 in buildconfig. Where can I do that in grails 3.0. Every help is worth appreciated.
Recently I used an inline plugin in my grails 3 application. here is how I did it-
Make sure that your application and your plugin are on same parent directory.
Now go to build.gradle file of your application.
Add this line in dependencies:
compile project(':plugin_name')
Now go to settings.gradle file on your application and append these lines:
include 'plugin_name'
project(':plugin_name').projectDir = new File('absolute_path_of_pluin')
Inplace plugins have been replaced by multi project Gradle builds. See the Grails 3 functional test suite for an example https://github.com/grails/grails3-functional-tests

IntelliJ 12 Grails 2.1 Configuration - Grails SDK not configured

I feel like I'm missing something simple at this point. I upgraded to grails 2.1.1 from 1.3.7 while running IntelliJ 10, recently I upgraded to IntelliJ 12 and imported all settings. Somehow in the project in IntelliJ 12, I have no grails SDK.
My Global Library has grails 2.1.1 defined with all the correct .jars included, however, the Tools menu is missing the "Grails" sub-menu, and attempting to run the app gives the error message that Grails SDK is not configured.
If I create a new project for grails, the SDK configures correctly and Grails shows in the Tools menu. What am I missing preventing me from adding the Grails SDK to this project? Thank you, community, for your time and suggestions.
You do not have to create a new project.
Had the same problem, and it took me quite some search to resolve it:
right click your Grails module
click "Add framework support"
select "Groovy"
The dropdown next to "Use library" will allow you to choose a grails library.
If the dropdown is empty press "create" and choose your grails library directory.
Grails SDK is configured then
With Intellij 16 right click on your project in the right hand project pane.
Choose Grails->Configure Grails SDK.
If you're using the grails wrapper I would point to that SDK:
/Users/your user/.grails/wrapper/2.5.2/grails-2.5.2
I have the IntelliJ 12 too, to run app i just click in 'File' -> 'Create Project', select 'Grails Project'
Click Next,
Click em Create, select the folder, who contain the Grails 2, and Voila. :-)
If you has the project before, run in project 'grails integrate-with --intellij' or run import project, and create a Grails SDK
I found a symlink that points to the latest version in:
~/.sdkman/candidates/grails/current
I'm using SDKMAN 4.0.37
Pointing Intellij at that location will allow you to switch versions using sdkman.
Not really an "answer" here, but after seeing similar troubles with IDEA I went ahead and just created a new project and copied my source in and resolved my issues, if not solving the actual problem.
I am working with IntelliJ 12.0.1 ultimate.
I have installed Grails 2.3.1 on my computer, but always got errors when trying to specify it as a Grails SDK-
"failed to create library. Looks like Grails distribution in specified path is broken. Cannot determine version."
I tried with Grails 2.3.0, but got the same error.
Then, I tried my luck with Grails 2.2.4, and I could finally get it work.
Creating a New Project will actually not overwrite any existing code; just point it at your existing project directory, select Grails and open it up.
Your project will now complain that there is no Grails SDK; just point it at your Grails dist and you are good to go.
Recently, I've encountered a similar type of issue. I have the grails SDK folder, but OK Button not enabled when trying to configure from the project. Then we have installed the Grails Plugin in IntelliJ. Then OK Button enabled and grails SDK is configured into project.