Skip to content

Maven plugin (spring-boot:run) should take list for JVM arguments #9714

@alan-czajkowski

Description

@alan-czajkowski

Problem: It is too easy to break spring-boot:run by passing in garbage in the <jvmArguments> configuration. Currently it looks like this (not a list):

<plugin>
  <groupId>org.springframework.boot</groupId>
  <artifactId>spring-boot-maven-plugin</artifactId>
  <configuration>
    <jvmArguments>any kind of garbage</jvmArguments>
  </configuration>
</plugin>

Solution: The Maven plugin should allow passing in Java (JVM) system properties via some kind of list definition in XML.

Example solution:

<plugin>
  <groupId>org.springframework.boot</groupId>
  <artifactId>spring-boot-maven-plugin</artifactId>
  <configuration>
    <jvmArguments>
      <options>
        <option>-Xms512m</option>
        <option>-Xmx1024m</option>
      </options>
      <systemProperties>
        <systemProperty>systemProperty1=value1</systemProperty>
        <systemProperty>systemProperty2=value2</systemProperty>
      </systemProperties>
    </jvmArguments>
  </configuration>
</plugin>

where each <option> is passed in as-is to the JVM, and each <systemProperty> is pre-pended with a -D:

-Xms512m -Xmx1024m -DsystemProperty1=value1 -DsystemProperty2=value2

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: supersededAn issue that has been superseded by another

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions