Skip to content

jvmArguments is ignored when fork is set to false #7588

@mtyurt

Description

@mtyurt

For following pom file,

<plugin>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-maven-plugin</artifactId>
    <version>1.4.2.RELEASE</version>
    <configuration>
        <profiles>
            <profile>dev</profile>
        </profiles>
        <jvmArguments>-Dbase.dir=/Users/mt/dev/ops/maven-test</jvmArguments>
        <fork>false</fork>
    </configuration>
    <executions>
        <execution>
            <goals>
                <goal>repackage</goal>
            </goals>
        </execution>
    </executions>
</plugin>

null is returned when I execute System.getProperty("base.dir") in the code. When I remove the fork configuration, the same property is set properly. I have read the documents that the process is forked when jvmArguments or agent is specified, I somehow forgot the fork configuration and it took me quite a time to just remove the line. I expected jvmArguments to override fork configuration, or a simple error that would fail the build is also OK.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions