> Is there a way to dynamically grab the file and directly insert it into > the war at build time without copying it to WEB-INF? >
Sure. See the War plugin chapter in the Gradle user guide: http://gradle.org/docs/current/userguide/userguide_single.html#sec:customizing > On a closely related note, gradle continues to run quietly if the file > called for doesn't exist. I don't know the reason for this, but it > certainly is unexpected behavior considering that if you try to copy a > file in JAVA that doesn't exist you get a big ugly FileNotFoundException. > Is this a gradle bug, or is this some kind of deliberate behavior? How do > we get around it? > I think it is deliberate. One way to get around it is to use `Copy.eachFile {}` to check which files are actually copied, and to compare that against your expectations. -- Peter Niederwieser Principal Engineer, Gradleware http://gradleware.com Creator, Spock Framework http://spockframework.org Twitter: @pniederw -- View this message in context: http://gradle.1045684.n5.nabble.com/Copy-file-into-WEB-INF-fail-if-not-exists-tp5709846p5709850.html Sent from the gradle-user mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
