diff --git a/maven-core/src/main/java/org/apache/maven/DefaultMaven.java b/maven-core/src/main/java/org/apache/maven/DefaultMaven.java index c19af9e2e6..e87edf3475 100644 --- a/maven-core/src/main/java/org/apache/maven/DefaultMaven.java +++ b/maven-core/src/main/java/org/apache/maven/DefaultMaven.java @@ -415,8 +415,8 @@ public class DefaultMaven for ( ModelProblem problem : result.getProblems() ) { - logger.warn( problem.getMessage() + " @ " - + ModelProblemUtils.formatLocation( problem, result.getProjectId() ) ); + String location = ModelProblemUtils.formatLocation( problem, result.getProjectId() ); + logger.warn( problem.getMessage() + ( StringUtils.isNotEmpty( location ) ? " @ " + location : "" ) ); } problems = true;