quarkusio/quarkus · error · RuntimeException
Invalid system property: ${prop}
Error message
Invalid system property: ${prop} What it means
RunMojo (mvn quarkus:dev) parses the comma-separated `jvmArgs`-style system property list and requires every entry to be in key=value form. When a split on '=' yields anything other than 2 parts (e.g. no '=' at all), it throws RuntimeException 'Invalid system property: <prop>'. The offending property name is interpolated into the message.
Source
Thrown at devtools/maven/src/main/java/io/quarkus/maven/RunMojo.java:128
break;
}
} else if (cmds.size() > 2) {
tooMany.set(cmds.keySet().stream().collect(Collectors.joining(" ")));
return;
} else {
throw new RuntimeException("Should never reach this!");
}
List<String> args = (List<String>) cmd.get(0);
if (additionalSystemProperties != null) {
String[] props = additionalSystemProperties.split(",");
for (int i = props.length - 1; i >= 0; i--) {
String prop = props[i];
String[] parts = prop.split("=");
if (parts.length == 2) {
// we want to set the system property write after the command
args.add(1, "-D" + prop);
} else {
throw new RuntimeException("Invalid system property: " + prop);
}
}
}
if (programArguments != null) {
args.addAll(Arrays.asList(programArguments.split(",")));
}
if (getLog().isInfoEnabled()) {
getLog().info("Executing \"" + String.join(" ", args) + "\"");
}
Path workingDirectory = (Path) cmd.get(1);
var pb = ProcessBuilder.newBuilder(args.get(0))
.arguments(args.subList(1, args.size()))
.output().inherited()
.error().inherited();
if (workingDirectory != null) {
pb.directory(workingDirectory);
}
if ((environmentVariables != null) && !environmentVariables.isEmpty()) {View on GitHub (pinned to e1c734241f)
Solutions
- Always supply a value: use foo= (empty value) instead of bare foo
- For values containing '=', check the current Quarkus version: newer code splits with a limit; upgrade quarkus-maven-plugin, or quote/encode the value
- Ensure the list is comma-separated with no stray spaces; trim entries
- If you need a property set without a value, set it as -Dfoo= via the run arguments instead
Example fix
// before
-Dquarkus.jvm.args=-Dmy.prop
// after
-Dquarkus.jvm.args=-Dmy.prop=
// or for values containing '='
-Dquarkus.jvm.args="-Dmy.prop=foo==bar" (only on versions using split("=",2)) Defensive patterns
Strategy: validation
Validate before calling
// Validate each jvm/system property entry before invoking quarkus:dev:
for (String p : props.split(",")) {
if (!p.matches("[^=]+=.*")) throw new IllegalArgumentException("Invalid system property: " + p);
} Try / catch
try { runMojo.execute(); }
catch (RuntimeException e) {
if (e.getMessage().startsWith("Invalid system property")) {
log.error("Fix the jvmProps entry to key=value form: {}", e.getMessage());
} else throw e;
} Prevention
- Always write properties as key=value, using key= for empty values
- Avoid '=' inside property values unless your Quarkus version splits with limit 2
- Don't put commas inside property values (the list is comma-separated)
- Upgrade quarkus-maven-plugin to get tolerant value parsing
When it happens
Trigger: Passing a system property without a value or with malformed syntax to quarkus:dev, e.g. -Dquarkus.args.jvmProps (or the equivalent args entry) containing 'foo' or 'foo=bar=baz' style entries — split("=") on 'foo=bar=baz' yields 3 parts.
Common situations: Shorthand flags without values; copying -Dfoo from JVM command lines where the value was implicit; commas inside property values splitting the list; properties containing '=' in their value (e.g. base64) that produce >2 parts.
Related errors
- Unable to parse pom file: ${pom}
- Could not resolve POM for
- Failed to log the dependency tree to a file
- Parameter 'mode' was set to '<mode>' while expected one of '
- Failed to resolve application model <appArtifact> dependenci
AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05).
Data as JSON: /api/errors/5f5e10472dc792af.
Report an issue: GitHub.