Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable -D argument propagation in DevMojo #30418

Merged
merged 1 commit into from
Jan 19, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 0 additions & 22 deletions devtools/maven/src/main/java/io/quarkus/maven/DevMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@
import io.quarkus.bootstrap.resolver.maven.BootstrapMavenContext;
import io.quarkus.bootstrap.resolver.maven.BootstrapMavenContextConfig;
import io.quarkus.bootstrap.resolver.maven.MavenArtifactResolver;
import io.quarkus.bootstrap.resolver.maven.options.BootstrapMavenOptions;
import io.quarkus.bootstrap.util.BootstrapUtils;
import io.quarkus.bootstrap.workspace.ArtifactSources;
import io.quarkus.bootstrap.workspace.SourceDir;
Expand Down Expand Up @@ -1184,7 +1183,6 @@ private QuarkusDevModeLauncher newLauncher(Boolean debugPortOk) throws Exception
if (argsString != null) {
builder.applicationArgs(argsString);
}
propagateUserProperties(builder);

return builder.build();
}
Expand All @@ -1207,26 +1205,6 @@ private void setJvmArgs(Builder builder) throws Exception {

}

private void propagateUserProperties(MavenDevModeLauncher.Builder builder) {
Properties userProps = BootstrapMavenOptions.newInstance().getSystemProperties();
if (userProps == null) {
return;
}
final StringBuilder buf = new StringBuilder();
buf.append("-D");
for (Object o : userProps.keySet()) {
String name = o.toString();
final String value = userProps.getProperty(name);
buf.setLength(2);
buf.append(name);
if (value != null && !value.isEmpty()) {
buf.append('=');
buf.append(value);
}
builder.jvmArgs(buf.toString());
}
}

private void applyCompilerFlag(Optional<Xpp3Dom> compilerPluginConfiguration, String flagName,
Consumer<String> builderCall) {
compilerPluginConfiguration
Expand Down