How to run jetty 7+ with specified war with groovy/gradle?

后端 未结 4 785
清酒与你
清酒与你 2020-12-17 21:17

I want to run Jetty 7+ with gradle build, but unlucky looks like there is no way to do this with jettyRun. So probably simplest idea to achieve what I want would be to use c

4条回答
  •  生来不讨喜
    2020-12-17 21:28

    Ok, I found out how to run it using jetty directly from repository:

    jettyVersion = "8.1.0.RC0"
    
    configurations {
        jetty8
    }
    
    dependencies {
        jetty8 "org.mortbay.jetty:jetty-runner:$jettyVersion"
    }
    
    task runJetty8(type: JavaExec) {
        main = "org.mortbay.jetty.runner.Runner"
        args = [war.archivePath]
        classpath configurations.jetty8
    }
    

提交回复
热议问题