LoginSignup
0
0

More than 5 years have passed since last update.

gradleでservlet containerを起動する

Posted at

build.gradleの設定

apply plugin: 'war'
apply plugin: 'org.akhikhl.gretty'

repositories {
    mavenCentral()
}

dependencies {
    testCompile group: 'junit', name: 'junit', version: '4.11'
    compile 'javax.servlet:javax.servlet-api:3.0.1'
}

war {
    webXml = file('src/main/web.xml')
}

buildscript {
    repositories{jcenter()}
    dependencies {
        classpath 'org.akhikhl.gretty:gretty:+'
    }
}

ポート番号の指定

gretty {
    httpPort = 8081
}

コンテキストルートの指定

gretty {
    contextPath = '/contextRoot'
}

その他のパラメータはここを参照

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0