@@ -145,12 +145,7 @@ void upgradeMavenPluginVersions() {
145145 </project>
146146 """ ,
147147 spec -> spec .after (actual -> {
148- List <MatchResult > list = Pattern .compile ("<version>(.*)</version>" )
149- .matcher (actual ).results ().skip (1 ).toList ();
150- assertThat (list )
151- .hasSize (2 )
152- .extracting (mr -> mr .group (1 ))
153- .allMatch (m -> m .startsWith ("3." ));
148+ assertThat (Pattern .compile ("<version>3\\ .(.*)</version>" ).matcher (actual ).results ().toList ()).hasSize (2 );
154149 return actual ;
155150 })
156151 )
@@ -175,6 +170,22 @@ void dontExcludeJunit4DependencyfromTestcontainers() {
175170 <scope>test</scope>
176171 </dependency>
177172 </dependencies>
173+ <build>
174+ <plugins>
175+ <plugin>
176+ <groupId>org.apache.maven.plugins</groupId>
177+ <artifactId>maven-surefire-plugin</artifactId>
178+ <version>3.2.5</version>
179+ <dependencies>
180+ <dependency>
181+ <groupId>org.junit.platform</groupId>
182+ <artifactId>junit-platform-surefire-provider</artifactId>
183+ <version>1.1.0</version>
184+ </dependency>
185+ </dependencies>
186+ </plugin>
187+ </plugins>
188+ </build>
178189 </project>
179190 """ ;
180191 // Output identical, but we want to make sure we don't exclude junit4 from testcontainers
@@ -218,6 +229,22 @@ void dontExcludeJunit4DependencyfromSpringBootTestcontainers() {
218229 <scope>test</scope>
219230 </dependency>
220231 </dependencies>
232+ <build>
233+ <plugins>
234+ <plugin>
235+ <groupId>org.apache.maven.plugins</groupId>
236+ <artifactId>maven-surefire-plugin</artifactId>
237+ <version>3.2.5</version>
238+ <dependencies>
239+ <dependency>
240+ <groupId>org.junit.platform</groupId>
241+ <artifactId>junit-platform-surefire-provider</artifactId>
242+ <version>1.1.0</version>
243+ </dependency>
244+ </dependencies>
245+ </plugin>
246+ </plugins>
247+ </build>
221248 </project>
222249 """ ;
223250 // Output identical, but we want to make sure we don't exclude junit4 from testcontainers
@@ -371,6 +398,22 @@ void noJunitDependencyIfApiAlreadyPresent() {
371398 <scope>test</scope>
372399 </dependency>
373400 </dependencies>
401+ <build>
402+ <plugins>
403+ <plugin>
404+ <groupId>org.apache.maven.plugins</groupId>
405+ <artifactId>maven-surefire-plugin</artifactId>
406+ <version>3.2.5</version>
407+ <dependencies>
408+ <dependency>
409+ <groupId>org.junit.platform</groupId>
410+ <artifactId>junit-platform-surefire-provider</artifactId>
411+ <version>1.1.0</version>
412+ </dependency>
413+ </dependencies>
414+ </plugin>
415+ </plugins>
416+ </build>
374417 </project>
375418 """ )
376419 );
0 commit comments