use of org.commonjava.maven.galley.maven.internal.ArtifactMetadataManagerImpl in project galley by Commonjava.
the class TestFixture method initMissingComponents.
@Override
public void initMissingComponents() throws Exception {
super.initGalley();
super.initMissingComponents();
// setup version resolver.
if (xml == null) {
xml = new XMLInfrastructure();
}
if (xpath == null) {
xpath = new XPathManager();
}
if (metadataManager == null) {
metadataManager = new ArtifactMetadataManagerImpl(getTransferManager(), getLocationExpander());
}
if (metadataReader == null) {
metadataReader = new MavenMetadataReader(xml, getLocationExpander(), metadataManager, xpath);
}
if (versionResolver == null) {
versionResolver = new VersionResolverImpl(metadataReader);
}
if (typeMapper == null) {
typeMapper = new StandardTypeMapper();
}
if (artifactManager == null) {
Logger logger = LoggerFactory.getLogger(getClass());
logger.debug("Initializing ArtifactManagerImpl using:\n TransferManager: {}\n LocationExpander: {}\n TypeMapper: {}\n VersionResolver: {}", getTransferManager(), getLocationExpander(), typeMapper, versionResolver);
artifactManager = new ArtifactManagerImpl(getTransferManager(), getLocationExpander(), typeMapper, versionResolver);
} else {
Logger logger = LoggerFactory.getLogger(getClass());
logger.debug("Using passed-in ArtifactManager instance: {}", artifactManager);
}
if (pluginDefaults == null) {
pluginDefaults = new StandardMaven304PluginDefaults();
}
if (pluginImplications == null) {
pluginImplications = new StandardMavenPluginImplications(xml);
}
if (modelProcessor == null) {
modelProcessor = new MavenModelProcessor();
}
if (pomReader == null) {
pomReader = new MavenPomReader(xml, getLocationExpander(), getArtifactManager(), getXpath(), getPluginDefaults(), getPluginImplications());
}
}
Aggregations