简体   繁体   中英

How can I create a number of jetty run tasks in gradle?

I need create a number of different modes for running jetty in my gradle build.

They differ in system properties and classpath.

How can I do it using gradle jetty plugin?

you can create multiple tasks of type JettyRun . To dynamically create different task instances you can use Groovy syntax sugar.

4.times { // this can be replaced by iterating over your different environment settings 
   task "jettyRun${it}(type:JettyRun) {
       // do you custom configuration here
   }
}

bb, Rene

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM