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

Maven Wrapper no longer supports MAVEN_CONFIG

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • pipeline-maven-plugin
    • None
    • Jenkins 2.478
      Pipeline Maven Integration 1421.v610fa_b_e2d60e
      Maven 3.9.9
      Maven Wrapper 3.3.2

      withMaven() sets the MAVEN_CONFIG environment variable to pass some additional command line arguments to mvnw. This wasn't a documented feature and so it was removed in versions >=3.3.0 of the wrapper. Unfortunately without warning or making it deprecated first.

      Maven >=3.9.0 directly supports MAVEN_ARGS for the same purpose of passing in command line arguments via environment variable.

      As such it would be nice if the Pipeline Maven Integration could also support MAVEN_ARGS as a replacement for MAVEN_CONFIG. But I'm not sure how to make the switch while being compatible with setups that still support and need MAVEN_CONFIG. Setting both might be fine; not sure if setting these arguments twice can cause problems. though.

      Also, since MAVEN_ARGS is an official feature and may already be set for other reasons, it might be better to append any command line arguments, instead of completely overriding the variable as is done for MAVEN_CONFIG.

            Unassigned Unassigned
            frettman Patrick
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: