in src/main/kotlin/org/jetbrains/teamcity/maven/sdk/TeamCitySDK.kt [98:116]
override fun doExecute() {
var doOfflineReload = false
val split = teamcityVersion.split(".")
if (split.size < 2 || split[0].toInt() < 2018 || (split[0].toInt() == 2018 && split[1].toInt() == 1)) {
log.info("Cannot reload plugin in runtime for TeamCity version less then 2018.2. Will reload agent side of the plugin. Restart the server to reload server side of the plugin. ")
doOfflineReload = true
}
if (doOfflineReload) {
uploadPluginAgentZip()
log.info("Plugin uploaded. Wait for TeamCity agent to upgrade.")
return
}
if (!reloadPluginInRuntime()) {
uploadPluginAgentZip()
throw MojoFailureException("Reload plugin failed. A new plugin zip was uploaded, please restart the server. ")
}
}