Skip to content

Commit

Permalink
Add propagation of maven.repo.local on windows machine
Browse files Browse the repository at this point in the history
In case of linux we propagating all build arguments which also contains `maven.repo.local`.
This is not case on windows where we getting only specific set of them (starts with Quarkus).
When quarkus-qe#1359 was introducedThe build start separatly using maven.
But when provided path to local maven repo was set as cmd argument and the artifact is not public,
causing the windows failing the build of app with that forced artifact.
  • Loading branch information
jedla97 authored and michalvavrik committed Oct 17, 2024
1 parent 288e1f2 commit afdcab9
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import static io.quarkus.test.services.quarkus.model.QuarkusProperties.getPluginVersion;
import static io.quarkus.test.services.quarkus.model.QuarkusProperties.getVersion;
import static io.quarkus.test.utils.FileUtils.findTargetFile;
import static io.quarkus.test.utils.MavenUtils.MVN_REPOSITORY_LOCAL;
import static io.quarkus.test.utils.PropertiesUtils.SLASH;
import static io.quarkus.test.utils.PropertiesUtils.toMvnSystemProperty;
import static java.util.stream.Collectors.toSet;
Expand Down Expand Up @@ -237,6 +238,12 @@ private String[] getBuildCmd(Mode mode) {
toMvnSystemProperty(PLATFORM_VERSION.getPropertyKey(), getVersion()),
toMvnSystemProperty(PLATFORM_GROUP_ID.getPropertyKey(), PLATFORM_GROUP_ID.get()),
toMvnSystemProperty(PLUGIN_VERSION.getPropertyKey(), getPluginVersion())));

// Need to add local maven repo due to differences in `getCmdLineBuildArgs` as by default it's not picked on Windows
if (OS.WINDOWS.isCurrent() && System.getProperty(MVN_REPOSITORY_LOCAL) != null) {
cmdStream = Stream.concat(cmdStream,
Stream.of(toMvnSystemProperty(MVN_REPOSITORY_LOCAL, System.getProperty(MVN_REPOSITORY_LOCAL))));
}
var cmdLineBuildArgs = getCmdLineBuildArgs();
if (!cmdLineBuildArgs.isEmpty()) {
cmdStream = Stream.concat(cmdStream, cmdLineBuildArgs.stream());
Expand Down

0 comments on commit afdcab9

Please sign in to comment.