1
2
3
4
5
6
7
8
9
10
11
12
13 package org.abstracthorizon.extend.repository.maven.pom;
14
15
16 public class Dependency extends Artifact {
17
18 protected String scope;
19
20 protected Exclusions exclusions;
21
22 protected String optional;
23
24 public Dependency() {
25 }
26
27 public Exclusions getExclusions() {
28 return exclusions;
29 }
30
31 public Exclusions addExclusions() {
32 exclusions = new Exclusions();
33 return exclusions;
34 }
35
36 public String getScope() {
37 return scope;
38 }
39
40 public void setScope(String scope) {
41 this.scope = scope;
42 }
43
44 public String getOptional() {
45 return optional;
46 }
47
48 public void setOptional(String optional) {
49 this.optional = optional;
50 }
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68 public String toString(int indent) {
69 StringBuffer res = new StringBuffer();
70 ToStringHelper.openTag("dependency", res, indent);
71 res.append(super.toString(indent + 2));
72 if (scope != null) {
73 ToStringHelper.valueTag("scope", scope, res, indent + 2);
74 }
75 if (optional != null) {
76 ToStringHelper.valueTag("optional", optional, res, indent + 2);
77 }
78 if (exclusions != null) {
79 res.append(exclusions.toString(indent + 2));
80 }
81 ToStringHelper.closeTag("dependency", res, indent);
82 return res.toString();
83 }
84
85 public String toString() {
86 return toString(0);
87 }
88 }