opt-nc / j7zip

Java 8 Command line tool to compress / decompress files using LZMA algortihm (like 7-Zip for .7z) with password protection
GNU General Public License v3.0
1 stars 0 forks source link

:shield: Maven > Enforce build with Java 8 :older_man: #26

Closed adriens closed 1 year ago

adriens commented 1 year ago

The main "feature" of the lib is to only require Java 8 for legacy systems.

To make sure the project is always built with a proper SDK version, use Maven Enforcer

Dougniel commented 1 year ago

Why this is not enough in the pom.xml for you ? :

    <properties>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
       ...
    </properties>
adriens commented 1 year ago

Actually my runtime is the following :

 java -version
openjdk version "17.0.5" 2022-10-18
OpenJDK Runtime Environment Temurin-17.0.5+8 (build 17.0.5+8)
OpenJDK 64-Bit Server VM Temurin-17.0.5+8 (build 17.0.5+8, mixed mode, sharing)

... and I would like it to fail to force me to build it with the legacy java runtime... but I cal achieve the build without any problem :

image

Dougniel commented 1 year ago

Actually my runtime is the following :

❯ java -version openjdk version "17.0.5" 2022-10-18 OpenJDK Runtime Environment Temurin-17.0.5+8 (build 17.0.5+8) OpenJDK 64-Bit Server VM Temurin-17.0.5+8 (build 17.0.5+8, mixed mode, sharing) ... and I would like it to fail to force me to build it with the legacy java runtime... but I cal achieve the build without any problem :

Why do you want that ? Javac is designed to be backward compatible (through -target options), what do you need more ?

adriens commented 1 year ago

... what if someone want to use the Record in a PR ?

Dougniel commented 1 year ago

... what if someone want to use the Record in a PR ?

He will get a compilation error on CI (and locally) because of this

adriens commented 1 year ago

👍