new AntBuilder().copy(todir: destinationDir) {
fileset(dir: sourceDir)
}
i have used above code to copy a file from source to destination folder.
it was working fine with grails 2.3.0 now updated grails to 2.3.4 ,now its not working in production environment.
Now getting the following error "java.lang.ClassNotFoundException: org.apache.tools.ant.BuildException"
If you're running on JDK7, you can use java.nio.file.Files.copy(Path source, Path target, CopyOption... options) method
I am using Grails 2.4.3 and Java 1.6. In my case the solution was added the includes option like this:
new AntBuilder().copy(todir: destinationDir) {
fileset(dir: sourceDir, includes: "**")
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With