Skip to content

"invalid target release: 14" #97

Closed

Description

@ZeeD

I have enabled the codeql analysis on https://github.com/ZeeD/springbootplusdbunit
the project itself it's just a simple personal demo of integration. The pom is almost the same from https://start.spring.io/
unfortunately the autobuild step ended with error, and the cause is the title of the message.

I suspect the problem is just that it's not installed / used the latest jdk version, because I see Java version: 1.8.0_252, vendor: AdoptOpenJDK, runtime: /usr/lib/jvm/adoptopenjdk-8-hotspot-amd64/jre in the autobuild logs while java 14 is in GA.

It's possible to update the java version to the latest stable one?

Activity

  1. aibaars commented on Jul 2, 2020

    @aibaars
    Contributor

    It looks like the default JDK version in an Actions VM is 8. For reference: https://github.com/actions/virtual-environments/blob/master/images/linux/scripts/installers/java-tools.sh#L26

    I'd recommend using the actions/setup-java Action to select the Java version to use.

  2. ZeeD commented on Jul 3, 2020

    @ZeeD
    Author

    the actions/setup-java Action did the trick, thanks.
    maybe it would be useful to put

        - name: Setup Java JDK
          uses: actions/setup-java@v1.3.0
          with:
            java-version: 14
    

    with java-version commented out or autoinferred from the .pom properties in the automatically generated .yaml file

  3. robertbrignull commented on Jul 6, 2020

    @robertbrignull
    Contributor

    Glad that got it working for you. I'm going to close this issue as the original point has been satisfied. I'll create an issue internally for the feature improvement of autogenerating a setup-java step if the repo has a pom file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions