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

MAVEN_OPTS not used when letting Hudson deploy to maven repo

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • maven-plugin
    • None
    • 64-bit Windows Server 2003 SP2 on 2-way, 8MB Intel virtual machine

      When building we have Hudson run the maven goals "clean install", then we use the Hudson project option "Deploy artifacts to Maven repository" to deploy project artifacts to our Maven repo. When trying to deploy a 80MB ear, we get an OutOfMemoryError.

      Initially, I tried increasing the heap by using the project configuration setting: Build -> Advanced -> MAVEN_OPTS, but this seemed to have no effect. Then I tried the global MAVEN_OPTS under Manage Hudson -> Configure System -> Maven Project Configuration. Again, no help.

      Then I tried adding -XX:+HeapDumpOnOutOfMemoryError in both places, but was not getting a heap dump when the OOM error occurred. I began to suspect that neither of those MAVEN_OPTS were being used when I let Hudson run "mvn deploy" for me.

      So I abandoned that option, took out the -Xmx options, kept -XX:+HeapDump..., and added <distributionManagement> to my POM, and had Hudson run the "clean deploy" maven goals. This time, when I got the OOM error, I got a heap dump. I added the -Xmx back in to the project-level MAVEN_OPTS and the deployment succeeded.

      So it would seem there is no way to set MAVEN_OPTS when letting Hudson deploy artifacts for you via the "Deploy artifacts to Maven repository" option. Can we get this added (or at least have it use the global MAVEN_OPTS)?

            Unassigned Unassigned
            tdrury tdrury
            Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated: