Reputation: 863
I have cloned a Maven repository which I wish to use and build on my machine. I used to be able to build this particular project, but now when I choose maven install, it gives me this error
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/apache/maven/cli/MavenCli : Unsupported major.minor version 51.0
Which is really strange. I know that this maven project uses java 6, and it shows so in the pom.xml, but my machine already has java 6 installed. In fact, the project says it's using it. What's going on?
Upvotes: 1
Views: 1222
Reputation: 2291
Although your project uses Java 6, Maven version 3.3.3 (latest at this time) needs Java 7.
Either use Maven 3.2.5 (that uses Java 6) or install Java 7.
Reference:
https://maven.apache.org/docs/history.html
Upvotes: 1