关于使用Maven的Kotlin文档建议将kotlin-maven-plugin
执行明确地绑定到process-sources
阶段.由于maven-compiler-plugin
绑定到compile
阶段,绑定kotlin-maven-plugin
到process-sources
阶段使其首先运行.
kotlin-maven-plugin org.jetbrains.kotlin ${kotlin.version} compile process-sources compile test-compile process-test-sources test-compile