Skip to content

Instantly share code, notes, and snippets.

@InfoSec812
Created January 7, 2020 20:56
Show Gist options
  • Save InfoSec812/66c319126584b0843c754c02cd436c4d to your computer and use it in GitHub Desktop.
Save InfoSec812/66c319126584b0843c754c02cd436c4d to your computer and use it in GitHub Desktop.
Showing how to pass Vert.x Clustering parameters using the JavaExec gradle task type
task runExecutableJar(type: JavaExec) {
// Executable jars can have only _one_ jar on the classpath.
classpath = files(target/cluster-1.0-SNAPSHOT.jar)
// 'main' does not need to be specified
// arguments to pass to the application
args [
'-cluster',
'-cluster-host',
'${cluster.ip}'
]
jvmArgs [
'-Djava.net.preferIPv4Stack=true',
'-Djgroups.tcp.address=${cluster.ip}',
'-Djgroups.mping.mcast_addr=239.5.5.5'
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment