1 package org.apache.maven.plugin.testing.stubs;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 import java.util.Collections;
23 import java.util.List;
24
25 import org.apache.maven.artifact.Artifact;
26 import org.apache.maven.artifact.metadata.ArtifactMetadata;
27 import org.apache.maven.artifact.repository.ArtifactRepository;
28 import org.apache.maven.artifact.repository.ArtifactRepositoryPolicy;
29 import org.apache.maven.artifact.repository.Authentication;
30 import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout;
31 import org.apache.maven.repository.Proxy;
32
33
34
35
36
37 public class StubArtifactRepository
38 implements ArtifactRepository
39 {
40 private String baseDir = null;
41
42
43
44
45
46
47 public StubArtifactRepository( String dir )
48 {
49 baseDir = dir;
50 }
51
52
53
54
55
56 public String pathOf( Artifact artifact )
57 {
58 return artifact.getId();
59 }
60
61
62
63
64
65 public String pathOfRemoteRepositoryMetadata( ArtifactMetadata artifactMetadata )
66 {
67 return null;
68 }
69
70
71
72
73
74 public String pathOfLocalRepositoryMetadata( ArtifactMetadata metadata, ArtifactRepository repository )
75 {
76 return metadata.getLocalFilename( repository );
77 }
78
79
80
81
82
83 public String getUrl()
84 {
85 return null;
86 }
87
88
89
90
91
92 public String getBasedir()
93 {
94 return baseDir;
95 }
96
97
98
99
100
101 public String getProtocol()
102 {
103 return null;
104 }
105
106
107
108
109
110 public String getId()
111 {
112 return null;
113 }
114
115
116
117
118
119 public ArtifactRepositoryPolicy getSnapshots()
120 {
121 return null;
122 }
123
124
125
126
127
128 public ArtifactRepositoryPolicy getReleases()
129 {
130 return null;
131 }
132
133
134
135
136
137 public ArtifactRepositoryLayout getLayout()
138 {
139 return null;
140 }
141
142
143
144
145
146 public String getKey()
147 {
148 return null;
149 }
150
151
152
153
154
155 public boolean isUniqueVersion()
156 {
157 return false;
158 }
159
160
161
162
163
164
165 public void setBlacklisted( boolean blackListed )
166 {
167
168 }
169
170
171
172
173
174 public boolean isBlacklisted()
175 {
176 return false;
177 }
178
179 public Artifact find( Artifact artifact )
180 {
181
182 return null;
183 }
184
185 public Authentication getAuthentication()
186 {
187 return null;
188 }
189
190 public Proxy getProxy()
191 {
192 return null;
193 }
194
195 public void setAuthentication( Authentication authentication )
196 {
197
198 }
199
200 public void setId( String id )
201 {
202
203 }
204
205 public void setLayout( ArtifactRepositoryLayout layout )
206 {
207
208 }
209
210 public void setProxy( Proxy proxy )
211 {
212
213 }
214
215 public void setReleaseUpdatePolicy( ArtifactRepositoryPolicy policy )
216 {
217
218 }
219
220 public void setSnapshotUpdatePolicy( ArtifactRepositoryPolicy policy )
221 {
222
223 }
224
225 public void setUrl( String url )
226 {
227
228 }
229
230 public List<String> findVersions( Artifact artifact )
231 {
232 return Collections.emptyList();
233 }
234
235 }