Hi All,

I'm trying to write a task that manipulates both dependencies and generated 
artifacts. I have two kinds of project, type A and type B. I need to copy the 
artifacts from A into a directory called 'Plugins'. I need to copy artifacts 
from B into a directory called 'Libraries'. For both types, I need to copy 
external dependencies into 'Libraries'. I've been struggling with the copy task 
and finally decided to ask. Here is what I came up with:

// This should copy type b generated artifacts into libraries
task copyTypeBJars(type: Copy) {
    subprojects {
        if(isTypeB(project)){
            // How do I copy just get generated Jars here?
        }
    }
    into "Libraries"
}

task copyLibraries(type: Copy, dependsOn: 'copyTypeBJars') {
    // Want this to include all external dependencies 
    subprojects {
        // This is supposed to exclude all generated jars. Type B jars are 
copied by copyTypeBJars.
        exclude '**/$project.name*'
        // This is supposed to pick up all external compile time dependencies.
        from configurations.compile
    }
    into "Libraries"
}

task copyPlugins(type: Copy) {
    subprojects {
        if(isTypeA(project)){
            // How do I copy just get generated Jars here?
        }
    }
    into "Plugins"
}

This doesn't feel like a very groovy way to do things, but is the closest I've 
gotten yet. Is there some magic mechanism that I'm just missing?

Thanks all,

Andy
---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to