Quarkus - how to provide java params to running app from maven runner?

Viewed 2158

When running:

mvn quarkus:dev

How can I provide params to jvm? I am looking for something similar to spring:

-Dspring-boot.run.jvmArguments="Dfile.encoding=UTF-8"

or older:

-Drun.jvmArguments="-Dfile.encoding=UTF-8"
1 Answers

You can use the jvm.args property from command line:

mvn quarkus:dev -Djvm.args=...

Or specify the same in Maven's parameters:

<project ...>
    ...
    <properties>
        <jvm.args>-Dquarkus.datasource.url=...</jvm.args>
    </properties>
    ...
</project>

Or through the jvmArgs property of the plugin:

<project ...>
    ...
    <build>
        <plugins>
            <plugin>
                <groupId>io.quarkus</groupId>
                <artifactId>quarkus-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>dev</goal>
                        </goals>
                        <phase>...</phase>
                    </execution>
                </executions>
                <configuration>
                    <jvmArgs>-Dquarkus.datasource.url=...</jvmArgs>
                </configuration>
            </plugin>
        </plugins>
    </build>
    ...
</project>
Related