diff --git a/maven-core/src/main/java/org/apache/maven/monitor/logging/DefaultLog.java b/maven-core/src/main/java/org/apache/maven/monitor/logging/DefaultLog.java index 331fcde49f..189edef33a 100644 --- a/maven-core/src/main/java/org/apache/maven/monitor/logging/DefaultLog.java +++ b/maven-core/src/main/java/org/apache/maven/monitor/logging/DefaultLog.java @@ -35,12 +35,24 @@ public class DefaultLog public void debug( CharSequence content ) { - logger.debug( content.toString() ); + logger.debug( toString( content ) ); + } + + private String toString( CharSequence content ) + { + if ( content == null ) + { + return ""; + } + else + { + return content.toString(); + } } public void debug( CharSequence content, Throwable error ) { - logger.debug( content.toString(), error ); + logger.debug( toString( content ), error ); } public void debug( Throwable error ) @@ -50,12 +62,12 @@ public class DefaultLog public void info( CharSequence content ) { - logger.info( content.toString() ); + logger.info( toString( content ) ); } public void info( CharSequence content, Throwable error ) { - logger.info( content.toString(), error ); + logger.info( toString( content ), error ); } public void info( Throwable error ) @@ -65,12 +77,12 @@ public class DefaultLog public void warn( CharSequence content ) { - logger.warn( content.toString() ); + logger.warn( toString( content ) ); } public void warn( CharSequence content, Throwable error ) { - logger.warn( content.toString(), error ); + logger.warn( toString( content ), error ); } public void warn( Throwable error ) @@ -80,12 +92,12 @@ public class DefaultLog public void error( CharSequence content ) { - logger.error( content.toString() ); + logger.error( toString( content ) ); } public void error( CharSequence content, Throwable error ) { - logger.error( content.toString(), error ); + logger.error( toString( content ), error ); } public void error( Throwable error ) diff --git a/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java b/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java index 6d319d213c..2b1e6b075f 100644 --- a/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java +++ b/maven-project/src/main/java/org/apache/maven/project/DefaultMavenProjectBuilder.java @@ -676,8 +676,10 @@ public class DefaultMavenProjectBuilder "\'.\n\n Reason(s):\n" + validationResult.render( " " ) ); } - project.setRemoteArtifactRepositories( remoteRepositories ); - + project.setRemoteArtifactRepositories( ProjectUtils.buildArtifactRepositories( model.getRepositories(), + artifactRepositoryFactory, + container ) ); + // TODO: these aren't taking active project artifacts into consideration in the reactor project.setPluginArtifacts( createPluginArtifacts( project.getBuildPlugins() ) ); project.setReportArtifacts( createReportArtifacts( project.getReportPlugins() ) );