- About Scala
- Documentation
- Code Examples
- Software
- Scala Developers
maven and Java 1.6
Thu, 2009-03-05, 08:49
Anybody know how I modify my pom.xml to compile my Scala code with java 1.6? Currently my plugin section looks like so
plugin>
<groupId>org.scala-tools</groupId>
<artifactId>maven-scala-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
<configuration>
<scalaVersion>${scala.version}</scalaVersion>
<args>
<arg>-target:jvm-1.5</arg>
</args>
</configuration>
</plugin>
Changing "jvm-1.5" to "jvm-1.6" gives me the following error:
[WARNING] scalac error: unknown target 'jvm-1.6'
[WARNING] scalac -help gives more information
[WARNING] scalac error: bad option: '-target:jvm-1.6'
Looking at scalac -help, it seems that jvm-1.6 isn't an option.
Any help would be great. Thanks!
-Dustin
plugin>
<groupId>org.scala-tools</groupId>
<artifactId>maven-scala-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
<configuration>
<scalaVersion>${scala.version}</scalaVersion>
<args>
<arg>-target:jvm-1.5</arg>
</args>
</configuration>
</plugin>
Changing "jvm-1.5" to "jvm-1.6" gives me the following error:
[WARNING] scalac error: unknown target 'jvm-1.6'
[WARNING] scalac -help gives more information
[WARNING] scalac error: bad option: '-target:jvm-1.6'
Looking at scalac -help, it seems that jvm-1.6 isn't an option.
Any help would be great. Thanks!
-Dustin
Dustin Whitney wrote:
> Anybody know how I modify my pom.xml to compile my Scala code with java
> 1.6? Currently my plugin section looks like so
IIRC the Scala compiler currently only targets up to the 1.5 spec. The
generated files should run fine under a 1.6 JVM. What exactly are you
trying to achieve?
Derek