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 @Deprecated
44 public interface RepositorySystem {
45 String DEFAULT_LOCAL_REPO_ID = MavenRepositorySystem.DEFAULT_LOCAL_REPO_ID;
46
47 @SuppressWarnings("checkstyle:constantname")
48 String userHome = System.getProperty("user.home");
49
50 @SuppressWarnings("checkstyle:constantname")
51 File userMavenConfigurationHome = new File(userHome, ".m2");
52
53 @SuppressWarnings("checkstyle:constantname")
54 File defaultUserLocalRepository = new File(userMavenConfigurationHome, "repository");
55
56 String DEFAULT_REMOTE_REPO_ID = MavenRepositorySystem.DEFAULT_REMOTE_REPO_ID;
57
58 String DEFAULT_REMOTE_REPO_URL = MavenRepositorySystem.DEFAULT_REMOTE_REPO_ID;
59
60 Artifact createArtifact(String groupId, String artifactId, String version, String packaging);
61
62 Artifact createArtifact(String groupId, String artifactId, String version, String scope, String type);
63
64 Artifact createProjectArtifact(String groupId, String artifactId, String version);
65
66 Artifact createArtifactWithClassifier(
67 String groupId, String artifactId, String version, String type, String classifier);
68
69 Artifact createPluginArtifact(Plugin plugin);
70
71 Artifact createDependencyArtifact(Dependency dependency);
72
73 ArtifactRepository buildArtifactRepository(Repository repository) throws InvalidRepositoryException;
74
75 ArtifactRepository createDefaultRemoteRepository() throws InvalidRepositoryException;
76
77 ArtifactRepository createDefaultLocalRepository() throws InvalidRepositoryException;
78
79 ArtifactRepository createLocalRepository(File localRepository) throws InvalidRepositoryException;
80
81 ArtifactRepository createArtifactRepository(
82 String id,
83 String url,
84 ArtifactRepositoryLayout repositoryLayout,
85 ArtifactRepositoryPolicy snapshots,
86 ArtifactRepositoryPolicy releases);
87
88
89
90
91
92
93
94
95
96
97 List<ArtifactRepository> getEffectiveRepositories(List<ArtifactRepository> repositories);
98
99
100
101
102
103
104
105
106 Mirror getMirror(ArtifactRepository repository, List<Mirror> mirrors);
107
108
109
110
111
112
113
114
115
116
117 void injectMirror(List<ArtifactRepository> repositories, List<Mirror> mirrors);
118
119
120
121
122
123
124
125
126
127
128 void injectProxy(List<ArtifactRepository> repositories, List<org.apache.maven.settings.Proxy> proxies);
129
130
131
132
133
134
135
136
137
138
139 void injectAuthentication(List<ArtifactRepository> repositories, List<Server> servers);
140
141 void injectMirror(RepositorySystemSession session, List<ArtifactRepository> repositories);
142
143 void injectProxy(RepositorySystemSession session, List<ArtifactRepository> repositories);
144
145 void injectAuthentication(RepositorySystemSession session, List<ArtifactRepository> repositories);
146
147 ArtifactResolutionResult resolve(ArtifactResolutionRequest request);
148
149
150
151
152
153
154
155
156
157
158 void publish(
159 ArtifactRepository repository, File source, String remotePath, ArtifactTransferListener transferListener)
160 throws ArtifactTransferFailedException;
161
162 void retrieve(
163 ArtifactRepository repository,
164 File destination,
165 String remotePath,
166 ArtifactTransferListener transferListener)
167 throws ArtifactTransferFailedException, ArtifactDoesNotExistException;
168 }