Annoying SNAPSHOT releases in Grails list-plugin-updates command - grails

Is there a way to tell the Grails list-plugin-updates command to ignore SNAPSHOT releases?
bash-3.2$ grails list-plugin-updates
Plugins with available updates are listed below:
-------------------------------------------------------------
<Plugin> <Current> <Available>
resources 1.2.8 1.2.9-SNAPSHOT
remote-pagination 0.4.6 0.4.7
platform-core 1.0.0 1.0.1-SNAPSHOT
mongodb 2.0.1 3.0.1
mail 1.0.5 1.0.6-SNAPSHOT
joda-time 1.4 1.5-SNAPSHOT
hibernate 3.6.10.15 3.6.10.16-SNAPSHOT
There have been many times when a "real" update has been obscured by a SNAPSHOT release, so I still have to check the Grails website to see the current versions. We are building a production system and almost never want to include a SNAPSHOT release of any plugin.
Documentation:
http://grails.org/doc/latest/ref/Command%20Line/list-plugin-updates.html

Not currently no but it seems like it should be ignoring snapshots so feel free to raise a JIRA issue (and even contribute a fix!)

Related

Issue while running dataflow

I am getting below error while running dataflow job. I am trying to update my existing beam version to 2.11.0 but I am getting below error at run time.
java.lang.IncompatibleClassChangeError: Class
org.apache.beam.model.pipeline.v1.RunnerApi$StandardPTransforms$Primitives
does not implement the requested interface
com.google.protobuf.ProtocolMessageEnum at
org.apache.beam.runners.core.construction.BeamUrns.getUrn(BeamUrns.java:27)
at
org.apache.beam.runners.core.construction.PTransformTranslation.(PTransformTranslation.java:58)
at
org.apache.beam.runners.core.construction.UnconsumedReads$1.visitValue(UnconsumedReads.java:49)
at
org.apache.beam.sdk.runners.TransformHierarchy$Node.visit(TransformHierarchy.java:666)
at
org.apache.beam.sdk.runners.TransformHierarchy$Node.visit(TransformHierarchy.java:649)
at
org.apache.beam.sdk.runners.TransformHierarchy$Node.visit(TransformHierarchy.java:649)
at
org.apache.beam.sdk.runners.TransformHierarchy$Node.visit(TransformHierarchy.java:649)
at
org.apache.beam.sdk.runners.TransformHierarchy$Node.access$600(TransformHierarchy.java:311)
at
org.apache.beam.sdk.runners.TransformHierarchy.visit(TransformHierarchy.java:245)
at
org.apache.beam.sdk.Pipeline.traverseTopologically(Pipeline.java:458)
at
org.apache.beam.runners.core.construction.UnconsumedReads.ensureAllReadsConsumed(UnconsumedReads.java:40)
at
org.apache.beam.runners.dataflow.DataflowRunner.replaceTransforms(DataflowRunner.java:868)
at
org.apache.beam.runners.dataflow.DataflowRunner.run(DataflowRunner.java:660)
at
org.apache.beam.runners.dataflow.DataflowRunner.run(DataflowRunner.java:173)
at org.apache.beam.sdk.Pipeline.run(Pipeline.java:313) at
org.apache.beam.sdk.Pipeline.run(Pipeline.java:299)
This usually means that the version of com.google.protobuf:protobuf-java that Beam was built with does not match the version at runtime. Does your pipeline code also depend on protocol buffers?
UPDATE: I have filed https://issues.apache.org/jira/browse/BEAM-6839 to track this. It is not expected.
I don't have enough rep to leave a comment, but I ran into this issue and later figured out that my problem was that I had different beam versions in my pom.xml. Some had 2.19 and some had 2.20.
I would do a quick search of your versions in the pom or gradle file to make sure they are all the same.
This may be caused by incompatible dependencies. I successfully upgraded beam from 2.2.0 to 2.20.0 by upgrading the dependencies at the same time.
beam.version: 2.20.0
guava.version: 29.0-jre
bigquery.version: v2-rev20191211-1.30.9
google-api-client.version: 1.30.9
google-http-client.version: 1.34.0
pubsub.version: v1-rev20200312-1.30.9

Should Grails 3.x plugin name always include 'org.grails.plugins:'?

