Ant in Groovy: Copying a single file
I know that when using Ant from Groovy, you can do somet开发者_Go百科hing like the following to copy files:
copy(todir:myDir) {
fileset(dir:"src/test") {
include(name:"**/*.groovy")
}
}
Is there a more efficient, and elegant way to copy a single file?
How about:
new AntBuilder().copy( file:"$sourceFile.canonicalPath",
tofile:"$destFile.canonicalPath")
精彩评论