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

withMaven is not picking mavenOpts: '-Xmx2048m'

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      I am getting an error "java.lang.OutOfMemoryError: Java heap space" when i am trying to build my code.

      And I am trying to pass JAVA_OPTIONS as below but for some reason it is not being passed.
      stage('Build') { steps { script { withMaven(mavenOpts: '-Xmx2048m')

      { sh("mvn package -DskipTests=true") }

      }
      }
      }
      Could see in the logs as below:
      [withMaven] Options: []
      [withMaven] Available options:
      [withMaven] using JDK installation provided by the build agent
      $ /bin/sh -c "which mvn"
      [withMaven] using Maven installation provided by the build agent with executable /apps/pcehr/tools/apache-maven-3.3.9/bin/mvn
      [Pipeline] {
       

        Attachments

          Activity

          boby8064 Sadguru Chikkam created issue -
          aheritier Arnaud Héritier made changes -
          Field Original Value New Value
          Assignee Alvaro Lobato [ alobato ]
          aheritier Arnaud Héritier made changes -
          Assignee Arnaud Héritier [ aheritier ]

            People

            Assignee:
            aheritier Arnaud Héritier
            Reporter:
            boby8064 Sadguru Chikkam
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated: