Platypus Header

Platypus Innovation Blog

14 January 2015

JVM settings when using Jetty via Gradle & Gretty

We're using Gradle, Jetty, and Gretty in a project. We'd like to use asserts and a native library... How do you pass in settings to your JVM?

You can do this in the file build.gradle, within the gretty block, using jvmArgs (which takes a list of strings), like this:

// Gretty
buildscript {  
    dependencies {
        classpath 'org.akhikhl.gretty:gretty:1.1.3'

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

gretty {
    // supported values:
    // 'jetty7', 'jetty8', 'jetty9', 'tomcat7', 'tomcat8'
    servletContainer = 'jetty8'
    jvmArgs = ['-ea']


And that's enableAssertions set to true.

No comments:

Post a Comment

Good-Loop Unit