The project was created with Kotlin configured successfully. Now, we will take a look at the Maven plugin in our pom.xml. The configuration is necessary to instruct Maven on how to compile the Kotlin source code and add in the artifacts.
We will add the following plugins in the plugins section:
<plugin> <artifactId>kotlin-maven-plugin</artifactId> <groupId>org.jetbrains.kotlin</groupId> <version>${kotlin.version}</version> <configuration> <jvmTarget>1.8</jvmTarget> </configuration> <executions> <execution> <id>compile</id> <phase>process-sources</phase> <goals> <goal>compile</goal> </goals> </execution> <execution> <id>test-compile</id> <phase>process-test-sources</phase> <goals> <goal>test-compile ...