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