tags:

views:

20

answers:

1

I have a gant script A with two targets

t1 - default target t2 - another target

Even when I run

grails A t2

the default target is run? How can I run the non-default target? I have tried grails A --target='t2' etc. but doesn't work.

A: 

I'm not sure if there's a proper way to do it, but you can write a second script ("T2.groovy") that loads this one and sets that target as its default, e.g.

includeTargets << new File("path/to/YourScript")

setDefaultTarget("t2")
Burt Beckwith
Thanks Burt. That's what I did for now. I have created two scripts T1.groovy and T2.groovy
Paras