In the previous part of the series - Maven Plugin Testing - In a Modern way - Part IV we have seen how to define goals to run Maven. In this part we will take a deeper look how we can define system properties for a Maven call to use. Let us take a look at a simple example taken from the previous part.

Java

1

@MavenJupiterExtension

2

class BaseIT {

3

4

  @MavenTest

5

  @MavenGoal("verify")

6

  void the_first_test_case(MavenExecutionResult result) {

7

     ...

8

  }

9

}

This will run Maven with the goal verify. So what could you do to prevent running the unit tests or even any tests at all within that integration test case? What would you usually do on plain command line? You would have added -DskipTests to your Maven command line. How could you do the above integration test example?

#java #testing #maven #plugin

Maven Plugin Testing in a Modern Way Part V
1.15 GEEK