Created
June 5, 2010 10:33
-
-
Save fumokmm/426521 to your computer and use it in GitHub Desktop.
連続でフォルダにコピーする。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" ?> | |
<project name="ant-with-groovy" default="test"> | |
<taskdef name="groovy" | |
classname="org.codehaus.groovy.ant.Groovy" | |
classpath="groovy-all-1.7.2.jar" /> <!-- groovy-all-*.jar を指定 --> | |
<target name="test"> | |
<groovy><![CDATA[ | |
// 例:古いディレクトリから新しいディレクトリにコピー | |
def dirMap = [ | |
'old1' : 'new1', | |
'old2' : 'new2' | |
] | |
dirMap.each { from, to -> | |
ant.copy(todir: to) { | |
fileset dir: from | |
} | |
} | |
]]></groovy> | |
</target> | |
</project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment