Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set maven.compiler flags explicitly #13710

Merged
merged 2 commits into from
Jul 30, 2024

Conversation

ankitsultana
Copy link
Contributor

Ran into another issue while doing 1.2.0 Release.

What was the error?

The error came on running release:prepare. There were a bunch of errors like the following. These were coming from the. maven-javadoc-plugin, which for some reason was using source Java version as 7:

[INFO] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:3.7.0:jar (attach-javadocs) on project pinot-spi: MavenReportException: Error while generating Javadoc:
[INFO] [ERROR] Exit code: 1
[INFO] [ERROR] /root/pinot-release/pinot/target/checkout/pinot-spi/src/main/java/org/apache/pinot/spi/annotations/metrics/PinotMetricsFactory.java:78: error: lambda expressions are not supported in -source 7
[INFO] [ERROR]       return () -> "noopMetricName";
[INFO] [ERROR]                 ^
[INFO] [ERROR]   (use -source 8 or higher to enable lambda expressions)
...

Why is the Javadoc Plugin using source version as 7

This is because maven-javadoc-plugin is apparently now using the "release" flag for JDK 9 and above. This flag was introduced in maven-javadoc-plugin:3.1.0 (ref). This is by default set to maven.compiler.release, which is set to 7 in Apache's POM (ref)

Why didn't this happen with Pinot 1.1.0 Release?

This is likely because of a version upgrade of maven-javadoc-plugin.

How do we know this change actually fixes the issue?

Verified by cloning the release-1.2.0-rc tag, and running the following. The command fails but when I use the patch in this PR, it works:

$ mvn javadoc:javadoc -pl pinot-spi

@xiangfu0
Copy link
Contributor

Thanks for fixing this!

@codecov-commenter
Copy link

codecov-commenter commented Jul 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 62.01%. Comparing base (59551e4) to head (0bbda16).
Report is 808 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master   #13710      +/-   ##
============================================
+ Coverage     61.75%   62.01%   +0.25%     
+ Complexity      207      198       -9     
============================================
  Files          2436     2554     +118     
  Lines        133233   140611    +7378     
  Branches      20636    21874    +1238     
============================================
+ Hits          82274    87193    +4919     
- Misses        44911    46789    +1878     
- Partials       6048     6629     +581     
Flag Coverage Δ
custom-integration1 <0.01% <ø> (-0.01%) ⬇️
integration <0.01% <ø> (-0.01%) ⬇️
integration1 <0.01% <ø> (-0.01%) ⬇️
integration2 0.00% <ø> (ø)
java-11 35.11% <ø> (-26.60%) ⬇️
java-21 61.90% <ø> (+0.27%) ⬆️
skip-bytebuffers-false 61.99% <ø> (+0.24%) ⬆️
skip-bytebuffers-true 61.86% <ø> (+34.13%) ⬆️
temurin 62.01% <ø> (+0.25%) ⬆️
unittests 62.00% <ø> (+0.25%) ⬆️
unittests1 46.44% <ø> (-0.45%) ⬇️
unittests2 27.78% <ø> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ankitsultana ankitsultana merged commit 7cafd70 into apache:master Jul 30, 2024
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants