Search in sources :

Example 1 with ExtensionManager

use of org.apache.maven.extension.ExtensionManager in project intellij-community by JetBrains.

the class MavenEmbedder method findExtensions.

private void findExtensions(MavenProject project) {
    // end copied from DefaultLifecycleExecutor.findExtensions
    ExtensionManager extensionManager = getComponent(ExtensionManager.class);
    for (Object each : project.getBuildExtensions()) {
        try {
            extensionManager.addExtension((Extension) each, project, myLocalRepository);
        } catch (PlexusContainerException e) {
            MavenEmbedderLog.LOG.error(e);
        } catch (ArtifactResolutionException e) {
            MavenEmbedderLog.LOG.error(e);
        } catch (ArtifactNotFoundException e) {
            MavenEmbedderLog.LOG.error(e);
        }
    }
    extensionManager.registerWagons();
    Map handlers = findArtifactTypeHandlers(project);
    getComponent(ArtifactHandlerManager.class).addHandlers(handlers);
}
Also used : PlexusContainerException(org.codehaus.plexus.PlexusContainerException) ExtensionManager(org.apache.maven.extension.ExtensionManager) ArtifactHandlerManager(org.apache.maven.artifact.handler.manager.ArtifactHandlerManager)

Aggregations

ArtifactHandlerManager (org.apache.maven.artifact.handler.manager.ArtifactHandlerManager)1 ExtensionManager (org.apache.maven.extension.ExtensionManager)1 PlexusContainerException (org.codehaus.plexus.PlexusContainerException)1