I am developing a grails application which has codenarc plugin. And also I am using hudson build tool. I am integrating the application with hudson build tool. In the hudson I have configured violation plugin. But when I build the app I am getting following error.
hudson.util.IOException2: Cannot parse CodeNarcReport.xml
at hudson.plugins.violations.parse.AbstractTypeParser.parse(AbstractTypeParser.java:64)
at hudson.plugins.violations.ViolationsCollector.doType(ViolationsCollector.java:189)
at hudson.plugins.violations.ViolationsCollector.invoke(ViolationsCollector.java:116)
at hudson.plugins.violations.ViolationsCollector.invoke(ViolationsCollector.java:27)
at hudson.FilePath.act(FilePath.java:757)
at hudson.FilePath.act(FilePath.java:739)
at hudson.plugins.violations.ViolationsPublisher.perform(ViolationsPublisher.java:74)
at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)
at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:622)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:601)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:579)
at hudson.model.Build$RunnerImpl.post2(Build.java:156)
at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:548)
at hudson.model.Run.run(Run.java:1386)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:145)
Caused by: java.lang.NullPointerException
at hudson.plugins.violations.model.Violation.compareTo(Violation.java:192)
at hudson.plugins.violations.model.Violation.compareTo(Violation.java:8)
at java.util.TreeMap.put(Unknown Source)
at java.util.TreeSet.add(Unknown Source)
at hudson.plugins.violations.model.FullFileModel.addViolation(FullFileModel.java:24)
at hudson.plugins.violations.types.codenarc.CodenarcParser.parseFileElement(CodenarcParser.java:90)
at hudson.plugins.violations.types.codenarc.CodenarcParser.execute(CodenarcParser.java:47)
at hudson.plugins.violations.parse.AbstractTypeParser.parse(AbstractTypeParser.java:59)
... 16 more
Can anyone please help me to fix this issue?
Grails version : 1.3.7
Hudson version : 1.398
By updating violation plugin to 0.7.8 snapshot version fixed the issue. Download link
I recommend asking CodeNarc questions on the CodeNarc mailing list.
Also, be aware the the Hudson/Jenkins plugin usually has an older version of CodeNarc bundled with it. It's not maintained by the CodeNarc team. I recommend sticking with the Grails plugin, which is maintained by the team.
Thanks,
Hamlet (CodeNarc developer)
Related
I am new to libGDX, just planning to create a new project. but the generation of project fail with this error displayed
"Could not detemine java version '9.0.1'.
I have linked the SDK path like how I linked it in android studio. need help. I found it might be something to do with the gradle version. do you guys know how to let libGDX uses the latest gradle?
Check this issue, already in libgdx issue tracker.
According to this discussion, Gradle update may solve this issue so wait for this issue to be resolved.
I want to add static code analysis plugin to eclipse (Eclipse Mars 4.6). For that I added sonarlint plugin which contains rules for groovy project as well. But it could not analyse groovy files or can give any suggestions for the same.
I searched over net and found codenarc can be used for the same and sonarlint is also using reports by codenarc but codenarc plugin for eclipse is available till eclipse 4.1 only, not supported for the versions higher than that.
Has anybody tried anything to do static code analysis with groovy.
Thanks
Unfortunately, you are correct. The eclipse plugin has not been updated in a while. If you are interested in taking that over, it would be much appreciated. As an alternate solution, you can use codenarc at the build tool level. Depending on your system, there should be a plugin for you: http://codenarc.sourceforge.net/codenarc-other-tools-frameworks.html
I'm writing my thesis and I would like to know since what version of gradle have they added the daemon to drastically reduce the build times?
I found the answer on the official Gradle website. The daemon was added in version 1.0 and was enabled by default since version 3.0.
There are many sites which provides articles for upgrading liferay 6.2 to dxp but only for ant project. How can we upgrade liferay 6.2 maven project to liferay dxp gradle project ?
The strategy to upgrade your code is exactly the same. Liferay's Plugins SDK defaulted to Ant until 6.2, now you have the choice between liferay-workspace (gradle based), gradle and maven - just choose the build environment you'd like (sounds like you'd like to continue with maven) and add your code to an empty blueprint for the project of your choice.
There's an upgrade tool in Liferay IDE that might help you - even if it doesn't use the build tool of your choice or if eclipse isn't the IDE of your choice: The upgrade tool is a one-off tool to use during upgrade. No matter what the result is on: You can always check (for example) Liferay's blade-sample project to find the proper build descriptors for Maven - and adapt them to your project.
Edit: After the clarification: Your main task is still the upgrade of the code. As of moving from Maven to gradle: Identify the dependencies and translate from pom.xml syntax to gradle's declaration - the contents are similar (e.g. group, name, version), only how you're writing them down is different. If you have made elaborate custom modifications to your pom.xml try to go without them first. You can start with a stock build.gradle (e.g. from blade-samples that most closely match your project) and then fix compile-time dependencies as you go.
I'm not aware of an automated process that does this translation for you (and most likely you'd bump up a few version numbers in the process anyway)
I'm new to Griffon.
But I installed Grails and currently creating projects on Grails in NB7.4. Because there is a default option in NB7.4. Grails working smooth.
Now(at this time of writing) in NB plugin portal there is a griffon plugin. But it supports only for NB7.1. I tried installing it on NB7.4, but it throws many errors while creating projects.(Project not created - It cannot create a project).
How to create Griffon apps on NB7.4. I tried google, but there is no support for NB7.4.
Help me on this topic. Also i need your suggestions and tips to run Griffon on NB7.4.
Hint: Actuall I'm trying to upgrade to Groovy-Griffon. Now I'm creating apps for shops on JavaSwing. I read Griffon it is amazing, so i planned to upgrade my work and knowledge.
Short answer is that the NetBeans Griffon plugin doesn't work very well with latest versions of NetBeans. This is due to changes made back in Griffon 0.9.5 on how dependencies are resolved.
Griffon doesn't really need an IDE but if you must then allow me to suggest you IntelliJ IDEA; the community edition comes with a Griffon plugin that works much better.
But you still have to resolve dependencies out side of IDEA, that is, calling the griffon --integrate-with --idea command from the command line, every time you update BuildConfig.groovy or install/uninstall a griffon plugin on your project.
Up to now(at the time of writing this) NB Griffon Plugin is not updated to support NB7.4.
NB7.4 have inbuilt support for Grails. I can create Grails apps directly.
NB Griffon plugin needs to be updated for NB7.4. Or NB team needs to add this support.