Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
ModuleSources |
|
| 1.0833333333333333;1.083 |
1 | /* | |
2 | * $Id$ | |
3 | */ | |
4 | ||
5 | package org.apache.maven.plugins.assembly.model; | |
6 | ||
7 | /** | |
8 | * | |
9 | * Contains configuration options for including the source | |
10 | * files of a | |
11 | * project module in an assembly. | |
12 | * | |
13 | * | |
14 | * @version $Revision$ $Date$ | |
15 | */ | |
16 | 0 | public class ModuleSources extends SetBase |
17 | implements java.io.Serializable | |
18 | { | |
19 | ||
20 | ||
21 | //--------------------------/ | |
22 | //- Class/Member Variables -/ | |
23 | //--------------------------/ | |
24 | ||
25 | /** | |
26 | * Field fileSets | |
27 | */ | |
28 | private java.util.List fileSets; | |
29 | ||
30 | /** | |
31 | * Field includeModuleDirectory | |
32 | */ | |
33 | 0 | private boolean includeModuleDirectory = true; |
34 | ||
35 | /** | |
36 | * Field excludeSubModuleDirectories | |
37 | */ | |
38 | 0 | private boolean excludeSubModuleDirectories = true; |
39 | ||
40 | /** | |
41 | * Field outputDirectoryMapping | |
42 | */ | |
43 | 0 | private String outputDirectoryMapping = "${artifactId}"; |
44 | ||
45 | ||
46 | //-----------/ | |
47 | //- Methods -/ | |
48 | //-----------/ | |
49 | ||
50 | /** | |
51 | * Method addFileSet | |
52 | * | |
53 | * @param fileSet | |
54 | */ | |
55 | public void addFileSet(FileSet fileSet) | |
56 | { | |
57 | 0 | getFileSets().add( fileSet ); |
58 | 0 | } //-- void addFileSet(FileSet) |
59 | ||
60 | /** | |
61 | * Method getFileSets | |
62 | */ | |
63 | public java.util.List getFileSets() | |
64 | { | |
65 | 0 | if ( this.fileSets == null ) |
66 | { | |
67 | 0 | this.fileSets = new java.util.ArrayList(); |
68 | } | |
69 | ||
70 | 0 | return this.fileSets; |
71 | } //-- java.util.List getFileSets() | |
72 | ||
73 | /** | |
74 | * Get | |
75 | * Sets the mapping pattern for all module | |
76 | * base-directories included in this assembly. | |
77 | * NOTE: This field is only used if | |
78 | * includeModuleDirectory == true. | |
79 | * Default is the module's ${artifactId}. (Since | |
80 | * 2.2) | |
81 | * | |
82 | */ | |
83 | public String getOutputDirectoryMapping() | |
84 | { | |
85 | 0 | return this.outputDirectoryMapping; |
86 | } //-- String getOutputDirectoryMapping() | |
87 | ||
88 | /** | |
89 | * Get | |
90 | * | |
91 | * Specifies whether sub-module directories below | |
92 | * the current module should be excluded | |
93 | * from fileSets applied to that module. This might | |
94 | * be useful if you only mean to copy | |
95 | * the sources for the exact module list matched by | |
96 | * this ModuleSet, ignoring (or processing | |
97 | * separately) the modules which exist in | |
98 | * directories below the current one. | |
99 | * Default value is true. (Since 2.2) | |
100 | * | |
101 | * | |
102 | */ | |
103 | public boolean isExcludeSubModuleDirectories() | |
104 | { | |
105 | 0 | return this.excludeSubModuleDirectories; |
106 | } //-- boolean isExcludeSubModuleDirectories() | |
107 | ||
108 | /** | |
109 | * Get | |
110 | * | |
111 | * Specifies whether the module's finalName should | |
112 | * be prepended to the outputDirectory | |
113 | * values of any fileSets applied to it. Default | |
114 | * value is true. (Since 2.2) | |
115 | * | |
116 | * | |
117 | */ | |
118 | public boolean isIncludeModuleDirectory() | |
119 | { | |
120 | 0 | return this.includeModuleDirectory; |
121 | } //-- boolean isIncludeModuleDirectory() | |
122 | ||
123 | /** | |
124 | * Method removeFileSet | |
125 | * | |
126 | * @param fileSet | |
127 | */ | |
128 | public void removeFileSet(FileSet fileSet) | |
129 | { | |
130 | 0 | getFileSets().remove( fileSet ); |
131 | 0 | } //-- void removeFileSet(FileSet) |
132 | ||
133 | /** | |
134 | * Set | |
135 | * | |
136 | * Specifies whether sub-module directories below | |
137 | * the current module should be excluded | |
138 | * from fileSets applied to that module. This might | |
139 | * be useful if you only mean to copy | |
140 | * the sources for the exact module list matched by | |
141 | * this ModuleSet, ignoring (or processing | |
142 | * separately) the modules which exist in | |
143 | * directories below the current one. | |
144 | * Default value is true. (Since 2.2) | |
145 | * | |
146 | * | |
147 | * | |
148 | * @param excludeSubModuleDirectories | |
149 | */ | |
150 | public void setExcludeSubModuleDirectories(boolean excludeSubModuleDirectories) | |
151 | { | |
152 | 0 | this.excludeSubModuleDirectories = excludeSubModuleDirectories; |
153 | 0 | } //-- void setExcludeSubModuleDirectories(boolean) |
154 | ||
155 | /** | |
156 | * Set | |
157 | * | |
158 | * Specifies which groups of files from each | |
159 | * included module to include in the assembly. A | |
160 | * fileSet is specified by providing one or more of | |
161 | * <fileSet> subelements. (Since 2.2) | |
162 | * | |
163 | * | |
164 | * | |
165 | * @param fileSets | |
166 | */ | |
167 | public void setFileSets(java.util.List fileSets) | |
168 | { | |
169 | 0 | this.fileSets = fileSets; |
170 | 0 | } //-- void setFileSets(java.util.List) |
171 | ||
172 | /** | |
173 | * Set | |
174 | * | |
175 | * Specifies whether the module's finalName should | |
176 | * be prepended to the outputDirectory | |
177 | * values of any fileSets applied to it. Default | |
178 | * value is true. (Since 2.2) | |
179 | * | |
180 | * | |
181 | * | |
182 | * @param includeModuleDirectory | |
183 | */ | |
184 | public void setIncludeModuleDirectory(boolean includeModuleDirectory) | |
185 | { | |
186 | 0 | this.includeModuleDirectory = includeModuleDirectory; |
187 | 0 | } //-- void setIncludeModuleDirectory(boolean) |
188 | ||
189 | /** | |
190 | * Set | |
191 | * Sets the mapping pattern for all module | |
192 | * base-directories included in this assembly. | |
193 | * NOTE: This field is only used if | |
194 | * includeModuleDirectory == true. | |
195 | * Default is the module's ${artifactId}. (Since | |
196 | * 2.2) | |
197 | * | |
198 | * | |
199 | * @param outputDirectoryMapping | |
200 | */ | |
201 | public void setOutputDirectoryMapping(String outputDirectoryMapping) | |
202 | { | |
203 | 0 | this.outputDirectoryMapping = outputDirectoryMapping; |
204 | 0 | } //-- void setOutputDirectoryMapping(String) |
205 | ||
206 | ||
207 | 0 | private String modelEncoding = "UTF-8"; |
208 | ||
209 | public void setModelEncoding( String modelEncoding ) | |
210 | { | |
211 | 0 | this.modelEncoding = modelEncoding; |
212 | 0 | } |
213 | ||
214 | public String getModelEncoding() | |
215 | { | |
216 | 0 | return modelEncoding; |
217 | }} |