use of org.commonjava.maven.galley.maven.internal.defaults.StandardMavenPluginImplications in project indy by Commonjava.
the class GalleyProvider method setup.
@PostConstruct
public void setup() {
pluginDefaults = new StandardMaven304PluginDefaults();
pluginImplications = new StandardMavenPluginImplications(xml);
}
use of org.commonjava.maven.galley.maven.internal.defaults.StandardMavenPluginImplications in project galley by Commonjava.
the class AbstractMavenViewTest method loadPoms.
protected MavenPomView loadPoms(final String[] activeProfileIds, final String... pomNames) throws Exception {
final List<DocRef<ProjectVersionRef>> stack = new ArrayList<DocRef<ProjectVersionRef>>();
ProjectVersionRef pvr = null;
for (final String pomName : pomNames) {
final InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream(getBaseResource() + pomName);
final Document document = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(is);
final ProjectVersionRef ref = xml.getProjectVersionRef(document);
if (pvr == null) {
pvr = ref;
}
final DocRef<ProjectVersionRef> dr = new DocRef<ProjectVersionRef>(ref, new SimpleLocation("http://localhost:8080/"), document);
stack.add(dr);
}
return new MavenPomView(pvr, stack, xpath, new StandardMaven304PluginDefaults(), new StandardMavenPluginImplications(xml), xml, activeProfileIds);
}
use of org.commonjava.maven.galley.maven.internal.defaults.StandardMavenPluginImplications in project galley by Commonjava.
the class EmbeddableCDIProducer method postConstruct.
@PostConstruct
public void postConstruct() {
fileEventManager = new NoOpFileEventManager();
transferDecorator = new NoOpTransferDecorator();
pathGenerator = new HashedLocationPathGenerator();
nfc = new MemoryNotFoundCache();
// locationExpander = new NoOpLocationExpander();
// locationResolver = new SimpleUrlLocationResolver( locationExpander, transportManager );
transportManagerConfig = new TransportManagerConfig();
passwordManager = new MemoryPasswordManager();
http = new HttpImpl(passwordManager);
objectMapper = new ObjectMapper();
objectMapper.registerModules(new ProjectVersionRefSerializerModule());
pluginDefaults = new StandardMaven304PluginDefaults();
pluginImplications = new StandardMavenPluginImplications(xml);
}
use of org.commonjava.maven.galley.maven.internal.defaults.StandardMavenPluginImplications 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