1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.maven.repository;
20
21 import java.io.File;
22 import java.util.List;
23
24 import org.apache.maven.artifact.Artifact;
25 import org.apache.maven.artifact.InvalidRepositoryException;
26 import org.apache.maven.artifact.repository.ArtifactRepository;
27 import org.apache.maven.artifact.repository.ArtifactRepositoryPolicy;
28 import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout;
29 import org.apache.maven.artifact.resolver.ArtifactResolutionRequest;
30 import org.apache.maven.artifact.resolver.ArtifactResolutionResult;
31 import org.apache.maven.bridge.MavenRepositorySystem;
32 import org.apache.maven.model.Dependency;
33 import org.apache.maven.model.Plugin;
34 import org.apache.maven.model.Repository;
35 import org.apache.maven.settings.Mirror;
36 import org.apache.maven.settings.Server;
37 import org.eclipse.aether.RepositorySystemSession;
38
39
40
41
42
43
44 @Deprecated
45 public interface RepositorySystem {
46 String DEFAULT_LOCAL_REPO_ID = MavenRepositorySystem.DEFAULT_LOCAL_REPO_ID;
47
48 @SuppressWarnings("checkstyle:constantname")
49 String userHome = System.getProperty("user.home");
50
51 @SuppressWarnings("checkstyle:constantname")
52 File userMavenConfigurationHome = new File(userHome, ".m2");
53
54 @SuppressWarnings("checkstyle:constantname")
55 File defaultUserLocalRepository = new File(userMavenConfigurationHome, "repository");
56
57 String DEFAULT_REMOTE_REPO_ID = MavenRepositorySystem.DEFAULT_REMOTE_REPO_ID;
58
59 String DEFAULT_REMOTE_REPO_URL = MavenRepositorySystem.DEFAULT_REMOTE_REPO_ID;
60
61 Artifact createArtifact(String groupId, String artifactId, String version, String packaging);
62
63 Artifact createArtifact(String groupId, String artifactId, String version, String scope, String type);
64
65 Artifact createProjectArtifact(String groupId, String artifactId, String version);
66
67 Artifact createArtifactWithClassifier(
68 String groupId, String artifactId, String version, String type, String classifier);
69
70 Artifact createPluginArtifact(Plugin plugin);
71
72 Artifact createDependencyArtifact(Dependency dependency);
73
74 ArtifactRepository buildArtifactRepository(Repository repository) throws InvalidRepositoryException;
75
76 ArtifactRepository createDefaultRemoteRepository() throws InvalidRepositoryException;
77
78 ArtifactRepository createDefaultLocalRepository() throws InvalidRepositoryException;
79
80 ArtifactRepository createLocalRepository(File localRepository) throws InvalidRepositoryException;
81
82 ArtifactRepository createArtifactRepository(
83 String id,
84 String url,
85 ArtifactRepositoryLayout repositoryLayout,
86 ArtifactRepositoryPolicy snapshots,
87 ArtifactRepositoryPolicy releases);
88
89
90
91
92
93
94
95
96
97
98 List<ArtifactRepository> getEffectiveRepositories(List<ArtifactRepository> repositories);
99
100
101
102
103
104
105
106
107 Mirror getMirror(ArtifactRepository repository, List<Mirror> mirrors);
108
109
110
111
112
113
114
115
116
117
118 void injectMirror(List<ArtifactRepository> repositories, List<Mirror> mirrors);
119
120
121
122
123
124
125
126
127
128
129 void injectProxy(List<ArtifactRepository> repositories, List<org.apache.maven.settings.Proxy> proxies);
130
131
132
133
134
135
136
137
138
139
140 void injectAuthentication(List<ArtifactRepository> repositories, List<Server> servers);
141
142 void injectMirror(RepositorySystemSession session, List<ArtifactRepository> repositories);
143
144 void injectProxy(RepositorySystemSession session, List<ArtifactRepository> repositories);
145
146 void injectAuthentication(RepositorySystemSession session, List<ArtifactRepository> repositories);
147
148 ArtifactResolutionResult resolve(ArtifactResolutionRequest request);
149
150
151
152
153
154
155
156
157
158
159 void publish(
160 ArtifactRepository repository, File source, String remotePath, ArtifactTransferListener transferListener)
161 throws ArtifactTransferFailedException;
162
163 void retrieve(
164 ArtifactRepository repository,
165 File destination,
166 String remotePath,
167 ArtifactTransferListener transferListener)
168 throws ArtifactTransferFailedException, ArtifactDoesNotExistException;
169 }