beckje01 / grails-code-coverage

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

When a grails directory is missing, plugin throws an error #15

Closed tomaslin closed 11 years ago

tomaslin commented 11 years ago

When a grails directory that is hardcoded within the plugin is missing, an error is thrown:

| Error Error executing script TestApp: : /Users/tomaslin/malo/grails-app/utils does not exist. (NOTE: Stack trace has been filtered. Use --verbose to see entire trace.)
: /Users/tomaslin/malo/grails-app/utils does not exist.
    at org.apache.tools.ant.types.AbstractFileSet.getDirectoryScanner(AbstractFileSet.java:483)
    at net.sourceforge.cobertura.ant.CommonMatchingTask.baseDir(CommonMatchingTask.java:231)
    at net.sourceforge.cobertura.ant.CommonMatchingTask.createArgumentsForFilesets(CommonMatchingTask.java:164)

This makes running the tests within an CI system fail.

An example is here - https://netflixoss.ci.cloudbees.com/job/asgard-pull-requests/186/console

To reproduce this, create an empty grails app, add code coverage plugin and run tests after deleting the grails-app/utils directory.

The problem will happen when checking in the grails app into git and it ignores the empty directories.

Would be nice to be able to tell plugin to just ignore the error when the directory is not there.

beckje01 commented 11 years ago

This is only a problem in Grails 2.3 since before that the util directory would be created when test-app was run.