protected fun uploadPluginAgentZip()

in src/main/kotlin/org/jetbrains/teamcity/maven/sdk/AbstractTeamCityMojo.kt [183:197]


    protected fun uploadPluginAgentZip(): String {
        val proj = project!!

        val packageFile = File(proj.build!!.directory!!, pluginPackageName)

        val effectiveDataDir = getDataDir().absolutePath

        if (packageFile.exists()) {
            val dataDirFile = File(effectiveDataDir)
            FileUtils.copyFile(packageFile, File(dataDirFile, "plugins/" + pluginPackageName))
        } else {
            log.warn("Target file [${packageFile.absolutePath}] does not exist. Nothing will be deployed. Did you forget 'package' goal?")
        }
        return effectiveDataDir
    }