Allow increasing mvnd.log.level via CLI

This commit is contained in:
Peter Palaga
2020-06-30 11:24:56 +02:00
parent 0d64f525d9
commit 43b48b5f86
2 changed files with 7 additions and 2 deletions

View File

@@ -59,7 +59,7 @@ public class ModuleAndPluginNativeIT {
/* Build #1: with "Hello" output to target/hello.txt */
{
final ClientOutput output = Mockito.mock(ClientOutput.class);
client.execute(output, "clean", "install", "-e").assertSuccess();
client.execute(output, "clean", "install", "-e", "-Dmvnd.log.level=DEBUG").assertSuccess();
Assertions.assertThat(helloPath).exists();
Assertions.assertThat(helloPath).usingCharset(StandardCharsets.UTF_8).hasContent("Hello");
@@ -74,7 +74,9 @@ public class ModuleAndPluginNativeIT {
Files.write(mojoPath, mojoSource.getBytes(StandardCharsets.UTF_8));
final ClientOutput output = Mockito.mock(ClientOutput.class);
client.execute(output, "clean", "install", "-e").assertSuccess();
client.execute(output,
// "clean", workaround for https://github.com/mvndaemon/mvnd/issues/40
"install", "-e", "-Dmvnd.log.level=DEBUG").assertSuccess();
Assertions.assertThat(helloPath).exists();
Assertions.assertThat(helloPath).usingCharset(StandardCharsets.UTF_8).hasContent("Hi");