Are Grails 3.x plugin names supposed to be org.grails.plugins:$project.name or just $project.name?
The default from https://raw.githubusercontent.com/grails/grails-profile-repository/master/profiles/plugin/templates/bintrayPublishing.gradle is org.grails.plugins:$project.name, but at https://bintray.com/grails/plugins/ some plugins include org.grails.plugins: and some do not.
As far as I can see there is no clear pattern that "official" plugins include org.grails.plugins: and third party plugins don't.
Update: bintrayPublishing.gradle referenced above has now changed the default name to $project.group:$project.name. The name is just a name, it is not used for dependency resolution in any way. But with the latest changes it is easier to see what the maven groupId and artifactId is.
Update 2: bintrayPublishing.gradle has changed the default again, now it's just $project.name. Starting from Grails 3.1 bintrayPublishing.gradle has been replaced by a plugin. See also question 2 in this blog post
i am using grails 3.0.5
after i trying to install plugin... i am become know..like this..
compile "org.grails.plugins:mail:2.0.0.RC2" ==> this plugin from grails.org
compile 'org.apache.activemq:activemq-spring:5.11.1' ==> this plugin from activemq.apache.org
compile "com.sun.mail:javax.mail:1.5.1" ==> this plugin look like from oracle
so not all plugin must include org.grails.plugins

Grails 2.4.3 app auto reloading not working

Unable to reload grails application at runtime, My current development environment:
Grails app version 2.4.3
JDK: 1.7.0_21
I have added following setting in my BuildConfig file
grails.servlet.version = "3.0"
grails.reload.enabled = true
Some links
After going through different stack overflow links such as,
Grails auto-reloading new controller actions
I Checked springloaded jar file, tested app by replacing jar with snapshot jar from here.
Checked java version required by Grails 2.4.3
After checking some JIRA issues, I upgraded my Java version to latest java 1.7 version and tested app.
What is affecting to reload app at runtime?
grails -reloading run-app
after this your application starts reloading automatically.
After lots many debugging and checking online resources I succeeded to reload my app
Solution:
While running my grails app, I come across some java ioexception (user limit of inotify watches reached) which was restricting reloading of my grails app.
Updated system inotify watch limit link
Replaced springloaded jar shipped with grails 2.4.3 with snapshot version
(Check this link https://jira.grails.org/browse/GRAILS-11728)

Grails 2.4.0 - Error: ClassNotFoundException: grails.plugin.spock.test.GrailsSpecTestType

Whenever I enter the grails command: test-app I get this error:
Error executing script TestApp: java.lang.ClassNotFoundException: grails.plugin.spock.test.GrailsSpecTestType (Use --stacktrace to see the full trace)
In my BuildConfig.groovy I have:
grails.project.dependency.resolution = {
...
plugins {
...
compile ":spock:0.7"
}
}
I've tried replacing it with test ":spock:0.7" . I've also tried cleaning the application and refreshing the dependencies but no luck.
Any ideas what it could be and how I could fix it?
Thanks
With Grails 2.4.0 you don't need to make any mention of Spock in BuildConfig.groovy. See the sample project at https://github.com/jeffbrown/spockdemo.
When you can, you should look at upgrading to the latest in the 2.4.x line. A number of issues have been addressed since 2.4.0 was released.
I hope that helps.
#zzKozak is correct - you should upgrade. It has no bearing here, but getting to the latest version of Grails within your minor version (in this case 2.4.3) should happen before you ask others for help with issue that could have been fixed youself with a simple upgrade.
In 2.4, Grails switched to Spock tests by default, and you have to uninstall the old plugin since they're incompatible. Delete that line in BuildConfig.groovy and change your base classes to core the new Grails/Spock base classes. For integration queries, use grails.test.spock.IntegrationSpec. For unit tests and more information about this, check out the testing section in the docs: http://grails.org/doc/latest/guide/testing.html

What Grails Version is Needed for WeCeem

I have literally tried every possible combination that I can think of to install weceem as a plugin into an existing sample application that I'm practicing grails development on, nothing has worked. I've tried all the recommended repositories in various combinations and that did not work. I have tried several versions of grails between 2.3.7 to 2.4.2 and cannot get it to work. I followed the documentation on the site for installing the plugin and was not able to get it to successfully work.
Is there another CMS that runs in grails applications that's worth looking at?
Yes, there is one (indeed a new one) called spud cms which can be used. BTW, what was the error you were getting while using weceem plugin?
The plugin should be defined in the plugin section in BuildConfig.groovy as:
plugins {
compile ":weceem:1.2"
}
The plugin should work for version of grails-2.3.x (version 2.3.7 should be ok -- the demo application for weceem you can find there https://github.com/jCatalog/weceem-app ); the version of grails-2.4 is not supported yet in weceem-1.2 (but should be supported in new release that is planned in month or two). Please, provide the error stack-trace, to see the problem.
After some help from July Antonicheva, this is what I did to get it working:
1) Switched to NetBeans IDE
2) I downloaded version 7 of Java (Oracle)
3) Created a brand new project based on Grails 2.3.7
4) Added weceem plugin and made some adjustments to Datasource.groovy to add MySQL support
Everything is working fine now without errors. The current version of weceem needs Grails 2.3.7 and Java 7 in order for it work. I mentioned that I switched to NetBeans IDE, I found it to be a little easier to work with than eclipse and for some reason it seemed to run a little faster.

Resources