Discussion:
Tar Task Up-To-Date?
Neil Chaudhuri
2012-04-04 23:02:14 UTC
Permalink
I am generating a tar ball from a war file like so:

task buildTarball(type: Tar) {
destinationDir file(outputDirName)
compression Compression.GZIP
includes ["${buildDir}/*.war"]
}

When I run this, I keep finding

:project:buildTarball UP-TO-DATE

There is no tar ball, so I don't know why this occurs. What are the criteria for determining whether a Tar task is up-to-date? Any insight into how I should rewrite my task is appreciated.

Thanks.
René Gröschke
2012-04-04 23:35:46 UTC
Permalink
Just with a Short Look at your snippet, I think you need to replace the includes line with a from statement. Running the build with -i flag gives some more india about the up-to-date check on your task.

Regards,
Rene

René Gröschke
@breskeby
Post by Neil Chaudhuri
task buildTarball(type: Tar) {
destinationDir file(outputDirName)
compression Compression.GZIP
includes ["${buildDir}/*.war"]
}
When I run this, I keep finding
:project:buildTarball UP-TO-DATE
There is no tar ball, so I don't know why this occurs. What are the criteria for determining whether a Tar task is up-to-date? Any insight into how I should rewrite my task is appreciated.
Thanks.
Loading...