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