You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Konrad Windszus (Jira)" <ji...@apache.org> on 2021/07/26 21:10:00 UTC

[jira] [Comment Edited] (SLING-10673) Derive source for javadoc from property sling.java.version

    [ https://issues.apache.org/jira/browse/SLING-10673?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17387619#comment-17387619 ] 

Konrad Windszus edited comment on SLING-10673 at 7/26/21, 9:09 PM:
-------------------------------------------------------------------

Shouldn't we rather set property {{maven.compiler.source}} based on {{sling.java.version}}? What about the parameter {{release}} (https://maven.apache.org/plugins/maven-javadoc-plugin/javadoc-mojo.html#release) supported since JDK9?


was (Author: kwin):
Shouldn't we rather set property {{maven.compiler.source}} based on {{sling.java.version}}? What about the option {{release}} introduced with JDK9?

> Derive source for javadoc from property sling.java.version
> ----------------------------------------------------------
>
>                 Key: SLING-10673
>                 URL: https://issues.apache.org/jira/browse/SLING-10673
>             Project: Sling
>          Issue Type: Improvement
>            Reporter: Oliver Lietz
>            Assignee: Oliver Lietz
>            Priority: Major
>             Fix For: Parent 45
>
>
> Javadoc build fails due to missing source setting when using newer Java features:
> {noformat}
> [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
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)