1 /*
2 Licensed to the Apache Software Foundation (ASF) under one
3 or more contributor license agreements. See the NOTICE file
4 distributed with this work for additional information
5 regarding copyright ownership. The ASF licenses this file
6 to you under the Apache License, Version 2.0 (the
7 "License"); you may not use this file except in compliance
8 with the License. You may obtain a copy of the License at
9
10 http://www.apache.org/licenses/LICENSE-2.0
11
12 Unless required by applicable law or agreed to in writing,
13 software distributed under the License is distributed on an
14 "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 KIND, either express or implied. See the License for the
16 specific language governing permissions and limitations
17 under the License.
18 =================== DO NOT EDIT THIS FILE ====================
19 Generated by Modello 2.5.1,
20 any modifications will be overwritten.
21 ==============================================================
22 */
23
24 package org.apache.maven.plugins.assembly.model;
25
26 /**
27 *
28 *
29 * A moduleSet represent one or more project <module>
30 * present inside
31 * a project's pom.xml. This allows you to include sources
32 * or binaries
33 * belonging to a project's <modules>.
34 *
35 * <p><b>NOTE:</b> When using <moduleSets> from the
36 * command-line, it
37 * is required to pass first the package phase by doing:
38 * "mvn package
39 * assembly:assembly". This bug/issue is scheduled to be
40 * addressed by Maven 2.1.</p>
41 *
42 *
43 *
44 * @version $Revision$ $Date$
45 */
46 @SuppressWarnings( "all" )
47 public class ModuleSet
48 implements java.io.Serializable
49 {
50
51 //--------------------------/
52 //- Class/Member Variables -/
53 //--------------------------/
54
55 /**
56 *
57 * If set to true, the plugin will include all
58 * projects in the current reactor for processing
59 * in this ModuleSet. These will be subject to
60 * include/exclude rules.
61 * Default value is true. (Since 2.2)
62 * .
63 */
64 private boolean useAllReactorProjects = false;
65
66 /**
67 *
68 * If set to false, the plugin will exclude
69 * sub-modules from processing in this ModuleSet.
70 * Otherwise, it will process all sub-modules, each
71 * subject to include/exclude rules.
72 * Default value is true. (Since 2.2)
73 * .
74 */
75 private boolean includeSubModules = true;
76
77 /**
78 * Field includes.
79 */
80 private java.util.List<String> includes;
81
82 /**
83 * Field excludes.
84 */
85 private java.util.List<String> excludes;
86
87 /**
88 *
89 * When this is present, the plugin will include
90 * the source files of
91 * the included modules from this set in the
92 * resulting assembly.
93 *
94 */
95 private ModuleSources sources;
96
97 /**
98 *
99 * When this is present, the plugin will include
100 * the binaries of the
101 * included modules from this set in the resulting
102 * assembly.
103 *
104 */
105 private ModuleBinaries binaries;
106
107
108 //-----------/
109 //- Methods -/
110 //-----------/
111
112 /**
113 * Method addExclude.
114 *
115 * @param string a string object.
116 */
117 public void addExclude( String string )
118 {
119 getExcludes().add( string );
120 } //-- void addExclude( String )
121
122 /**
123 * Method addInclude.
124 *
125 * @param string a string object.
126 */
127 public void addInclude( String string )
128 {
129 getIncludes().add( string );
130 } //-- void addInclude( String )
131
132 /**
133 * Get when this is present, the plugin will include the
134 * binaries of the
135 * included modules from this set in the resulting
136 * assembly.
137 *
138 * @return ModuleBinaries
139 */
140 public ModuleBinaries getBinaries()
141 {
142 return this.binaries;
143 } //-- ModuleBinaries getBinaries()
144
145 /**
146 * Method getExcludes.
147 *
148 * @return List
149 */
150 public java.util.List<String> getExcludes()
151 {
152 if ( this.excludes == null )
153 {
154 this.excludes = new java.util.ArrayList<String>();
155 }
156
157 return this.excludes;
158 } //-- java.util.List<String> getExcludes()
159
160 /**
161 * Method getIncludes.
162 *
163 * @return List
164 */
165 public java.util.List<String> getIncludes()
166 {
167 if ( this.includes == null )
168 {
169 this.includes = new java.util.ArrayList<String>();
170 }
171
172 return this.includes;
173 } //-- java.util.List<String> getIncludes()
174
175 /**
176 * Get when this is present, the plugin will include the source
177 * files of
178 * the included modules from this set in the
179 * resulting assembly.
180 *
181 * @return ModuleSources
182 */
183 public ModuleSources getSources()
184 {
185 return this.sources;
186 } //-- ModuleSources getSources()
187
188 /**
189 * Get if set to false, the plugin will exclude sub-modules
190 * from processing in this ModuleSet.
191 * Otherwise, it will process all sub-modules, each
192 * subject to include/exclude rules.
193 * Default value is true. (Since 2.2).
194 *
195 * @return boolean
196 */
197 public boolean isIncludeSubModules()
198 {
199 return this.includeSubModules;
200 } //-- boolean isIncludeSubModules()
201
202 /**
203 * Get if set to true, the plugin will include all projects in
204 * the current reactor for processing
205 * in this ModuleSet. These will be subject to
206 * include/exclude rules.
207 * Default value is true. (Since 2.2).
208 *
209 * @return boolean
210 */
211 public boolean isUseAllReactorProjects()
212 {
213 return this.useAllReactorProjects;
214 } //-- boolean isUseAllReactorProjects()
215
216 /**
217 * Method removeExclude.
218 *
219 * @param string a string object.
220 */
221 public void removeExclude( String string )
222 {
223 getExcludes().remove( string );
224 } //-- void removeExclude( String )
225
226 /**
227 * Method removeInclude.
228 *
229 * @param string a string object.
230 */
231 public void removeInclude( String string )
232 {
233 getIncludes().remove( string );
234 } //-- void removeInclude( String )
235
236 /**
237 * Set when this is present, the plugin will include the
238 * binaries of the
239 * included modules from this set in the resulting
240 * assembly.
241 *
242 * @param binaries a binaries object.
243 */
244 public void setBinaries( ModuleBinaries binaries )
245 {
246 this.binaries = binaries;
247 } //-- void setBinaries( ModuleBinaries )
248
249 /**
250 * Set when <exclude> subelements are present, they
251 * define a set of
252 * project artifact coordinates to exclude. If none
253 * is present, then
254 * <excludes> represents no exclusions.
255 *
256 * Artifact coordinates may be given in simple
257 * groupId:artifactId form,
258 * or they may be fully qualified in the form
259 * groupId:artifactId:type[:classifier]:version.
260 * Additionally, wildcards can be used, as in
261 * *:maven-*.
262 *
263 * @param excludes a excludes object.
264 */
265 public void setExcludes( java.util.List<String> excludes )
266 {
267 this.excludes = excludes;
268 } //-- void setExcludes( java.util.List )
269
270 /**
271 * Set if set to false, the plugin will exclude sub-modules
272 * from processing in this ModuleSet.
273 * Otherwise, it will process all sub-modules, each
274 * subject to include/exclude rules.
275 * Default value is true. (Since 2.2).
276 *
277 * @param includeSubModules a includeSubModules object.
278 */
279 public void setIncludeSubModules( boolean includeSubModules )
280 {
281 this.includeSubModules = includeSubModules;
282 } //-- void setIncludeSubModules( boolean )
283
284 /**
285 * Set when <include> subelements are present, they
286 * define a set of
287 * project coordinates to include. If none is
288 * present, then
289 * <includes> represents all valid values.
290 *
291 * Artifact coordinates may be given in simple
292 * groupId:artifactId form,
293 * or they may be fully qualified in the form
294 * groupId:artifactId:type[:classifier]:version.
295 * Additionally, wildcards can be used, as in
296 * *:maven-*.
297 *
298 * @param includes a includes object.
299 */
300 public void setIncludes( java.util.List<String> includes )
301 {
302 this.includes = includes;
303 } //-- void setIncludes( java.util.List )
304
305 /**
306 * Set when this is present, the plugin will include the source
307 * files of
308 * the included modules from this set in the
309 * resulting assembly.
310 *
311 * @param sources a sources object.
312 */
313 public void setSources( ModuleSources sources )
314 {
315 this.sources = sources;
316 } //-- void setSources( ModuleSources )
317
318 /**
319 * Set if set to true, the plugin will include all projects in
320 * the current reactor for processing
321 * in this ModuleSet. These will be subject to
322 * include/exclude rules.
323 * Default value is true. (Since 2.2).
324 *
325 * @param useAllReactorProjects a useAllReactorProjects object.
326 */
327 public void setUseAllReactorProjects( boolean useAllReactorProjects )
328 {
329 this.useAllReactorProjects = useAllReactorProjects;
330 } //-- void setUseAllReactorProjects( boolean )
331
332 }