Running an executable JAR from a remote maven repo

It might work using jvmArgs (not 100% sure but worth a try)

configurations {
    toolsUi
}
dependencies {
    toolsUi "edu.ucar:toolsUI:4.6.4"
}
task runToolsUI(type: JavaExec) {
    jvmArgs ['-jar', configurations.toolsUi.singleFile.absolutePath]
}