Browse Source

Prevent tests from picking up empty starter dirs

Update StarterDependenciesIntegrationTests to only consider starter
folders that contain POM files.

Fixes gh-1395
pull/1487/merge
Phillip Webb 11 years ago
parent
commit
2188e3553c
  1. 2
      spring-boot-integration-tests/src/test/java/org/springframework/boot/starter/StarterDependenciesIntegrationTests.java

2
spring-boot-integration-tests/src/test/java/org/springframework/boot/starter/StarterDependenciesIntegrationTests.java

@ -61,7 +61,7 @@ public class StarterDependenciesIntegrationTests {
public static List<String[]> getStarters() { public static List<String[]> getStarters() {
List<String[]> starters = new ArrayList<String[]>(); List<String[]> starters = new ArrayList<String[]>();
for (File file : new File("../spring-boot-starters").listFiles()) { for (File file : new File("../spring-boot-starters").listFiles()) {
if (file.isDirectory()) { if (file.isDirectory() && new File(file, "pom.xml").exists()) {
String name = file.getName(); String name = file.getName();
if (name.startsWith(STARTER_NAME_PREFIX) if (name.startsWith(STARTER_NAME_PREFIX)
&& !EXCLUDED_STARTERS.contains(file.getName())) { && !EXCLUDED_STARTERS.contains(file.getName())) {

Loading…
Cancel
Save