mirror of https://github.com/apache/maven.git
PR: MNG-850
provide feedback when gathering projects, and list build order in reactor. Also improve naming of projects that don't give a name git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@307228 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e5461d6bac
commit
5d3ae9656b
|
@ -154,12 +154,14 @@ public class DefaultMaven
|
||||||
|
|
||||||
ProfileManager globalProfileManager = request.getGlobalProfileManager();
|
ProfileManager globalProfileManager = request.getGlobalProfileManager();
|
||||||
|
|
||||||
|
loadSettingsProfiles( globalProfileManager, request.getSettings() );
|
||||||
|
|
||||||
|
getLogger().info( "Scanning for projects..." );
|
||||||
|
|
||||||
boolean foundProjects = true;
|
boolean foundProjects = true;
|
||||||
List projects;
|
List projects;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
loadSettingsProfiles( globalProfileManager, request.getSettings() );
|
|
||||||
|
|
||||||
List files = getProjectFiles( request );
|
List files = getProjectFiles( request );
|
||||||
|
|
||||||
projects = collectProjects( files, request.getLocalRepository(), request.isRecursive(),
|
projects = collectProjects( files, request.getLocalRepository(), request.isRecursive(),
|
||||||
|
@ -193,7 +195,7 @@ public class DefaultMaven
|
||||||
return dispatchErrorResponse( dispatcher, event, request.getBaseDirectory(), e );
|
return dispatchErrorResponse( dispatcher, event, request.getBaseDirectory(), e );
|
||||||
}
|
}
|
||||||
|
|
||||||
ReactorManager rm = null;
|
ReactorManager rm;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
rm = new ReactorManager( projects );
|
rm = new ReactorManager( projects );
|
||||||
|
@ -210,6 +212,17 @@ public class DefaultMaven
|
||||||
return dispatchErrorResponse( dispatcher, event, request.getBaseDirectory(), e );
|
return dispatchErrorResponse( dispatcher, event, request.getBaseDirectory(), e );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( rm.hasMultipleProjects() )
|
||||||
|
{
|
||||||
|
getLogger().info( "Reactor build order: " );
|
||||||
|
|
||||||
|
for ( Iterator i = rm.getSortedProjects().iterator(); i.hasNext(); )
|
||||||
|
{
|
||||||
|
MavenProject project = (MavenProject) i.next();
|
||||||
|
getLogger().info( " " + project.getName() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
MavenSession session = createSession( request, rm );
|
MavenSession session = createSession( request, rm );
|
||||||
|
|
|
@ -758,7 +758,7 @@ public class MavenProject
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return getId();
|
return "Unnamed - " + getId();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1133,22 +1133,22 @@ public class MavenProject
|
||||||
if ( !build.getPluginsAsMap().containsKey( plugin.getKey() ) )
|
if ( !build.getPluginsAsMap().containsKey( plugin.getKey() ) )
|
||||||
{
|
{
|
||||||
PluginManagement pm = build.getPluginManagement();
|
PluginManagement pm = build.getPluginManagement();
|
||||||
|
|
||||||
if ( pm != null )
|
if ( pm != null )
|
||||||
{
|
{
|
||||||
Map pmByKey = pm.getPluginsAsMap();
|
Map pmByKey = pm.getPluginsAsMap();
|
||||||
|
|
||||||
String pluginKey = plugin.getKey();
|
String pluginKey = plugin.getKey();
|
||||||
|
|
||||||
if ( pmByKey != null && pmByKey.containsKey( pluginKey ) )
|
if ( pmByKey != null && pmByKey.containsKey( pluginKey ) )
|
||||||
{
|
{
|
||||||
Plugin pmPlugin = (Plugin) pmByKey.get( pluginKey );
|
Plugin pmPlugin = (Plugin) pmByKey.get( pluginKey );
|
||||||
|
|
||||||
ModelUtils.mergePluginDefinitions( plugin, pmPlugin, false );
|
ModelUtils.mergePluginDefinitions( plugin, pmPlugin, false );
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
build.addPlugin( plugin );
|
build.addPlugin( plugin );
|
||||||
build.flushPluginMap();
|
build.flushPluginMap();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue