0

I want to run codenarc on our jenkins it always fails and all I get in the output is

$ /opt/grails/bin/grails -Dgrails.work.dir=/var/lib/jenkins/.grails-codenarc codenarc --non-interactive
| Loading Grails 2.4.4
| Configuring classpath
| Running pre-compiled script
| Error Script not found: Codenarc
Build step 'Build With Grails' marked build as failure

Of course I included it in the BuildConfig.groovy

plugins {
   build ":tomcat:$tomcatVersion"

   compile ':codenarc:0.22'
   ...
}

Also, when I run it on the server within a bash as the jenkins user, it works perfectly and is creating the expected output files.

Any ideas?

Moritz
  • 489
  • 1
  • 5
  • 18

1 Answers1

3

If the build does a clean checkout you need to run grails compile before running any scripts to ensure the plugins are installed

Burt Beckwith
  • 75,342
  • 5
  • 143
  • 156