I would need to compile a legacy scala project (Scala version 2.8.0). The version is incompatible with JDK8. So I would like to ideally compile the project using JDK 7. I am looking for a configuration something like the following in maven-compiler-plugin.
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
Is there a similar configuration in scala-maven-plugin?
I have tried using "source" as suggested in the documentation of the plugin and javacargs as well. But both those options don't work.
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
<version>3.4.2</version>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
<configuration>
<recompileMode>incremental</recompileMode>
<source>1.7</source>
<target>1.7</target>
<javacArgs>
<javacArg>-source</javacArg>
<javacArg>1.7</javacArg>
<javacArg>-target</javacArg>
<javacArg>1.7</javacArg>
</javacArgs>
</configuration>
</plugin>
Does anyone know what I am doing wrong? I don't have the option of using JDK7