Map<String, String> managedVersions = new HashMap<String, String>();
for ( int i = lineage.size() - 1; i >= 0; i-- )
{
Model model = lineage.get( i ).getModel();
Build build = model.getBuild();
if ( build != null )
{
for ( Plugin plugin : build.getPlugins() )
{
String key = plugin.getKey();
if ( versions.get( key ) == null )
{
versions.put( key, plugin.getVersion() );
plugins.put( key, plugin );
}
}
PluginManagement mngt = build.getPluginManagement();
if ( mngt != null )
{
for ( Plugin plugin : mngt.getPlugins() )
{
String key = plugin.getKey();