camunda-community-hub / community-action-maven-release

Opinionated GitHub action to release community projects to Maven Central
Apache License 2.0
7 stars 4 forks source link

Error during javadoc generation #53

Closed pierre-yves-monnet closed 3 months ago

pierre-yves-monnet commented 1 year ago

When the action ran, I got this error during the generation of the Javadoc. It fails because it doesn't recognize lambda and stream function:

[INFO] --- maven-javadoc-plugin:3.4.1:jar (attach-javadocs) @ zeebe-cherry-framework ---
[INFO] No previous run data found, generating javadoc.
Error:  MavenReportException: Error while generating Javadoc: 
Exit code: 1 - /home/runner/work/zeebe-cherry-framework/zeebe-cherry-framework/src/main/java/io/camunda/cherry/admin/RunnerRestController.java:80: error: method references are not supported in -source 7
        .map(RunnerInformation::getRunnerInformation)
                                ^
  (use -source 8 or higher to enable method references)
/home/runner/work/zeebe-cherry-framework/zeebe-cherry-framework/src/main/java/io/camunda/cherry/admin/RunnerRestController.java:81: error: lambda expressions are not supported in -source 7
        .map(w -> this.completeRunnerInformation(w, // this
               ^
  (use -source 8 or higher to enable lambda expressions)

I tried to add

maven-additional-options: -source 17

without success.

What are the correct parameters? NB: it should be nice to have this parameters by default to publish JDK 1.17 code, at least in the README.

jonathanlukas commented 3 months ago

This is usually related to the runtime version of your workflow or the configured compiler source version