Łukasz Patro
05/11/2020, 9:59 AM[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.635s
[INFO] Finished at: Mon May 11 11:52:50 CEST 2020
[INFO] Final Memory: 7M/231M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.jetbrains.kotlin:kotlin-maven-plugin:1.3.72:compile (compile) on project untitled: Execution compile of goal org.jetbrains.kotlin:kotlin-maven-plugin:1.3.72:compile failed: Unable to load the mojo 'compile' in the plugin 'org.jetbrains.kotlin:kotlin-maven-plugin:1.3.72' due to an API incompatibility: org.codehaus.plexus.component.repository.exception.ComponentLookupException: org/jetbrains/kotlin/maven/K2JVMCompileMojo : Unsupported major.minor version 52.0
It builds fine with JDK 8. pom.xml
is very simple:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="<http://maven.apache.org/POM/4.0.0>" xmlns:xsi="<http://www.w3.org/2001/XMLSchema-instance>" xsi:schemaLocation="<http://maven.apache.org/POM/4.0.0> <http://maven.apache.org/maven-v4_0_0.xsd>">
<modelVersion>4.0.0</modelVersion>
<groupId>org.example</groupId>
<artifactId>untitled</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>org.example untitled</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<kotlin.version>1.3.72</kotlin.version>
<kotlin.code.style>official</kotlin.code.style>
</properties>
<dependencies>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib</artifactId>
<version>${kotlin.version}</version>
</dependency>
</dependencies>
<build>
<sourceDirectory>src/main/kotlin</sourceDirectory>
<testSourceDirectory>src/test/kotlin</testSourceDirectory>
<plugins>
<plugin>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-maven-plugin</artifactId>
<version>${kotlin.version}</version>
<executions>
<execution>
<id>compile</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
</execution>
<execution>
<id>test-compile</id>
<phase>test-compile</phase>
<goals>
<goal>test-compile</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
It seems that kotlin-maven-plugin
do not support Java before version 8...alex j
05/11/2020, 4:05 PMŁukasz Patro
05/11/2020, 7:36 PMalex j
05/13/2020, 5:20 AMŁukasz Patro
05/13/2020, 8:01 AM