diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/profile/activation/FileProfileActivator.java b/maven-model-builder/src/main/java/org/apache/maven/model/profile/activation/FileProfileActivator.java index 28edd5abc1..cab35ae857 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/profile/activation/FileProfileActivator.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/profile/activation/FileProfileActivator.java @@ -127,10 +127,10 @@ public class FileProfileActivator } catch ( Exception e ) { - problems.add( new ModelProblemCollectorRequest( Severity.ERROR, Version.BASE) - .setMessage( "Failed to interpolate file location " + path + " for profile " + profile.getId() + ": " + e.getMessage()) - .setLocation( file.getLocation( missing ? "missing" : "exists" )) - .setException( e )); + problems.add( new ModelProblemCollectorRequest( Severity.ERROR, Version.BASE ) + .setMessage( "Failed to interpolate file location " + path + " for profile " + profile.getId() + ": " + e.getMessage() ) + .setLocation( file.getLocation( missing ? "missing" : "exists" ) ) + .setException( e ) ); return false; } diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/profile/activation/JdkVersionProfileActivator.java b/maven-model-builder/src/main/java/org/apache/maven/model/profile/activation/JdkVersionProfileActivator.java index e6f8696acc..70feb07aa1 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/profile/activation/JdkVersionProfileActivator.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/profile/activation/JdkVersionProfileActivator.java @@ -58,9 +58,9 @@ public class JdkVersionProfileActivator if ( version == null || version.length() <= 0 ) { - problems.add( new ModelProblemCollectorRequest( Severity.ERROR, Version.BASE) - .setMessage( "Failed to determine Java version for profile " + profile.getId()) - .setLocation(activation.getLocation( "jdk" ))); + problems.add( new ModelProblemCollectorRequest( Severity.ERROR, Version.BASE ) + .setMessage( "Failed to determine Java version for profile " + profile.getId() ) + .setLocation(activation.getLocation( "jdk" ) ) ); return false; } diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/profile/activation/PropertyProfileActivator.java b/maven-model-builder/src/main/java/org/apache/maven/model/profile/activation/PropertyProfileActivator.java index f1f5cf36c5..b184a86d6b 100644 --- a/maven-model-builder/src/main/java/org/apache/maven/model/profile/activation/PropertyProfileActivator.java +++ b/maven-model-builder/src/main/java/org/apache/maven/model/profile/activation/PropertyProfileActivator.java @@ -63,9 +63,9 @@ public class PropertyProfileActivator if ( name == null || name.length() <= 0 ) { - problems.add( new ModelProblemCollectorRequest( Severity.ERROR, Version.BASE) - .setMessage( "The property name is required to activate the profile " + profile.getId()) - .setLocation( property.getLocation( "" ))); + problems.add( new ModelProblemCollectorRequest( Severity.ERROR, Version.BASE ) + .setMessage( "The property name is required to activate the profile " + profile.getId() ) + .setLocation( property.getLocation( "" ) ) ); return false; }