Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Done
-
None
-
None
-
None
Description
Javadoc build fails due to missing source setting when using newer Java features:
[INFO] --- maven-javadoc-plugin:3.3.0:javadoc (default-cli) @ org.apache.sling.commons.messaging.mail --- [INFO] No previous run data found, generating javadoc. [INFO] Loading source files for package org.apache.sling.commons.messaging.mail... Loading source files for package org.apache.sling.commons.messaging.mail.internal... 4 errors [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 21.334 s [INFO] Finished at: 2021-07-26T21:04:04+02:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:3.3.0:javadoc (default-cli) on project org.apache.sling.commons.messaging.mail: An error has occurred in Javadoc report generation: [ERROR] Exit code: 1 - /.../org.apache.sling.commons.messaging.mail/src/main/java/org/apache/sling/commons/messaging/mail/MessageBuilder.java:408: error: type annotations are not supported in -source 7 [ERROR] public abstract @NotNull MessageBuilder attachment(final byte @NotNull [] content, @NotNull final String type, @NotNull final String filename); [ERROR] ^ [ERROR] (use -source 8 or higher to enable type annotations) [ERROR] /.../org.apache.sling.commons.messaging.mail/src/main/java/org/apache/sling/commons/messaging/mail/internal/SimpleMessageBuilder.java:332: error: type annotations are not supported in -source 7 [ERROR] public @NotNull MessageBuilder attachment(final byte @NotNull [] content, @NotNull final String type, @NotNull final String filename) { [ERROR] ^ [ERROR] (use -source 8 or higher to enable type annotations) [ERROR] /.../org.apache.sling.commons.messaging.mail/src/main/java/org/apache/sling/commons/messaging/mail/internal/SimpleMailService.java:170: error: lambda expressions are not supported in -source 7 [ERROR] return CompletableFuture.runAsync(() -> send(message), threadPool::submit); [ERROR] ^ [ERROR] (use -source 8 or higher to enable lambda expressions) [ERROR] /.../org.apache.sling.commons.messaging.mail/src/main/java/org/apache/sling/commons/messaging/mail/internal/SimpleMailService.java:170: error: method references are not supported in -source 7 [ERROR] return CompletableFuture.runAsync(() -> send(message), threadPool::submit); [ERROR] ^ [ERROR] (use -source 8 or higher to enable method references) [ERROR] [ERROR] Command line was: /usr/local/Cellar/openjdk@11/11.0.10/libexec/openjdk.jdk/Contents/Home/bin/javadoc @options @packages [ERROR] [ERROR] Refer to the generated Javadoc files in '/.../org.apache.sling.commons.messaging.mail/target/site/apidocs' dir. [ERROR] [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Attachments
Issue Links
- causes
-
SLING-10794 Update to Sling Bundle Parent 45
- Resolved
-
SLING-10797 Update to Sling Bundle Parent 45
- Closed
-
SLING-10799 Update to Sling Bundle Parent 45
- Closed
-
SLING-10800 Update to Sling Bundle Parent 45
- Closed
-
SLING-10801 Update to Sling Bundle Parent 45
- Closed
-
SLING-10802 Update to Sling Bundle Parent 45
- Closed