|
9 | 9 | import java.util.function.Consumer; |
10 | 10 | import java.util.stream.Collectors; |
11 | 11 |
|
12 | | -import io.quarkus.bootstrap.BootstrapConstants; |
13 | 12 | import org.apache.maven.plugin.MojoExecutionException; |
14 | 13 | import org.apache.maven.plugin.MojoFailureException; |
15 | 14 | import org.apache.maven.plugins.annotations.LifecyclePhase; |
16 | 15 | import org.apache.maven.plugins.annotations.Mojo; |
17 | 16 | import org.apache.maven.plugins.annotations.Parameter; |
18 | 17 | import org.apache.maven.plugins.annotations.ResolutionScope; |
19 | 18 |
|
| 19 | +import io.quarkus.bootstrap.BootstrapConstants; |
20 | 20 | import io.quarkus.bootstrap.app.ApplicationModelSerializer; |
21 | 21 | import io.quarkus.bootstrap.app.CuratedApplication; |
22 | 22 | import io.quarkus.bootstrap.classloading.QuarkusClassLoader; |
@@ -119,11 +119,16 @@ void generateCode(PathCollection sourceParents, Consumer<Path> sourceRegistrar, |
119 | 119 | .getSerializedTestAppModelPath(Path.of(mavenProject().getBuild().getDirectory())); |
120 | 120 | ApplicationModelSerializer.serialize(appModel, serializedTestAppModelPath); |
121 | 121 |
|
| 122 | + Properties properties = mavenProject().getProperties(); |
| 123 | + String argLine = properties.getProperty("argLine", ""); |
| 124 | + properties.setProperty("argLine", argLine + |
| 125 | + " -D" + BootstrapConstants.SERIALIZED_TEST_APP_MODEL + "=" + serializedTestAppModelPath); |
| 126 | + |
122 | 127 | String deployClasspath = appModel.getDependencies().stream() |
123 | 128 | .flatMap(dep -> dep.getResolvedPaths().stream()) |
124 | 129 | .map(Path::toString) |
125 | 130 | .collect(Collectors.joining(File.pathSeparator)); |
126 | | - mavenProject().getProperties().setProperty("quarkus.test.deploy.classpath", deployClasspath); |
| 131 | + properties.setProperty("quarkus.test.deploy.classpath", deployClasspath); |
127 | 132 | } catch (IOException e) { |
128 | 133 | getLog().warn("Failed to serialize application model", e); |
129 | 134 | } |
|
0 commit comments