The standard Jetty plugin for Gradle has limited features. For example, there seems to have no option to configure access logs with this plugin.
Luckily there is a much more feature rich jetty plugin called JettyEclipse for Gradle. This can be found here. Configuring this plugin is quite easy. Add the following into your build.graddle.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath (group: 'com.sahlbach.gradle', name: 'gradle-jetty-eclipse-plugin', version: '1.9.+')
}
}
apply plugin: 'jettyEclipse'
jettyEclipse {
System.setProperty("catalina.home", "${project.buildDir}")
requestLog = new File("${project.buildDir}/logs/access.log")
}
Then run
gradle clean jettyEclipseRun
0 comments:
Post a Comment