MNG-5212 preserve PluginDescriptor dependencies in descriptor cache

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-3/trunk@1210924 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Igor Fedorenko 2011-12-06 14:13:48 +00:00
parent 862ff21440
commit c53d95cee8
2 changed files with 6 additions and 0 deletions

View File

@ -96,6 +96,8 @@ public class DefaultPluginDescriptorCache
clone.setId( original.getId() );
clone.setIsolatedRealm( original.isIsolatedRealm() );
clone.setSource( original.getSource() );
clone.setDependencies( original.getDependencies() );
}
return clone;

View File

@ -292,6 +292,8 @@ public class PluginManagerTest
session.getRepositorySession() );
pluginManager.getPluginRealm( session, pluginDescriptor );
assertEquals( 1, pluginDescriptor.getDependencies().size() );
for ( ComponentDescriptor<?> descriptor : pluginDescriptor.getComponents() )
{
assertNotNull( descriptor.getRealm() );
@ -308,6 +310,8 @@ public class PluginManagerTest
session.getRepositorySession() );
pluginManager.getPluginRealm( session, pluginDescriptor );
assertEquals( 1, pluginDescriptor.getDependencies().size() );
for ( ComponentDescriptor<?> descriptor : pluginDescriptor.getComponents() )
{
assertNotNull( descriptor.getRealm() );