1
2
3
4
5
6
7
8 package org.apache.maven.model;
9
10
11
12
13
14
15
16
17 @SuppressWarnings( "all" )
18 public class Profile
19 extends ModelBase
20 implements java.io.Serializable, java.lang.Cloneable
21 {
22
23
24
25
26
27
28
29
30
31
32
33
34 private String id = "default";
35
36
37
38
39
40
41 private Activation activation;
42
43
44
45
46 private BuildBase build;
47
48
49
50
51
52
53
54
55
56
57
58 public Profile clone()
59 {
60 try
61 {
62 Profile copy = (Profile) super.clone();
63
64 if ( this.activation != null )
65 {
66 copy.activation = (Activation) this.activation.clone();
67 }
68
69 if ( this.build != null )
70 {
71 copy.build = (BuildBase) this.build.clone();
72 }
73
74 return copy;
75 }
76 catch ( java.lang.Exception ex )
77 {
78 throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName()
79 + " does not support clone()" ).initCause( ex );
80 }
81 }
82
83
84
85
86
87
88
89
90 public Activation getActivation()
91 {
92 return this.activation;
93 }
94
95
96
97
98
99
100 public BuildBase getBuild()
101 {
102 return this.build;
103 }
104
105
106
107
108
109
110
111
112
113 public String getId()
114 {
115 return this.id;
116 }
117
118
119
120
121
122
123
124
125 public void setActivation( Activation activation )
126 {
127 this.activation = activation;
128 }
129
130
131
132
133
134
135 public void setBuild( BuildBase build )
136 {
137 this.build = build;
138 }
139
140
141
142
143
144
145
146
147
148 public void setId( String id )
149 {
150 this.id = id;
151 }
152
153
154
155 public static final String SOURCE_POM = "pom";
156
157 public static final String SOURCE_SETTINGS = "settings.xml";
158
159
160
161 private String source = SOURCE_POM;
162
163 public void setSource( String source )
164 {
165 this.source = source;
166 }
167
168 public String getSource()
169 {
170 return source;
171 }
172
173
174
175
176 public String toString()
177 {
178 return "Profile {id: " + getId() + ", source: " + getSource() + "}";
179 }
180
181
182 }