I'm using Grails2.3.8 with codenarc 0.21, executing it using
grails --non-interactive codenarc
To install the codenarc plugin, I have in BuildConfig.groovy, grails.project.dependency.resolution, section plugins, the following:
provided ":codenarc:0.21"
I've also moved mavenCentral() to be before grailsCentral() in the repositories section (saw a suggestion about that somewhere).
On one machine I faffed around a bit, and it's working. On the first build on our integration machine I saw it install codenarc the first time it ran, then display a line with: codenarc uninstalled
And now each time it runs I get the error: Script not found: Codenarc
I've tried adding
grails refresh-dependencies
to the build, but no luck.
I expect I could faff around on the build machine and get it to work somehow, but that wouldn't be repeatable in future.
What can I do to make the codenarc plug-in install reliably?
As so often, writing the question prompted me to investigate a different area.
Changing the BuildConfig.groovy, grails.project.dependency.resolution, section plugins, line to:
compile ":codenarc:0.21"
Fixed the problem - see Grails BuildConfig.groovy, difference between build, compile, and runtime? for the meanings.
It adds another 4Mb to the build, but I can live with that. The problem may be a bug in the provided implementation in Grails.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.