There are some existing similar questions based on codes, but I want to ask in a more general way.
Suppose there are java source code and scala source code, seems scala-maven-plugin
is to be added.
scala-compile-first
in plugin?)process-resources
. <plugins>
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
<executions>
<execution>
<id>scala-compile-first</id>
<phase>process-resources</phase>
<goals>
<goal>add-source</goal>
<goal>compile</goal>
</goals>
</execution>
...
For example see the docs: Mixed Java/Scala Projects – scala-maven-plugin or the integration test scala-maven-plugin/src/it at master · davidB/scala-maven-plugin