protected ResolveModuleDescriptorConverter createResolveModuleDescriptorConverter( ProjectDependencyDescriptorStrategy projectDependencyStrategy) { DefaultModuleDescriptorFactoryForClientModule clientModuleDescriptorFactory = new DefaultModuleDescriptorFactoryForClientModule(); DependencyDescriptorFactoryDelegate dependencyDescriptorFactoryDelegate = new DependencyDescriptorFactoryDelegate( new ClientModuleDependencyDescriptorFactory( get(ExcludeRuleConverter.class), clientModuleDescriptorFactory, clientModuleRegistry), new ProjectDependencyDescriptorFactory( get(ExcludeRuleConverter.class), projectDependencyStrategy), get(ExternalModuleDependencyDescriptorFactory.class)); clientModuleDescriptorFactory.setDependencyDescriptorFactory( dependencyDescriptorFactoryDelegate); return new ResolveModuleDescriptorConverter( get(ModuleDescriptorFactory.class), get(ConfigurationsToModuleDescriptorConverter.class), new DefaultDependenciesToModuleDescriptorConverter( dependencyDescriptorFactoryDelegate, get(ExcludeRuleConverter.class))); }
protected ConfigurationContainerFactory createConfigurationContainerFactory() { // todo this creation is duplicate. When we improve our service registry to allow multiple // instances for same type // we should consolidate. DefaultModuleDescriptorFactoryForClientModule clientModuleDescriptorFactory = new DefaultModuleDescriptorFactoryForClientModule(); DependencyDescriptorFactoryDelegate dependencyDescriptorFactoryDelegate = new DependencyDescriptorFactoryDelegate( new ClientModuleDependencyDescriptorFactory( get(ExcludeRuleConverter.class), clientModuleDescriptorFactory, clientModuleRegistry), new ProjectDependencyDescriptorFactory( get(ExcludeRuleConverter.class), ProjectDependencyDescriptorFactory.RESOLVE_DESCRIPTOR_STRATEGY), get(ExternalModuleDependencyDescriptorFactory.class)); clientModuleDescriptorFactory.setDependencyDescriptorFactory( dependencyDescriptorFactoryDelegate); PublishModuleDescriptorConverter fileModuleDescriptorConverter = new PublishModuleDescriptorConverter( createResolveModuleDescriptorConverter( ProjectDependencyDescriptorFactory.IVY_FILE_DESCRIPTOR_STRATEGY), new DefaultArtifactsToModuleDescriptorConverter( DefaultArtifactsToModuleDescriptorConverter.IVY_FILE_STRATEGY)); return new DefaultConfigurationContainerFactory( clientModuleRegistry, new DefaultSettingsConverter(get(ProgressLoggerFactory.class)), get(ResolveModuleDescriptorConverter.class), get(PublishModuleDescriptorConverter.class), fileModuleDescriptorConverter, new DefaultIvyFactory(), new SelfResolvingDependencyResolver( new DefaultIvyDependencyResolver( new DefaultIvyReportConverter(dependencyDescriptorFactoryDelegate))), new DefaultIvyDependencyPublisher(new DefaultPublishOptionsFactory()), get(ClassGenerator.class)); }