Use takari-local-repository for the main build so that mrm-maven-plugin's writes to the local repo are correct

This commit is contained in:
Peter Palaga
2020-10-07 09:13:44 +02:00
parent ef2bd36214
commit 96a4e701a9
3 changed files with 39 additions and 1 deletions

View File

@@ -94,14 +94,21 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>mrm-maven-plugin</artifactId>
<version>1.2.0</version>
<executions>
<execution>
<id>mrm-start</id>
<phase>process-test-classes</phase>
<goals>
<goal>start</goal>
</goals>
</execution>
<execution>
<id>mrm-stop</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>

View File

@@ -64,6 +64,12 @@ public class NativeTestClient implements Client {
if (!Environment.MAVEN_REPO_LOCAL.hasCommandLineProperty(args)) {
cmd.add(Environment.MAVEN_REPO_LOCAL.asCommandLineProperty(layout.getLocalMavenRepository().toString()));
}
final Path settings = layout.getSettings();
if (settings != null && args.stream().noneMatch(arg -> arg.equals("-s") || arg.equals("--settings"))) {
cmd.add("-s");
cmd.add(settings.toString());
}
final ProcessBuilder builder = new ProcessBuilder(cmd.toArray(new String[0]))
.directory(layout.userDir().toFile()) //
.redirectErrorStream(true);