apache / mina-sshd

Apache MINA sshd is a comprehensive Java library for client- and server-side SSH.
https://mina.apache.org/sshd-project/
Apache License 2.0
902 stars 359 forks source link

Enforce usage of JDK 17 at build time #615

Open gnodet opened 1 month ago

gnodet commented 1 month ago

Description

Enforce usage of JDK 17 at build time

Motivation

It seems required as indicated in the README...

Alternatives considered

No response

Additional context

No response

garydgregory commented 1 month ago

Using the Maven enforcer plugin?

elecharny commented 1 month ago

@garydgregory Adding \ERROR\ just does the trick:

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <executions>
                    <execution>
                        <id>enforce-maven-version</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireMavenVersion>
                                    <version>${minimalMavenBuildVersion}</version>
                                </requireMavenVersion>
                                <requireJavaVersion>
                                    <level>ERROR</level>
                                    <version>${minimalJavaBuildVersion}</version>
                                </requireJavaVersion>
...
garydgregory commented 1 month ago

👍