1 package org.apache.maven.archiver;
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.handler.ArtifactHandler;
24 import org.apache.maven.artifact.metadata.ArtifactMetadata;
25 import org.apache.maven.artifact.repository.ArtifactRepository;
26 import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
27 import org.apache.maven.artifact.versioning.ArtifactVersion;
28 import org.apache.maven.artifact.versioning.OverConstrainedVersionException;
29 import org.apache.maven.artifact.versioning.VersionRange;
30
31 import java.io.File;
32 import java.util.Collection;
33 import java.util.List;
34
35
36
37
38 class MockArtifact
39 implements Artifact
40 {
41 private String groupId;
42
43 private String artifactId;
44
45 private String version;
46
47 private File file;
48
49 private String scope;
50
51 private String type;
52
53 private String classifier;
54
55 private String baseVersion;
56
57 private ArtifactHandler artifactHandler;
58
59 private boolean snapshot;
60
61 public String getGroupId()
62 {
63 return groupId;
64 }
65
66 public String getArtifactId()
67 {
68 return artifactId;
69 }
70
71 public String getVersion()
72 {
73 return version;
74 }
75
76 public void setVersion( String string )
77 {
78 this.version = string;
79 }
80
81 public void setSnapshotVersion( String snapshotVersion, String baseVersion )
82 {
83 snapshot = true;
84 version = snapshotVersion;
85 this.baseVersion = baseVersion;
86 }
87
88 public String getScope()
89 {
90 return scope;
91 }
92
93 public String getType()
94 {
95 return type;
96 }
97
98 public String getClassifier()
99 {
100 return classifier;
101 }
102
103 public boolean hasClassifier()
104 {
105 return classifier != null;
106 }
107
108 public File getFile()
109 {
110 return file;
111 }
112
113 public void setFile( File file )
114 {
115 this.file = file;
116 }
117
118 public String getBaseVersion()
119 {
120 return baseVersion;
121 }
122
123 public void setBaseVersion( String string )
124 {
125 this.baseVersion = string;
126 }
127
128 public String getId()
129 {
130
131 return null;
132 }
133
134 public String getDependencyConflictId()
135 {
136
137 return null;
138 }
139
140 public void addMetadata( ArtifactMetadata artifactMetadata )
141 {
142
143 }
144
145 public Collection getMetadataList()
146 {
147
148 return null;
149 }
150
151 public void setRepository( ArtifactRepository artifactRepository )
152 {
153
154
155 }
156
157 public ArtifactRepository getRepository()
158 {
159
160 return null;
161 }
162
163 public void updateVersion( String string, ArtifactRepository artifactRepository )
164 {
165
166
167 }
168
169 public String getDownloadUrl()
170 {
171
172 return null;
173 }
174
175 public void setDownloadUrl( String string )
176 {
177
178
179 }
180
181 public ArtifactFilter getDependencyFilter()
182 {
183
184 return null;
185 }
186
187 public void setDependencyFilter( ArtifactFilter artifactFilter )
188 {
189
190
191 }
192
193 public ArtifactHandler getArtifactHandler()
194 {
195 return artifactHandler;
196 }
197
198 public List getDependencyTrail()
199 {
200
201 return null;
202 }
203
204 public void setDependencyTrail( List list )
205 {
206
207
208 }
209
210 public VersionRange getVersionRange()
211 {
212 return VersionRange.createFromVersion( version );
213 }
214
215 public void setVersionRange( VersionRange versionRange )
216 {
217
218
219 }
220
221 public void selectVersion( String string )
222 {
223
224
225 }
226
227 public boolean isSnapshot()
228 {
229 return snapshot;
230 }
231
232 public void setResolved( boolean b )
233 {
234
235
236 }
237
238 public boolean isResolved()
239 {
240
241 return false;
242 }
243
244 public void setResolvedVersion( String string )
245 {
246
247
248 }
249
250 public void setArtifactHandler( ArtifactHandler artifactHandler )
251 {
252 this.artifactHandler = artifactHandler;
253 }
254
255 public boolean isRelease()
256 {
257
258 return false;
259 }
260
261 public void setRelease( boolean b )
262 {
263
264
265 }
266
267 public List getAvailableVersions()
268 {
269
270 return null;
271 }
272
273 public void setAvailableVersions( List list )
274 {
275
276
277 }
278
279 public boolean isOptional()
280 {
281 return false;
282
283 }
284
285 public void setOptional( boolean b )
286 {
287
288
289 }
290
291 public ArtifactVersion getSelectedVersion()
292 throws OverConstrainedVersionException
293 {
294
295 return null;
296 }
297
298 public boolean isSelectedVersionKnown()
299 throws OverConstrainedVersionException
300 {
301 return false;
302
303 }
304
305 public void setGroupId( String groupId )
306 {
307 this.groupId = groupId;
308 }
309
310 public void setArtifactId( String artifactId )
311 {
312 this.artifactId = artifactId;
313 }
314
315 public void setType( String type )
316 {
317 this.type = type;
318 }
319
320 public void setClassifier( String classifier )
321 {
322 this.classifier = classifier;
323 }
324
325 public void setScope( String string )
326 {
327 this.scope = string;
328 }
329
330 public int compareTo( Object o )
331 {
332
333 return 0;
334 }
335 }