My version of gradle:
------------------------------------------------------------
Gradle 1.12
------------------------------------------------------------
Build time: 2014-04-29 09:24:31 UTC
Build number: none
Revision: a831fa866d46cbee94e61a09af15f9dd95987421
Groovy: 1.8.6
Ant: Apache Ant(TM) version 1.9.3 compiled on December 23 2013
Ivy: 2.2.0
JVM: 1.6.0_38-ea (Sun Microsystems Inc. 20.13-b02)
OS: Windows 7 6.1 amd64
The path to the folder with the application folder:
myApp\web-app\src\main\webapp\images
Running gradle clean deployin the console, the following folder is blown into my tomcat deployment folder containing image files:
\myApp\images
The expanded images have the same name and the exact same size as the files in my project. The only problem is that the images are damaged and the image is distorted. Any ideas?
Update The following code is apparently responsible for file corruption:
eachFile {
it.filter(org.apache.tools.ant.filters.ReplaceTokens, tokens: [
releaseVersion: project.version,
releaseDate: buildDate
])
}
I suggest that a possible fix would be to use another way of replacing tokens.
Update2. The solution, according to some people, is to apply the ReplaceTokens filter only to some files and skip some types of files. The following code works:
filesNotMatching("**/*.png") {
it.filter(org.apache.tools.ant.filters.ReplaceTokens, tokens: [
releaseVersion: project.version,
releaseDate: buildDate
])
}