Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8794999
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T23:19:38+00:00 2026-06-13T23:19:38+00:00

I am building a Maven Java app on a Jenkins build server. I am

  • 0

I am building a Maven Java app on a Jenkins build server. I am running into java.lang.OutOfMemoryError: PermGen space many times during the build on Jenkins (but never on my localhost) and hence it fails my build.

I have already tried setting MAVEN_OPTS for Jenkins: I went into Jenkins–>Manage Jenkins–>Configure system–>Global MAVEN_OPTS and it was set to -Xms512m -Xmx1024m -XX:MaxPermSize=512m -XX:PermSize=512m. Despite setting it to this high value, we keep running into the PermGen space issues. I don’t want to set the MAVEN_OPTS to a higher value; I do not see how my app can require a gig of space, and I’d rather dig deep into the high-memory-usage problem.

Lately, I’ve been thinking that perhaps the permgen space issue is NOT coming from Maven itself but rather one of the JVM processes that Maven spins off (ex: plugins). I propose this hypothesis because Maven is still able to execute TestNG tests alright, despite already spitting our the permgen space error lines. One such plugin that is causing the PermGen error is Jetty:

Oct 31, 2012 7:55:37 AM com.google.apphosting.utils.jetty.JettyLogger warn
WARNING: handle failed
java.lang.OutOfMemoryError: PermGen space

Hence, I would like to know:

Does the MAVEN_OPTS variable also apply to child JVM processes that a Maven build spins off? If not, then how do I set the JVM options for these child processes such as Jetty?

NOTE: I am using Maven 3.0.4.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T23:19:39+00:00Added an answer on June 13, 2026 at 11:19 pm

    Most Maven plugins that spawn Java processes will have their own way of specifying JVM command line arguments. For example, you can configure heap and permgen sizes in processes spawned by the Surefire plugin using the argLine configuration parameter (see http://maven.apache.org/plugins/maven-surefire-plugin/test-mojo.html#argLine).

    The Jetty plugin doesn’t spawn processes, so heap and permgen are governed by JVM arguments provided to the Maven process.

    If you are running out of memory when running from Jenkins but not when running locally, check the MAVEN_OPTS that Jenkins passes to Maven.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am currently building a little Apache-Mina Server app. I am using Maven to
We are use TFS 2010 for building java maven project (Team Price build extension).
I'm trying to build my Flex/Java web app from within IntelliJ rather than have
i'm trying to include a maven java project into my android project. the maven
I have a Java project I am building with Maven. I am now trying
I have java project with building rpm by maven. Required create noarch packets, but
I have a Java EE application that I am building with Spring and Maven.
I'm building a java project with maven-2 and due to some dependencies listed, and
I am using maven 2.2.1 version as a build tool for my Java Application
I'm building an executable jar for a maven java project I have. It works

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.