Reputation: 3859
I'm trying to use the scala-maven-plugin:3.1.0 with Java 1.5. However my maven build is failing with an incompatibility error.
Failed to execute goal net.alchim31.maven:scala-maven-plugin:3.1.0:compile (scala-compile-first) on project proj: Execution scala-compile-first of goal net.alchim31.maven:scala-maven-plugin:3.1.0:compile failed: Unable to load the mojo 'compile' in the plugin 'net.alchim31.maven:scala-maven-plugin:3.1.0' due to an API incompatibility: org.codehaus.plexus.component.repository.exception.ComponentLookupException: Bad version number in .class file
There is also an unsupported class version warning
WARNING: Error injecting: scala_maven.ScalaCompileMojo
java.lang.UnsupportedClassVersionError: Bad version number in .class file
The documentation for the plugin says that it requires Java 1.5 so i dont see a problem there. I'm using Java 1.5 locally and also for my maven build.
Any suggestions to where the problem is? I cant see where another version of Java could be used to compile any of my classes so I'm guessing its an incompatibility in one of the dependencies i have but I've had no luck finding it. I'm also importing the following dependency
<dependency>
<groupId>org.scalatest</groupId>
<artifactId>scalatest_2.9.0-1</artifactId>
<version>2.0.M5</version>
</dependency>
Upvotes: 0
Views: 2327
Reputation: 3859
Answer as posted by @om-nom-nom As far as I know, scala version scalatest was compiled against (2.9.x) require at least 1.6 version of Java platform.
Upvotes: 1