GMavenPlus bytecode error
What's inside this article
⌄
- GMavenPlus unrecognized bytecode
- GMavenPlus target version error
- Fix GMavenPlus bytecode error
- GMavenPlus compilation target
When you try to compile Groovy with Java and use gmavenplus plugin for that purpose, you may face with this errors:
Unrecognized target bytecode.
Unrecognized target bytecode '8'.
[ERROR] Failed to execute goal org.codehaus.gmavenplus:gmavenplus-plugin:1.6:compileTests (default) on project test: Execution default of goal org.codehaus.gmavenplus:gmavenplus-plugin:1.6:compileTests failed: Unrecognized target bytecode. -> [Help 1]
To solve this problem, you need to replace the 8 to 1.8 in your maven-compiler-plugin:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
If you don’t have maven-compiler-plugin – add it to your project pom.xml, as shown above.