On 10/05/2011, at 4:02 AM, Marco Hunsicker wrote:
> Howdy,
>
> in my quest to produce code coverage metrics from my integration tests, I
> encountered another weirdness.
>
> In order to enable code coverage from within Eclipse, I've found no other way
> than to let EMMA instrument the plugin classes and include the instrumented
> classes via a buildscript dependency in the build script.
>
> It looks like this:
>
> buildscript {
> dependencies {
> // the instrumented plugin classes
> classpath fileTree(dir: '../../../../target/classes')
You probably want:
classpath files('../../../target/classes')
That is, you want to add the 'classes' directory to the classpath, not add each
file under 'classes'.
> ...
> }
> }
>
> allprojects {
> apply plugin: com.foo.Plugin
> }
>
> * What went wrong:
> A problem occurred evaluating root project 'foo'.
> Cause: Could not find property 'com' on root project 'foo'.
>
> The error stems from the fact that the 'com.foo.Plugin' cannot be interpreted
> as a class, because the class cannot be found. But I've verified that the
> file tree indeed contains the necessary plugin classes, and as my workaround
> is to create a jar file out of the classes and reference that instead, the
> problem absolutely must be of a different nature.
>
> I would think that it must be possible to reference a directory of .class
> files, is it? How? Thanks.
>
> Cheers,
>
> Marco
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
> http://xircles.codehaus.org/manage_email
>
>
--
Adam Murdoch
Gradle Co-founder
http://www.gradle.org
VP of Engineering, Gradleware Inc. - Gradle Training, Support, Consulting
http://www.gradleware.com