Fatal error compiling: invalid target release: 11

Description

I’ve just installed my first repository and it immediately gives this error. Removing the following lines does fix the issue, but I don’t want them removed:

<java.version>11</java.version>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>

Repository

Private

Steps to Reproduce

  1. Create Spring Boot Maven project
  2. Add the code above
  3. Add the .travis.yml file
  4. Add the following code in the file:
    language: java
    script: “mvn cobertura:cobertura”
    after_success:
  5. Run: mvn cobertura:cobertura

Expected behavior: Build success

Actual behavior: Build failure (fatal error compiling: invalid target release: 11)

Flakiness? Always

Versions

Java JDK 11
Windows 10
Spring Boot

Additional Information

It gives this article as possible solution: https://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException but that only says that it’s a plugin error

When I run the program normally, everything works. Only when I run this specific command it doesn’t.

Hi @MieskeB, can you provide the codecov.yml, Codecov output, and relevant commit SHAs?