Resources filtering in jettyRun task


(Maciek Opała) #1

Hi, In my project I’ve a dedicated task to compile coffee script code, run jetty and test site in browser. Here it is:

task testClient {

copyJs.execute()

jettyRun.daemon = true

jettyRun.execute()

def proc = ‘coffee -o src/main/webapp/js -cw src/main/coffee’.execute()

handle_proc(proc) }

In the mentioned task is use mocks (written in javascript) in index.html and this is the only task I want these lines:

to be present in index.html.

First question is how to filter index.html in the mentioned task to make these lines present (no filter function in jettRun) ? Second question is how to organize this filtering to be accessible form other tasks? As I said before, I want to include these lines in testClient as well as exclude them from any other task (such as war for instance).