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

Node variables not passed through to Maven jobs

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • maven-plugin
    • None
    • Platform: PC, OS: Windows XP

      Hudson 1.315 running in Tomcat 6, 64-bit Java 1.6.0_14 JVM, on Win2k3 server.

      Environment variables set in the main Hudson configuration are not passed to
      Maven tasks, neither are they available for use in options (e.g. MAVEN_OPTS)

      MAVEN_OPTS as defined in the job is passed directly to the JVM via the command
      line. Inserting %MAVEN_OPTS% (Windows style) or $MAVEN_OPTS or ${MAVEN_OPTS} as
      suggested in help popout do not expand the existing variable, but instead get
      inserted as literal text, stopping the process.

      Verified by running Maven help:system goal. This lists Java system properties
      and environment variables. Neither MAVEN_OPTS or the test TEST_STUPID_VAR were
      present, and the effects that MAVEN_OPTS should have on the JVM properties (in
      particular settings file.encoding) were not present either.

      This in direct contradiction of the release notes, which say that this should
      work. Reviewing the patch quoted at the bottom of issue 3644 this only seems to
      apply to the M2 release plugin.

      To be honest, I would have expected all environment variables defined in the
      Hudson config to be visible to all processes forked from Hudson - or else what's
      the point of having them at all? Environment expansion in all job settings is a
      natural convenience, and being able to also set environment variables in job
      types would also be useful.

            Unassigned Unassigned
            awilkins awilkins
            Votes:
            2 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: