beckje01 / grails-code-coverage

Git Repo of the Grails Code Coverage plugin.
http://grails.org/plugin/code-coverage
16 stars 26 forks source link

ClassNotFoundException (Jenkins) #6

Closed davidadale closed 11 years ago

davidadale commented 11 years ago

I am getting this error when I try to build using Jenkins.

grails "test-app :unit -coverage -xml" "test war"

Fails trying to build the war

Error Error loading plugin manager: java.lang.ClassNotFoundException: CodeCoverageGrailsPlugin (Use --stacktrace to see the full trace) Build step 'Build With Grails' marked build as failure Skipping Cobertura coverage report as build was not UNSTABLE or better ... Finished: FAILURE

beckje01 commented 11 years ago

What version of grails are you using?

davidadale commented 11 years ago

Sorry misread the question. I am using Grails 2.2.3

This is what I have in my BuildConfig.groovy

test ":code-coverage:1.2.6"

If I change it to

compile ":code-coverage:1.2.6"

the build completes but the app fails to start complaining about the ClassNotFound same thing.

Let me try to remove the post processing -nopost

davidadale commented 11 years ago

Changing it to -nopost didn't help

beckje01 commented 11 years ago

ok I will try and reproduce thanks for the details

davidadale commented 11 years ago

Hey I have a fix on this.

Instead of using test ":code-coverage:1.2.6"

use

build ":code-coverage:1.2.6"

That Works!!

Thanks for your quick response on this.

beckje01 commented 11 years ago

Interesting do you have to build the war as test? I think that is what is causing it.

davidadale commented 11 years ago

Yah, in our case we are using the test settings as the settings for our test environment. You're probably right about that but it's working now.

On Fri, Jul 19, 2013 at 4:54 PM, Jeff Beck notifications@github.com wrote:

Interesting do you have to build the war as test? I think that is what is causing it.

— Reply to this email directly or view it on GitHubhttps://github.com/beckje01/grails-code-coverage/issues/6#issuecomment-21276766 .