<@U0B8ZP13Q> Shouldn't that `replace existing`: ``...
# kobalt
e
@cedric Shouldn't that `replace existing`:
Copy code
private fun publishToMavenLocal(project: Project) : TaskResult {
        val files = findArtifactFiles(project)
        val allFiles = arrayListOf<File>()
        // Calculate an MD5 checksum for each file
        files.forEach {
            allFiles.add(it)
            Md5.toMd5(it).let { md5 ->
                val md5File = File(it.path + ".md5")
                md5File.writeText(md5)
                allFiles.add(md5File)
            }
        }

        val outputDir = URL(localMaven()).file
        logk(project.name, 1, "Deploying " + allFiles.size + " files to local maven " + outputDir)
        val groupDir = project.group!!.replace('.', File.separatorChar)
        val targetDir = KFiles.makeDir(KFiles.joinDir(outputDir, groupDir,
                project.artifactId!!, project.version!!))
        allFiles.forEach { file ->
            logk(project.name, 2, "    $file")
            KFiles.copy(Paths.get(file.absolutePath), Paths.get(targetDir.path, file.name),
                    StandardCopyOption.REPLACE_EXISTING)
        }
        return TaskResult()
    }