Skip to content

Commit

Permalink
Merge pull request #624 from gsmet/quarkus-2.12.3
Browse files Browse the repository at this point in the history
Upgrade to Quarkus 2.12.3.Final
  • Loading branch information
gsmet authored Sep 20, 2022
2 parents 6c6b1ad + 0a883fd commit 81fff55
Show file tree
Hide file tree
Showing 6 changed files with 1,199 additions and 1,172 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package io.quarkus.maven;

import static io.smallrye.common.expression.Expression.Flag.LENIENT_SYNTAX;
import static io.smallrye.common.expression.Expression.Flag.NO_TRIM;
import static java.util.function.Predicate.not;
import static org.twdata.maven.mojoexecutor.MojoExecutor.artifactId;
import static org.twdata.maven.mojoexecutor.MojoExecutor.configuration;
Expand Down Expand Up @@ -104,6 +106,7 @@
import io.quarkus.maven.dependency.ResolvedDependency;
import io.quarkus.paths.PathList;
import io.quarkus.runtime.LaunchMode;
import io.smallrye.common.expression.Expression;

/**
* The dev mojo, that runs a quarkus app in a forked process. A background compilation process is launched and any changes are
Expand Down Expand Up @@ -972,7 +975,31 @@ private QuarkusDevModeLauncher newLauncher() throws Exception {
}

builder.projectDir(project.getFile().getParentFile());
builder.buildSystemProperties((Map) project.getProperties());

Properties projectProperties = project.getProperties();
Map<String, String> effectiveProperties = new HashMap<>();
for (String name : projectProperties.stringPropertyNames()) {
if (name.startsWith("quarkus.")) {
effectiveProperties.put(name, projectProperties.getProperty(name));
}
}

// Add other properties that may be required for expansion
for (String value : effectiveProperties.values()) {
for (String reference : Expression.compile(value, LENIENT_SYNTAX, NO_TRIM).getReferencedStrings()) {
String referenceValue = session.getUserProperties().getProperty(reference);
if (referenceValue != null) {
effectiveProperties.put(reference, referenceValue);
continue;
}

referenceValue = projectProperties.getProperty(reference);
if (referenceValue != null) {
effectiveProperties.put(reference, referenceValue);
}
}
}
builder.buildSystemProperties(effectiveProperties);

builder.applicationName(project.getArtifactId());
builder.applicationVersion(project.getVersion());
Expand Down
Loading

0 comments on commit 81fff55

Please sign in to comment.