1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package org.apache.maven.shared.release.transform.jdom2;
20
21 import java.util.List;
22
23 import org.apache.maven.model.Dependency;
24 import org.apache.maven.model.Exclusion;
25 import org.apache.maven.shared.release.transform.MavenCoordinate;
26 import org.jdom2.Element;
27
28
29
30
31
32
33
34 public class JDomDependency extends Dependency implements MavenCoordinate {
35 private final MavenCoordinate coordinate;
36
37
38
39
40
41
42 public JDomDependency(Element dependency) {
43 this.coordinate = new JDomMavenCoordinate(dependency);
44 }
45
46 @Override
47 public void addExclusion(Exclusion exclusion) {
48 throw new UnsupportedOperationException();
49 }
50
51 @Override
52 public String getArtifactId() {
53 return coordinate.getArtifactId();
54 }
55
56 @Override
57 public String getClassifier() {
58 throw new UnsupportedOperationException();
59 }
60
61 @Override
62 public List<Exclusion> getExclusions() {
63 throw new UnsupportedOperationException();
64 }
65
66 @Override
67 public String getGroupId() {
68 return coordinate.getGroupId();
69 }
70
71 @Override
72 public String getScope() {
73 throw new UnsupportedOperationException();
74 }
75
76 @Override
77 public String getSystemPath() {
78 throw new UnsupportedOperationException();
79 }
80
81 @Override
82 public String getType() {
83 throw new UnsupportedOperationException();
84 }
85
86 @Override
87 public String getVersion() {
88 return coordinate.getVersion();
89 }
90
91 @Override
92 public boolean isOptional() {
93 throw new UnsupportedOperationException();
94 }
95
96 @Override
97 public void removeExclusion(Exclusion exclusion) {
98 throw new UnsupportedOperationException();
99 }
100
101 @Override
102 public void setArtifactId(String artifactId) {
103 throw new UnsupportedOperationException();
104 }
105
106 @Override
107 public void setClassifier(String classifier) {
108 throw new UnsupportedOperationException();
109 }
110
111 @Override
112 public void setExclusions(List<Exclusion> exclusions) {
113 throw new UnsupportedOperationException();
114 }
115
116 @Override
117 public void setGroupId(String groupId) {
118 throw new UnsupportedOperationException();
119 }
120
121 @Override
122 public void setOptional(boolean optional) {
123 throw new UnsupportedOperationException();
124 }
125
126 @Override
127 public void setScope(String scope) {
128 throw new UnsupportedOperationException();
129 }
130
131 @Override
132 public void setSystemPath(String systemPath) {
133 throw new UnsupportedOperationException();
134 }
135
136 @Override
137 public void setType(String type) {
138 throw new UnsupportedOperationException();
139 }
140
141 @Override
142 public void setVersion(String version) {
143 coordinate.setVersion(version);
144 }
145
146 @Override
147 public String getName() {
148 return "dependency";
149 }
150 }