Search in sources :

Example 1 with CheArtifactResolver

use of org.eclipse.che.maven.CheArtifactResolver in project che by eclipse.

the class MavenServerImpl method reset.

@Override
public void reset() throws RemoteException {
    terminalLogger.setTerminal(null);
    mavenProgressNotifier = null;
    ArtifactResolver artifactResolver = getMavenComponent(ArtifactResolver.class);
    if (artifactResolver instanceof CheArtifactResolver) {
        ((CheArtifactResolver) artifactResolver).reset();
    }
}
Also used : ArtifactResolver(org.apache.maven.artifact.resolver.ArtifactResolver) CheArtifactResolver(org.eclipse.che.maven.CheArtifactResolver) DefaultArtifactResolver(org.eclipse.aether.internal.impl.DefaultArtifactResolver) CheArtifactResolver(org.eclipse.che.maven.CheArtifactResolver)

Example 2 with CheArtifactResolver

use of org.eclipse.che.maven.CheArtifactResolver in project che by eclipse.

the class MavenServerImpl method setComponents.

@Override
public void setComponents(MavenWorkspaceCache cache, boolean failOnUnresolvedDependency, MavenTerminal mavenTerminal, MavenServerProgressNotifier notifier, boolean alwaysUpdateSnapshot) throws RemoteException {
    container.addComponent(getMavenComponent(ArtifactResolver.class, "che"), ArtifactResolver.ROLE);
    ArtifactResolver artifactResolver = getMavenComponent(ArtifactResolver.class);
    if (artifactResolver instanceof CheArtifactResolver) {
        ((CheArtifactResolver) artifactResolver).setWorkspaceCache(cache, failOnUnresolvedDependency);
    }
    buildDate = new Date();
    workspaceCache = cache;
    updateSnapshots = updateSnapshots || alwaysUpdateSnapshot;
    terminalLogger.setTerminal(mavenTerminal);
    mavenProgressNotifier = new MavenServerProgressNotifierImpl(notifier);
}
Also used : ArtifactResolver(org.apache.maven.artifact.resolver.ArtifactResolver) CheArtifactResolver(org.eclipse.che.maven.CheArtifactResolver) DefaultArtifactResolver(org.eclipse.aether.internal.impl.DefaultArtifactResolver) CheArtifactResolver(org.eclipse.che.maven.CheArtifactResolver) Date(java.util.Date)

Aggregations

ArtifactResolver (org.apache.maven.artifact.resolver.ArtifactResolver)2 DefaultArtifactResolver (org.eclipse.aether.internal.impl.DefaultArtifactResolver)2 CheArtifactResolver (org.eclipse.che.maven.CheArtifactResolver)2 Date (java.util.Date)1