Skip to content

Instantly share code, notes, and snippets.

@mostlylikeable
Created November 14, 2014 03:00
Show Gist options
  • Save mostlylikeable/3bb505089f54bb9921f2 to your computer and use it in GitHub Desktop.
Save mostlylikeable/3bb505089f54bb9921f2 to your computer and use it in GitHub Desktop.
debug vertx app via gradle task
task runVertx(type: Exec, dependsOn: ['compileGroovy']) {
if (System.getProperty('debug')) {
environment 'VERTX_OPTS', '-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005'
}
ext.vertxClasspath = (sourceSets.main.runtimeClasspath.filter { !it.path.contains('groovy') }).asPath
def configFile = 'etc/conf.json'
commandLine 'vertx', 'run', 'src/MyVertxModule.groovy', '-conf', configFile, '-cp', "src/:$vertxClasspath"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment