From 5e4a4500301ea15f84b74f6ed7f8e89d3b35b055 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Tue, 14 Jul 2015 14:04:44 +0100 Subject: [PATCH] Gracefully handle profiles in settings.xml with no See gh-3483 --- .../org/springframework/boot/cli/compiler/MavenSettings.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/MavenSettings.java b/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/MavenSettings.java index 2c822dfad7..e822bcfdca 100644 --- a/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/MavenSettings.java +++ b/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/MavenSettings.java @@ -165,7 +165,9 @@ public class MavenSettings { for (Profile profile : profiles) { org.apache.maven.model.Profile modelProfile = new org.apache.maven.model.Profile(); modelProfile.setId(profile.getId()); - modelProfile.setActivation(createModelActivation(profile.getActivation())); + if (profile.getActivation() != null) { + modelProfile.setActivation(createModelActivation(profile.getActivation())); + } modelProfiles.add(modelProfile); } return modelProfiles;