1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.maven.internal.impl;
20
21 import java.util.Collection;
22 import java.util.List;
23
24 import org.apache.maven.api.Artifact;
25 import org.apache.maven.api.ArtifactCoordinate;
26 import org.apache.maven.api.Dependency;
27 import org.apache.maven.api.DependencyCoordinate;
28 import org.apache.maven.api.LocalRepository;
29 import org.apache.maven.api.Node;
30 import org.apache.maven.api.Project;
31 import org.apache.maven.api.RemoteRepository;
32 import org.apache.maven.api.Session;
33 import org.apache.maven.api.annotations.Nonnull;
34 import org.apache.maven.execution.MavenSession;
35 import org.eclipse.aether.RepositorySystem;
36 import org.eclipse.aether.RepositorySystemSession;
37
38 import static org.apache.maven.internal.impl.Utils.cast;
39
40 public interface InternalSession extends Session {
41
42 static InternalSession from(Session session) {
43 return cast(InternalSession.class, session, "session should be an " + InternalSession.class);
44 }
45
46 RemoteRepository getRemoteRepository(org.eclipse.aether.repository.RemoteRepository repository);
47
48 Node getNode(org.eclipse.aether.graph.DependencyNode node);
49
50 Node getNode(org.eclipse.aether.graph.DependencyNode node, boolean verbose);
51
52 @Nonnull
53 Artifact getArtifact(@Nonnull org.eclipse.aether.artifact.Artifact artifact);
54
55 @Nonnull
56 Dependency getDependency(@Nonnull org.eclipse.aether.graph.Dependency dependency);
57
58 List<Project> getProjects(List<org.apache.maven.project.MavenProject> projects);
59
60 Project getProject(org.apache.maven.project.MavenProject project);
61
62 List<org.eclipse.aether.repository.RemoteRepository> toRepositories(List<RemoteRepository> repositories);
63
64 org.eclipse.aether.repository.RemoteRepository toRepository(RemoteRepository repository);
65
66 org.eclipse.aether.repository.LocalRepository toRepository(LocalRepository repository);
67
68 List<org.apache.maven.artifact.repository.ArtifactRepository> toArtifactRepositories(
69 List<RemoteRepository> repositories);
70
71 org.apache.maven.artifact.repository.ArtifactRepository toArtifactRepository(RemoteRepository repository);
72
73 List<org.eclipse.aether.graph.Dependency> toDependencies(Collection<DependencyCoordinate> dependencies);
74
75 org.eclipse.aether.graph.Dependency toDependency(DependencyCoordinate dependency);
76
77 List<org.eclipse.aether.artifact.Artifact> toArtifacts(Collection<Artifact> artifacts);
78
79 org.eclipse.aether.artifact.Artifact toArtifact(Artifact artifact);
80
81 org.eclipse.aether.artifact.Artifact toArtifact(ArtifactCoordinate coord);
82
83 MavenSession getMavenSession();
84
85 RepositorySystemSession getSession();
86
87 RepositorySystem getRepositorySystem();
88 }