mysql-binlog-connector-java icon indicating copy to clipboard operation
mysql-binlog-connector-java copied to clipboard

pom.xml Java 8 Compability

Open bluebike opened this issue 3 years ago • 0 comments

Problem:

Currenly java pom.xml defines java version compability like this:

https://github.com/osheroff/mysql-binlog-connector-java/blob/9cc270ee804442945ac6ed984be9e8adea460177/pom.xml#L107-L109

But this doesn't work with with java 8

Tested with In macOS Big Sur 11.4 using openjdk 1.8

openjdk version "1.8.0_282"
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_282-b08)
OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.282-b08, mixed mode)

Gives error

INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:testCompile (default-testCompile) on project mysql-binlog-connector-java: Fatal error compiling: invalid flag: --release -> [Help 1]

Solution

But classical way define this works fine with both jdk 8 and 11

pom.xml:

      <configuration>
           <source>1.8</source>
           <target>1.8</target>
      </configuration>

So I would prefer to use source+target syntax in pom.xml.

Note about compatibility

Note I would like clearly defined current version compatibility. Actually code has only few things that makes it incompatible with Java 1.6.

bluebike avatar Jul 19 '21 15:07 bluebike