Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-14416

maven build's java.io.tmpdir property cannot be configured, removed or overridden

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Low
    • None
    • 5.4.2
    • Maven
    • None

    Description

      I need to specify a per-job directory for java.io.tmpdir by adding "-Djava.io.tmpdir=/path/to/tmp/${bamboo.buildKey}" to the maven goal in my build, but when the job runs, it still uses a default java.io.tmpdir property:

      running command line: \n/usr/share/maven/bin/mvn --batch-mode -Djava.io.tmpdir=/opt/build/bamboo/bamboo-app/atlassian-bamboo/temp/RCS-ENGAGE-SERVERTEST test -Djava.io.tmpdir=/opt/build/tmp/bamboo/RCS-ENGAGE-SERVERTEST

      "test -Djava.io.tmpdir=/opt/build/tmp/bamboo/${bamboo.buildKey}" is what I specify in the goal field, so it appears to be appending it as expected, but maven ignores the second definition of it.

      I can't find a way to either remove or configure the first java.io.tmpdir property definition at the job level outside of the goal.

      Expected behavior is to not have Bamboo automatically put a default java.io.tmpdir property in the maven command arguments so that one can be defined in the goal field.

      Workaround

      As of Bamboo 6.9 maven's java.io.tmpdir property is constructed using value of system property bamboo.build.parent.java.io.tmpdir (or java.io.tmpdir if the former is not set) suffixed with a job-specific subdirectory. Thus one can use bamboo.build.parent.java.io.tmpdir system property passed to agent to affect the tmp dir location for all maven executions for a given agent.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              a39e4cc5d04e starmount-bcreasy
              Votes:
              13 Vote for this issue
              Watchers:
              13 Start watching this issue

              Dates

                Created:
                Updated: