It is possible to have Java and Kotlin in the same...
# announcements
s
It is possible to have Java and Kotlin in the same package right?
👌 3
h
Affirmative
s
My maven seems to have some trouble with it
h
Do you have it in separate src folders?
so,
src/main/java
and
src/main/kotlin
?
s
no. they are both under src/main/kotlin, in a package
h
That might be what Maven stumbles upon
s
image.png
h
The package is just the namespace - it can exist in separate src folders
Try if it works when you have it in
src/main/java
and the same package
m
I think maven assumes the source folder is
src/main/java
by default. You need this to change it to `src/main/kotlin`:
Copy code
<build>  <sourceDirectory>${project.basedir}/src/main/kotlin</sourceDirectory>
  <testSourceDirectory>${project.basedir}/src/test/kotlin</testSourceDirectory>
</build>
h
Or that way 😉