Closed thorntonrp closed 4 years ago
I am happy to revert to the old behavior to be honest. I was not so sure about making that assumption either. What do others think?
In Scala dialect, we always keep the java sources. We provide two models, one pure maven model, which means write the code in Java but the pom in Scala and a scala model, which configures some things to be ready for Scala, e.g. sources and resources, compiler, test framework etc.
Hence, I'm for reverting.
+1 to revert
The kotlin source directories ripple into child projects. This becomes an especially surprising issue for pom.xml projects that declare a parent on pom files that were generated with the polyglot-kotlin extension. This is because when the pom.kts files have the pom packaging type, the generated xml pom file that is uploaded to the remote repository is also given the src/main/kotlin
and src/test/kotlin
directory settings. This becomes a surprise for such projects that weren't expecting Maven defaults to be changed in the parent.
Uff.. forgot about that one .. I will try to revert and cut a release over the weekend or latest next week
Will cut a release today hopefully ..
The PR for #201 and #202 seems to have been poorly considered as to the ramifications for existing non-java projects.
This PR assumes that the Kotlin extension will only be used in Kotlin projects by default. Is this a general assumption that is being made with all the other language implementations? For example, does the ruby extension assume that all the sources are ruby by default? Does the groovy extension assume that all the sources are groovy by default? If this is a general assumption that is expected of all the polyglot implementations, then I'm okay with it for the sake of consistency. Otherwise, I don't believe this PR is an appropriate deviation from the default Maven behavior.
Has the documentation been updated to reflect this significant break from Maven's default behavior? Also, does the pom.xml to pom.kts conversion take this difference into account? Changing pom.kts away from default Maven behavior is not something that should be done without respect to the downstream consequences.
For the past year, I've been using the pom.kts for building plain java (non-Kotlin) projects and as of 4.4, I now have to fix all my of pom.kts files to switch my source directories back to
src/main/java
andsrc/test/java
.