Hi,

Would you expect the following to pass?

        given:
        file("a/b.txt") << "\$foo"

        when:
        buildScript """
            task c(type: Copy) {
                from("a") {
                    filesMatching("b.txt") {
                        expand foo: "bar"
                    }
                    into "nested"
                }
                into "out"
            }
        """

        then:
        succeeds "c"

        and:
        file("out/nested/b.txt").text == "bar"


It doesn't. It turns out that filesMatching matches the relative destination path, so it needs to be filesMatching("nested/b.txt"). I find this a little surprising.

It seems like it would be more predictable to use the relative path to the file from the nearest 'from' statement. What's the rationale for the current behaviour?

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

   http://xircles.codehaus.org/manage_email


Reply via email to