[gradle-user] Re: Copy file into WEB-INF, fail if not exists

2012-06-04 Thread Peter Niederwieser
StormeHawke wrote So since I'm not actually using the Copy() functionality anymore, is there a way to assert that the requested file exists in the war task? A flag I can set? A hack I can implement in a doFirst clause? You can perform some assertions in a doFirst block. Something like:

[gradle-user] Re: Copy file into WEB-INF, fail if not exists

2012-06-04 Thread StormeHawke
Peter Niederwieser wrote You can perform some assertions in a doFirst block. Something like: war.doFirst { assert file(datasource/${datasource}.xml).exists() } Thanks Peter, that works like a charm :) ~Brian -- View this message in context:

[gradle-user] Re: Copy file into WEB-INF, fail if not exists

2012-05-31 Thread StormeHawke
Peter Niederwieser wrote 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:

[gradle-user] Re: Copy file into WEB-INF, fail if not exists

2012-05-30 Thread Peter Niederwieser
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