Search in sources :

Example 1 with RepositoryMetadataManager

use of org.apache.maven.artifact.repository.metadata.RepositoryMetadataManager in project intellij-community by JetBrains.

the class Maven30ServerEmbedderImpl method reset.

@Override
public void reset() throws RemoteException {
    try {
        setConsoleAndIndicator(null, null);
        final ArtifactFactory artifactFactory = getComponent(ArtifactFactory.class);
        if (artifactFactory instanceof CustomMaven3ArtifactFactory) {
            ((CustomMaven3ArtifactFactory) artifactFactory).reset();
        }
        final ArtifactResolver artifactResolver = getComponent(ArtifactResolver.class);
        if (artifactResolver instanceof CustomMaven30ArtifactResolver) {
            ((CustomMaven30ArtifactResolver) artifactResolver).reset();
        }
        final RepositoryMetadataManager repositoryMetadataManager = getComponent(RepositoryMetadataManager.class);
        if (repositoryMetadataManager instanceof CustomMaven3RepositoryMetadataManager) {
            ((CustomMaven3RepositoryMetadataManager) repositoryMetadataManager).reset();
        }
    //((CustomWagonManager)getComponent(WagonManager.class)).reset();
    } catch (Exception e) {
        throw rethrowException(e);
    }
}
Also used : RepositoryMetadataManager(org.apache.maven.artifact.repository.metadata.RepositoryMetadataManager) ArtifactFactory(org.apache.maven.artifact.factory.ArtifactFactory) InitializationException(org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException) ModelInterpolationException(org.apache.maven.project.interpolation.ModelInterpolationException) InvocationTargetException(java.lang.reflect.InvocationTargetException) RemoteException(java.rmi.RemoteException) SettingsBuildingException(org.apache.maven.settings.building.SettingsBuildingException) ComponentLookupException(org.codehaus.plexus.component.repository.exception.ComponentLookupException) ContextException(org.codehaus.plexus.context.ContextException) InvalidRepositoryException(org.apache.maven.artifact.InvalidRepositoryException)

Example 2 with RepositoryMetadataManager

use of org.apache.maven.artifact.repository.metadata.RepositoryMetadataManager in project intellij-community by JetBrains.

the class Maven3ServerEmbedderImpl method reset.

@Override
public void reset() throws RemoteException {
    try {
        setConsoleAndIndicator(null, null);
        final ArtifactFactory artifactFactory = getComponent(ArtifactFactory.class);
        if (artifactFactory instanceof CustomMaven3ArtifactFactory) {
            ((CustomMaven3ArtifactFactory) artifactFactory).reset();
        }
        final ArtifactResolver artifactResolver = getComponent(ArtifactResolver.class);
        if (artifactResolver instanceof CustomMaven3ArtifactResolver) {
            ((CustomMaven3ArtifactResolver) artifactResolver).reset();
        }
        final RepositoryMetadataManager repositoryMetadataManager = getComponent(RepositoryMetadataManager.class);
        if (repositoryMetadataManager instanceof CustomMaven3RepositoryMetadataManager) {
            ((CustomMaven3RepositoryMetadataManager) repositoryMetadataManager).reset();
        }
    //((CustomWagonManager)getComponent(WagonManager.class)).reset();
    } catch (Exception e) {
        throw rethrowException(e);
    }
}
Also used : RepositoryMetadataManager(org.apache.maven.artifact.repository.metadata.RepositoryMetadataManager) ArtifactFactory(org.apache.maven.artifact.factory.ArtifactFactory) ArtifactResolver(org.apache.maven.artifact.resolver.ArtifactResolver) DefaultArtifactResolver(org.eclipse.aether.internal.impl.DefaultArtifactResolver) ArtifactNotFoundException(org.apache.maven.artifact.resolver.ArtifactNotFoundException) InitializationException(org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException) ModelInterpolationException(org.apache.maven.project.interpolation.ModelInterpolationException) RemoteException(java.rmi.RemoteException) ComponentLookupException(org.codehaus.plexus.component.repository.exception.ComponentLookupException) ContextException(org.codehaus.plexus.context.ContextException) ArtifactResolutionException(org.apache.maven.artifact.resolver.ArtifactResolutionException) InvalidRepositoryException(org.apache.maven.artifact.InvalidRepositoryException)

Aggregations

RemoteException (java.rmi.RemoteException)2 InvalidRepositoryException (org.apache.maven.artifact.InvalidRepositoryException)2 ArtifactFactory (org.apache.maven.artifact.factory.ArtifactFactory)2 RepositoryMetadataManager (org.apache.maven.artifact.repository.metadata.RepositoryMetadataManager)2 ModelInterpolationException (org.apache.maven.project.interpolation.ModelInterpolationException)2 ComponentLookupException (org.codehaus.plexus.component.repository.exception.ComponentLookupException)2 ContextException (org.codehaus.plexus.context.ContextException)2 InitializationException (org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException)2 InvocationTargetException (java.lang.reflect.InvocationTargetException)1 ArtifactNotFoundException (org.apache.maven.artifact.resolver.ArtifactNotFoundException)1 ArtifactResolutionException (org.apache.maven.artifact.resolver.ArtifactResolutionException)1 ArtifactResolver (org.apache.maven.artifact.resolver.ArtifactResolver)1 SettingsBuildingException (org.apache.maven.settings.building.SettingsBuildingException)1 DefaultArtifactResolver (org.eclipse.aether.internal.impl.DefaultArtifactResolver)1