1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.eclipse.aether.supplier;
20
21 import java.util.function.Supplier;
22
23 import org.apache.maven.repository.internal.MavenSessionBuilderSupplier;
24 import org.eclipse.aether.RepositorySystem;
25 import org.eclipse.aether.RepositorySystemSession.CloseableSession;
26 import org.eclipse.aether.RepositorySystemSession.SessionBuilder;
27 import org.eclipse.aether.collection.DependencyManager;
28 import org.eclipse.aether.impl.scope.InternalScopeManager;
29 import org.eclipse.aether.internal.impl.scope.ScopeManagerImpl;
30 import org.eclipse.aether.util.graph.manager.ClassicDependencyManager;
31
32
33
34
35
36
37
38
39
40
41 public class SessionBuilderSupplier extends MavenSessionBuilderSupplier {
42 public SessionBuilderSupplier(RepositorySystem repositorySystem) {
43 super(repositorySystem);
44 }
45
46 @Override
47 protected void configureSessionBuilder(SessionBuilder session) {
48 super.configureSessionBuilder(session);
49 session.setScopeManager(getScopeManager());
50 }
51
52 @Override
53 protected DependencyManager getDependencyManager() {
54 return new ClassicDependencyManager(true, getScopeManager());
55 }
56
57 protected InternalScopeManager getScopeManager() {
58 return new ScopeManagerImpl(Maven4ScopeManagerConfiguration.INSTANCE);
59 }
60 }