Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-65528

Option to avoid "Picked up JAVA_TOOL_OPTIONS" messages

      I started using the plugin, and in the FAQ it says that there is no way to avoid

      [WARNING] Picked up JAVA_TOOL_OPTIONS: -Dmaven.ext.class.path="/path/to/workspace/...@tmp/withMaven.../pipeline-maven-spy.jar" -Dorg.jenkinsci.plugins.pipeline.maven.reportsFolder="/path/to/workspace/...@tmp"

      message.

      However, this results in red-colored messages all over the place.

      I have an idea on how to avoid this: introduce an option to put 

      -Dmaven.ext.class.path=".../pipeline-maven-spy.jar" -Dorg.jenkinsci.plugins.pipeline.maven.reportsFolder="..."

      arguments into MAVEN_OPTS (optionally) instead of JAVA_TOOL_OPTIONS

       Something like

      withMaven(dontUseToolsOptions: true) { ... }
      

       

      This way, these messages can be avoided, and the release plugin functionality can be preserved.

      Currently, I am using something like this to avoid this issue, but it's cumbersome and not scalable:

      withMaven {
       sh """
       export MAVEN_OPTS="\$MAVEN_OPTS $JAVA_TOOL_OPTIONS"                    
       unset JAVA_TOOL_OPTIONS                    
       mvn verify \$(eval echo \$MAVEN_ADD_OPTIONS)
       """
      }

          [JENKINS-65528] Option to avoid "Picked up JAVA_TOOL_OPTIONS" messages

          Lenny created issue -
          Lenny made changes -
          Assignee New: Arnaud Héritier [ aheritier ]
          Lenny made changes -
          Description Original: I started using the plugin, and in the FAQ it says that there is no way to avoid JAVA_TOOL_OPTIONS message.

          However, this results in red-colored messages all over the place.

          I have an idea on how to avoid this: introduce an option to put 

          -Dmaven.ext.class.path=".../pipeline-maven-spy.jar" -Dorg.jenkinsci.plugins.pipeline.maven.reportsFolder="..."

          arguments into MAVEN_OPTS (optionally)

           

          Something like withMaven(dontUseToolsOptions: true) {

          ...

          }

          This way, these messages can be avoided, and the release plugin functionality can be preserved.
          New: I started using the plugin, and in the FAQ it says that there is no way to avoid
          {code:java}
          JAVA_TOOL_OPTIONS{code}
          message.

          However, this results in red-colored messages all over the place.

          I have an idea on how to avoid this: introduce an option to put 
          {code:java}
          -Dmaven.ext.class.path=".../pipeline-maven-spy.jar" -Dorg.jenkinsci.plugins.pipeline.maven.reportsFolder="..."{code}
          arguments into MAVEN_OPTS (optionally) instead of JAVA_TOOL_OPTIONS

           Something like
          {code:java}
          withMaven(dontUseToolsOptions: true) { ... }
          {code}
           

          This way, these messages can be avoided, and the release plugin functionality can be preserved.

          Currently, I am using something like this to avoid this issue, but it's cumbersome and not scalable:
          {code:java}
          withMaven {
           sh """\
           MAVEN_OPTS="$MAVEN_OPTS $JAVA_TOOL_OPTIONS" \
           env -u JAVA_TOOL_OPTIONS \
           mvn verify \
           """{code}

           }
          Lenny made changes -
          Summary Original: Option to avoid Picked up JAVA_TOOL_OPTIONS messages New: Option to avoid "Picked up JAVA_TOOL_OPTIONS" messages
          Lenny made changes -
          Description Original: I started using the plugin, and in the FAQ it says that there is no way to avoid
          {code:java}
          JAVA_TOOL_OPTIONS{code}
          message.

          However, this results in red-colored messages all over the place.

          I have an idea on how to avoid this: introduce an option to put 
          {code:java}
          -Dmaven.ext.class.path=".../pipeline-maven-spy.jar" -Dorg.jenkinsci.plugins.pipeline.maven.reportsFolder="..."{code}
          arguments into MAVEN_OPTS (optionally) instead of JAVA_TOOL_OPTIONS

           Something like
          {code:java}
          withMaven(dontUseToolsOptions: true) { ... }
          {code}
           

          This way, these messages can be avoided, and the release plugin functionality can be preserved.

          Currently, I am using something like this to avoid this issue, but it's cumbersome and not scalable:
          {code:java}
          withMaven {
           sh """\
           MAVEN_OPTS="$MAVEN_OPTS $JAVA_TOOL_OPTIONS" \
           env -u JAVA_TOOL_OPTIONS \
           mvn verify \
           """{code}

           }
          New: I started using the plugin, and in the FAQ it says that there is no way to avoid
          {code:java}
          [WARNING] Picked up JAVA_TOOL_OPTIONS: -Dmaven.ext.class.path="/path/to/workspace/...@tmp/withMaven.../pipeline-maven-spy.jar" -Dorg.jenkinsci.plugins.pipeline.maven.reportsFolder="/path/to/workspace/...@tmp"{code}
          message.

          However, this results in red-colored messages all over the place.

          I have an idea on how to avoid this: introduce an option to put 
          {code:java}
          -Dmaven.ext.class.path=".../pipeline-maven-spy.jar" -Dorg.jenkinsci.plugins.pipeline.maven.reportsFolder="..."{code}
          arguments into MAVEN_OPTS (optionally) instead of JAVA_TOOL_OPTIONS

           Something like
          {code:java}
          withMaven(dontUseToolsOptions: true) { ... }
          {code}
           

          This way, these messages can be avoided, and the release plugin functionality can be preserved.

          Currently, I am using something like this to avoid this issue, but it's cumbersome and not scalable:
          {code:java}
          withMaven {
           sh """\
           MAVEN_OPTS="$MAVEN_OPTS $JAVA_TOOL_OPTIONS" \
           env -u JAVA_TOOL_OPTIONS \
           mvn verify \
           """{code}
          }

          thanks for your feedback lprimak

          I'll try to look at it ASAP

          Arnaud Héritier added a comment - thanks for your feedback lprimak I'll try to look at it ASAP

          Lenny added a comment -

          Thanks Arnaud!

          Lenny added a comment - Thanks Arnaud!
          Lenny made changes -
          Description Original: I started using the plugin, and in the FAQ it says that there is no way to avoid
          {code:java}
          [WARNING] Picked up JAVA_TOOL_OPTIONS: -Dmaven.ext.class.path="/path/to/workspace/...@tmp/withMaven.../pipeline-maven-spy.jar" -Dorg.jenkinsci.plugins.pipeline.maven.reportsFolder="/path/to/workspace/...@tmp"{code}
          message.

          However, this results in red-colored messages all over the place.

          I have an idea on how to avoid this: introduce an option to put 
          {code:java}
          -Dmaven.ext.class.path=".../pipeline-maven-spy.jar" -Dorg.jenkinsci.plugins.pipeline.maven.reportsFolder="..."{code}
          arguments into MAVEN_OPTS (optionally) instead of JAVA_TOOL_OPTIONS

           Something like
          {code:java}
          withMaven(dontUseToolsOptions: true) { ... }
          {code}
           

          This way, these messages can be avoided, and the release plugin functionality can be preserved.

          Currently, I am using something like this to avoid this issue, but it's cumbersome and not scalable:
          {code:java}
          withMaven {
           sh """\
           MAVEN_OPTS="$MAVEN_OPTS $JAVA_TOOL_OPTIONS" \
           env -u JAVA_TOOL_OPTIONS \
           mvn verify \
           """{code}
          }
          New: I started using the plugin, and in the FAQ it says that there is no way to avoid
          {code:java}
          [WARNING] Picked up JAVA_TOOL_OPTIONS: -Dmaven.ext.class.path="/path/to/workspace/...@tmp/withMaven.../pipeline-maven-spy.jar" -Dorg.jenkinsci.plugins.pipeline.maven.reportsFolder="/path/to/workspace/...@tmp"{code}
          message.

          However, this results in red-colored messages all over the place.

          I have an idea on how to avoid this: introduce an option to put 
          {code:java}
          -Dmaven.ext.class.path=".../pipeline-maven-spy.jar" -Dorg.jenkinsci.plugins.pipeline.maven.reportsFolder="..."{code}
          arguments into MAVEN_OPTS (optionally) instead of JAVA_TOOL_OPTIONS

           Something like
          {code:java}
          withMaven(dontUseToolsOptions: true) { ... }
          {code}
           

          This way, these messages can be avoided, and the release plugin functionality can be preserved.

          Currently, I am using something like this to avoid this issue, but it's cumbersome and not scalable:
          {code:java}
          withMaven {
           sh """\
           MAVEN_OPTS="$MAVEN_OPTS $JAVA_TOOL_OPTIONS" \
           env -u JAVA_TOOL_OPTIONS \
           mvn verify \
           """
          }{code}
          Arnaud Héritier made changes -
          Assignee Original: Arnaud Héritier [ aheritier ]

          Lenny added a comment -

          Any updates on this issue? Thank you!

          Lenny added a comment - Any updates on this issue? Thank you!

            Unassigned Unassigned
            lprimak Lenny
            Votes:
            6 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated: