Missing argument for option -D, fixes #662 (#679)

Co-authored-by: 核桃 <hetao@2dfire.com>
This commit is contained in:
Guillaume Nodet
2022-08-30 09:14:12 +02:00
committed by GitHub
parent 5e59c40453
commit 449e815973
2 changed files with 28 additions and 2 deletions

View File

@@ -37,8 +37,9 @@ public class MavenConfNativeIT {
@Test
void version() throws IOException, InterruptedException {
final TestClientOutput o = new TestClientOutput();
// this test also exercise the "-D foo=bar" syntax for defining properties
client.execute(o, "org.apache.maven.plugins:maven-help-plugin:3.2.0:evaluate",
"-Dexpression=maven.conf", "-q", "-DforceStdout", "--raw-streams").assertSuccess();
"-D", "expression=maven.conf", "-q", "-DforceStdout", "--raw-streams").assertSuccess();
String conf = parameters.mvndHome().resolve("mvn/conf").toString();
assertTrue(o.getMessages().stream()
.anyMatch(m -> m.toString().contains(conf)), "Output should contain " + conf);