diff --git a/spring-cloud-release-tools-spring/src/main/java/org/springframework/cloud/release/internal/ReleaserApplication.java b/spring-cloud-release-tools-spring/src/main/java/org/springframework/cloud/release/internal/ReleaserApplication.java index 9210705d..4af6bb80 100644 --- a/spring-cloud-release-tools-spring/src/main/java/org/springframework/cloud/release/internal/ReleaserApplication.java +++ b/spring-cloud-release-tools-spring/src/main/java/org/springframework/cloud/release/internal/ReleaserApplication.java @@ -15,6 +15,8 @@ */ package org.springframework.cloud.release.internal; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.CommandLineRunner; import org.springframework.boot.SpringApplication; @@ -27,6 +29,8 @@ import org.springframework.cloud.release.internal.spring.SpringReleaser; @SpringBootApplication public class ReleaserApplication implements CommandLineRunner { + private static final Logger log = LoggerFactory.getLogger(ReleaserApplication.class); + public static void main(String[] args) { SpringApplication application = new SpringApplication(ReleaserApplication.class); application.setWebApplicationType(WebApplicationType.NONE); @@ -38,7 +42,11 @@ public class ReleaserApplication implements CommandLineRunner { @Override public void run(String... strings) throws Exception { Options options = this.parser.parse(strings); - this.releaser.release(options); + try { + this.releaser.release(options); + } catch (Exception e) { + log.error("Exception occurred for the releaser", e); + } System.exit(0); } } diff --git a/spring-cloud-release-tools-spring/src/main/java/org/springframework/cloud/release/internal/spring/SpringReleaser.java b/spring-cloud-release-tools-spring/src/main/java/org/springframework/cloud/release/internal/spring/SpringReleaser.java index a349873f..61a5bd05 100644 --- a/spring-cloud-release-tools-spring/src/main/java/org/springframework/cloud/release/internal/spring/SpringReleaser.java +++ b/spring-cloud-release-tools-spring/src/main/java/org/springframework/cloud/release/internal/spring/SpringReleaser.java @@ -121,7 +121,10 @@ public class SpringReleaser { if (StringUtils.hasText(options.startFrom)) { int projectIndex = filteredProjects.indexOf(options.startFrom); if (projectIndex < 0) throw new IllegalStateException("Project [" + options.startFrom + "] not found"); - filteredProjects = filteredProjects.subList(projectIndex, projects.size()); + if (log.isDebugEnabled()) { + log.debug("Index of project [{}] is [{}]", options.startFrom, projectIndex); + } + filteredProjects = filteredProjects.subList(projectIndex, filteredProjects.size()); options.startFrom = ""; } else if (!options.taskNames.isEmpty()) { filteredProjects = filteredProjects.stream()