2

I am trying to build a GitHub Actions workflow as a Continuous Deployment procedure on this forked repository of a Clojure project.

The process goes well until it reaches this point:

Error:  Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project flow: Compilation failure: Compilation failure: 
Error:  Source option 5 is no longer supported. Use 6 or later.
Error:  Target option 1.5 is no longer supported. Use 1.6 or later.
Error:  -> [Help 1]

Usually, other problems in Stack Overflow related to this error message involve tweaking the pom.xml (see examples: 1, 2, 3, 4, 5, 6).

However, since this is a Clojure project managed by Leiningen, there is not such a file initially. The pom.xml is generated after lein install (and other command) is executed. Clojure is a hosted language on the JVM, after all.

As a side note, I am not sure why this project has :java-source-paths (link) instead of :source-paths. Not sure if this aspect is related to the problem discussed here.

How to fix it?

Pedro Delfino
  • 2,421
  • 1
  • 15
  • 30
  • 1
    First define the version of the maven-compiler-plugin (https://maven.apache.org/plugins/) and define `..` + `..` or JDK9+ use `..`... – khmarbaise Jan 13 '23 at 16:43
  • 1
    If you cannot fix the Pom.xml, you can override with system properties. See https://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html – Thorbjørn Ravn Andersen Jan 14 '23 at 13:08

0 Answers0