Skip to content

[0.10] Java: "mvn test" fails due too old Java requirements #1829

@kripton

Description

@kripton

Starting to work on https://github.com/OpenLightingProject/ola/security/dependabot/1, I tried running the tests locally. However, Maven refuses to run them since the Java requirements are too old:

kripton@momo ~/git/ola/java $ mvn test
[...]
[INFO] Compiling 3 source files to /home/kripton/git/ola/java/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] error: Source option 5 is no longer supported. Use 6 or later.
[ERROR] error: Target option 1.5 is no longer supported. Use 1.6 or later.
[INFO] 2 errors 
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  7.814 s
[INFO] Finished at: 2023-03-05T20:42:02+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile (default-compile) on project ola-java-client: Compilation failure: Compilation failure: 
[ERROR] error: Source option 5 is no longer supported. Use 6 or later.
[ERROR] error: Target option 1.5 is no longer supported. Use 1.6 or later.
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

I'm no Java expert, I don't really know if we ship the Java API in our Debian package or for any other distro but with Java 8 basically being obsolete (I'm usually on Java 11 or Java 17), I'd say an update might be advisable ;)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions