maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Scholte (JIRA)" <>
Subject [jira] [Commented] (MJAVADOC-538) JVM "JAVA_TOOL_OPTIONS" or "_JAVA_OPTIONS" message detected as javadoc warning, triggers failure
Date Wed, 19 Sep 2018 17:36:00 GMT


Robert Scholte commented on MJAVADOC-538:

Interesting, based on
such lines should be ignored. Seems like there's a path that doesn't use this StringStreamConsumer

> JVM "JAVA_TOOL_OPTIONS" or "_JAVA_OPTIONS" message detected as javadoc warning, triggers
> -------------------------------------------------------------------------------------------------
>                 Key: MJAVADOC-538
>                 URL:
>             Project: Maven Javadoc Plugin
>          Issue Type: Bug
>    Affects Versions: 3.0.1
>         Environment: Maven 3.5.4
> Java 1.8.0_181
>            Reporter: Yoann Rodière
>            Priority: Major
> When an environment variable {{_JAVA_OPTIONS}} or {{JAVA_TOOL_OPTIONS}} is defined,
every JVM that starts will output a message to inform users of these options being picked
> {noformat}
> $ export JAVA_TOOL_OPTIONS=-Dfoo
> $ java -version                 
> Picked up JAVA_TOOL_OPTIONS: -Dfoo
> java version "1.8.0_181"
> Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
> Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode){noformat}
> Apparently this message cannot be suppressed, that's on purpose an won't change: []
> Unfortunately, this message seems to be interpreted by the maven-javadoc-plugin as a
> {noformat}
> [INFO] --- maven-javadoc-plugin:3.0.1:javadoc-no-fork (generate-javadoc) @ hibernate-search-util-internal-common
> [INFO] The goal 'org.apache.maven.plugins:maven-javadoc-plugin:3.0.1:javadoc' has not
been previously called for the module: ''.
Trying to invoke it...
> [WARN] Maven will be executed in interactive mode, but no input stream has been configured
for this MavenInvoker instance.
> Picked up JAVA_TOOL_OPTIONS: -Dfoo
> [WARNING] Creating fake javadoc directory to prevent repeated invocations: /home/yrodiere/workspaces/main/hibernate-search-parent/util/internal/test/target/site/apidocs
> [ERROR] Error fetching link: /home/yrodiere/workspaces/main/hibernate-search-parent/util/internal/test/target/site/apidocs/package-list.
Ignored it.
> [WARNING] Javadoc Warnings
> {noformat}
> (see the last line, the message appears in the list of warnings)
> No big deal... until you enable the [failOnWarnings|]
option. Then the whole build will fail just because some JVM detected an environment variable...
> I couldn't find any workaround, except disabling the {{failOnWarnings}} options, but
that's more a surrender than a workaround.
> Note that the definition of {{_JAVA_OPTIONS}} or {{JAVA_TOOL_OPTIONS}} is not exactly
an exotic use case, especially on Continuous Integration platforms. [Travis CI uses {{_JAVA_OPTIONS}}
|] to set JVM memory
limits in its containerized environments, and [the Jenkins CI Pipeline Maven plugin uses {{JAVA_TOOL_OPTIONS}}|[WARNING]PickedupJAVA_TOOL_OPTIONS...%22inthebuildlogs?]
to pass options to Maven processes transparently.

This message was sent by Atlassian JIRA

View raw message