1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.maven.report.projectinfo.stubs;
20
21 import org.apache.maven.artifact.handler.ArtifactHandler;
22 import org.apache.maven.artifact.versioning.VersionRange;
23 import org.apache.maven.plugin.testing.stubs.ArtifactStub;
24
25
26
27
28
29 public class ProjectInfoPluginArtifactStub extends ArtifactStub {
30 private String groupId;
31
32 private String artifactId;
33
34 private String version;
35
36 private String packaging;
37
38 private String type;
39
40 private VersionRange versionRange;
41
42 private ArtifactHandler handler;
43
44 public ProjectInfoPluginArtifactStub(
45 String groupId, String artifactId, String version, String packaging, String type) {
46 this.groupId = groupId;
47 this.artifactId = artifactId;
48 this.version = version;
49 this.packaging = packaging;
50 this.type = type;
51 versionRange = VersionRange.createFromVersion(version);
52 }
53
54 @Override
55 public void setGroupId(String groupId) {
56 this.groupId = groupId;
57 }
58
59 @Override
60 public String getGroupId() {
61 return groupId;
62 }
63
64 @Override
65 public void setArtifactId(String artifactId) {
66 this.artifactId = artifactId;
67 }
68
69 @Override
70 public String getArtifactId() {
71 return artifactId;
72 }
73
74 @Override
75 public void setVersion(String version) {
76 this.version = version;
77 }
78
79 @Override
80 public String getVersion() {
81 return version;
82 }
83
84 public void setPackaging(String packaging) {
85 this.packaging = packaging;
86 }
87
88 public String getPackaging() {
89 return packaging;
90 }
91
92 @Override
93 public VersionRange getVersionRange() {
94 return versionRange;
95 }
96
97 @Override
98 public void setVersionRange(VersionRange versionRange) {
99 this.versionRange = versionRange;
100 }
101
102 @Override
103 public ArtifactHandler getArtifactHandler() {
104 return handler;
105 }
106
107 @Override
108 public void setArtifactHandler(ArtifactHandler handler) {
109 this.handler = handler;
110 }
111
112 @Override
113 public String getType() {
114 return type;
115 }
116
117 @Override
118 public void setType(String type) {
119 this.type = type;
120 }
121 }