Skip to content

Commit 9f2ed20

Browse files
committed
Improve error message when start goal can't contact running application
Closes gh-24044
1 parent a41ca05 commit 9f2ed20

File tree

1 file changed

+3
-2
lines changed
  • spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven

1 file changed

+3
-2
lines changed

spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/StartMojo.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2022 the original author or authors.
2+
* Copyright 2012-2023 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -185,7 +185,8 @@ private void waitForSpringApplication() throws MojoFailureException, MojoExecuti
185185
}
186186
}
187187
catch (IOException ex) {
188-
throw new MojoFailureException("Could not contact Spring Boot application", ex);
188+
throw new MojoFailureException("Could not contact Spring Boot application via JMX on port " + this.jmxPort
189+
+ ". Please make sure that no other process is using that port", ex);
189190
}
190191
catch (Exception ex) {
191192
throw new MojoExecutionException("Could not figure out if the application has started", ex);

0 commit comments

Comments
 (0)