Joram Visser
09/10/2020, 8:34 PMJoram Visser
09/10/2020, 8:34 PM[ERROR] Failed to execute goal org.jetbrains.kotlin:kotlin-maven-plugin:1.4.10:compile (compile) on project ..: Compilation failure: Compilation failure:
[ERROR] /../../../../src/main/kotlin/../../../model/MyModel.kt:[17,1] Duplicate JVM class name '../../../model/MyModelKt' generated from: package-fragment .........model, package-fragment .........model
[ERROR] /../../../../target/generated-sources/kapt/compile/../../../model/MyModel.kt:[1,1] Duplicate JVM class name '../../../model/MyModelKt' generated from: package-fragment .........model, package-fragment .........model
aballano
09/10/2020, 8:48 PMRachel
09/10/2020, 8:48 PMpackage
is missing (it's necessary now). Could it be possible to review it? Or part of the code to try to reproduce it. I don't understand why those paths appear in that way. And I see Kotlin 1.4.10. Could you try it with Kotlin 1.4.0?Rachel
09/10/2020, 8:48 PMRachel
09/10/2020, 8:48 PMRachel
09/11/2020, 2:22 AMclean
task before building the project again?Joram Visser
09/11/2020, 6:17 AMRachel
09/11/2020, 8:34 AMJoram Visser
09/11/2020, 5:33 PMmvn clean package
the result is:
[ERROR] Failed to execute goal org.jetbrains.kotlin:kotlin-maven-plugin:1.4.0:compile (compile) on project optics: Compilation failure: Compilation failure:
[ERROR] /Users/joram/projects/optics/src/main/kotlin/com/joram/optics/model/MyModel.kt:[1,1] Duplicate JVM class name 'com/joram/optics/model/MyModelKt' generated from: package-fragment com.joram.optics.model, package-fragment com.joram.optics.model
[ERROR] /Users/joram/projects/optics/target/generated-sources/kapt/compile/com/joram/optics/model/MyModel.kt:[1,1] Duplicate JVM class name 'com/joram/optics/model/MyModelKt' generated from: package-fragment com.joram.optics.model, package-fragment com.joram.optics.model
Rachel
09/12/2020, 10:43 AMpackage
goal because mvn org.jetbrains.kotlin:kotlin-maven-plugin:1.4.0:compile
(the goal that fails when running package
) doesn't raise any error and the content of target
directory is right.
Then mvn org.apache.maven.plugins:maven-jar-plugin:2.4.jar
creates the JAR with all the content and it doesn't raise any error either.
BTW, the generated source code isn't Kotlin code but Java.
I also tried your source code with Gradle and the package is generated without errors.
Please, let us know if you make it work when tuning package
.
Thanks again!! 🙌