1
2
3
4
5
6 package org.apache.maven.archetype.catalog;
7
8
9
10
11
12
13 @SuppressWarnings( "all" )
14 public class Archetype
15 implements java.io.Serializable
16 {
17
18
19
20
21
22
23
24
25 private String groupId;
26
27
28
29
30 private String artifactId;
31
32
33
34
35
36 private String version;
37
38
39
40
41
42
43 @Deprecated
44 private String repository;
45
46
47
48
49 private String description;
50
51
52
53
54 private java.util.List<String> goals;
55
56
57
58
59 private java.util.Properties properties;
60
61
62
63
64
65
66
67
68
69
70
71 public void addGoal( String string )
72 {
73 getGoals().add( string );
74 }
75
76
77
78
79
80
81
82 public void addProperty( String key, String value )
83 {
84 getProperties().put( key, value );
85 }
86
87
88
89
90
91
92 public String getArtifactId()
93 {
94 return this.artifactId;
95 }
96
97
98
99
100
101
102 public String getDescription()
103 {
104 return this.description;
105 }
106
107
108
109
110
111
112 public java.util.List<String> getGoals()
113 {
114 if ( this.goals == null )
115 {
116 this.goals = new java.util.ArrayList<String>();
117 }
118
119 return this.goals;
120 }
121
122
123
124
125
126
127 public String getGroupId()
128 {
129 return this.groupId;
130 }
131
132
133
134
135
136
137 public java.util.Properties getProperties()
138 {
139 if ( this.properties == null )
140 {
141 this.properties = new java.util.Properties();
142 }
143
144 return this.properties;
145 }
146
147
148
149
150
151
152
153
154 public String getRepository()
155 {
156 return this.repository;
157 }
158
159
160
161
162
163
164
165 public String getVersion()
166 {
167 return this.version;
168 }
169
170
171
172
173
174
175 public void removeGoal( String string )
176 {
177 getGoals().remove( string );
178 }
179
180
181
182
183
184
185 public void setArtifactId( String artifactId )
186 {
187 this.artifactId = artifactId;
188 }
189
190
191
192
193
194
195 public void setDescription( String description )
196 {
197 this.description = description;
198 }
199
200
201
202
203
204
205 public void setGoals( java.util.List<String> goals )
206 {
207 this.goals = goals;
208 }
209
210
211
212
213
214
215 public void setGroupId( String groupId )
216 {
217 this.groupId = groupId;
218 }
219
220
221
222
223
224
225
226 public void setProperties( java.util.Properties properties )
227 {
228 this.properties = properties;
229 }
230
231
232
233
234
235
236
237
238 public void setRepository( String repository )
239 {
240 this.repository = repository;
241 }
242
243
244
245
246
247
248
249 public void setVersion( String version )
250 {
251 this.version = version;
252 }
253
254
255 public String toString()
256 {
257 return "[" + groupId + ":" + artifactId + ":" + version + ( repository != null ? " -> " + repository : "" ) + "]";
258 }
259 public int hashCode()
260 {
261 return groupId.hashCode() + 17 * artifactId.hashCode();
262 }
263 public boolean equals( Object object )
264 {
265 if ( object == null || !( object instanceof Archetype ) )
266 {
267 return false;
268 }
269 else
270 {
271 Archetype a = (Archetype) object;
272 return org.codehaus.plexus.util.StringUtils.equals( groupId, a.getGroupId() )
273 && org.codehaus.plexus.util.StringUtils.equals( artifactId, a.getArtifactId() );
274 }
275 }
276
277 }