The kotlin compiler seems to only be trying to compile .kt files that are in src/main/java, and is ignoring src/main/kotlin. However, everything seems to be linked correctly in the IntelliJ IDE. No errors.
Below is my plugin configuration for kotlin:
<plugins>
<plugin>
<artifactId>kotlin-maven-plugin</artifactId>
<groupId>org.jetbrains.kotlin</groupId>
<version>${kotlin.version}</version>
<executions>
<execution>
<id>compile</id>
<goals> <goal>compile</goal> </goals>
<configuration>
<sourceDirs>
<sourceDir>${project.basedir}/src/main/kotlin</sourceDir>
<sourceDir>${project.basedir}/src/main/java</sourceDir>
</sourceDirs>
</configuration>
</execution>
<execution>
<id>test-compile</id>
<goals> <goal>test-compile</goal> </goals>
<configuration>
<sourceDirs>
<sourceDir>${project.basedir}/src/test/kotlin</sourceDir>
<sourceDir>${project.basedir}/src/test/java</sourceDir>
</sourceDirs>
</configuration>
</execution>
</executions>
</plugin>
However, when I run mvn clean install, the kotlin compiler does not seem to run. So I try to run the kotlin compiler directly from the plugin.
[INFO] --- kotlin-maven-plugin:1.1.2:compile (default-cli) @ eagle-client-core ---
[INFO] Kotlin Compiler version 1.1.2
[INFO] Compiling Kotlin sources from [C:\Users\me\workspace\Project\Clients\project-client\project-client-core\src\main\java]
As you can see, src/main/java is getting scanned, but not src/main/kotlin.
I don't see anything obviously wrong with my configuration. Any help is appriciated.
src/main/kotlinshould be picked up by default.