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.4.0, 20 any modifications will be overwritten. 21 ============================================================== 22 */ 23 24 package org.apache.maven.model; 25 26 /** 27 * Build configuration in a profile. 28 * 29 * @version $Revision$ $Date$ 30 */ 31 @SuppressWarnings( "all" ) 32 public class BuildBase 33 extends PluginConfiguration 34 implements java.io.Serializable, java.lang.Cloneable 35 { 36 37 //--------------------------/ 38 //- Class/Member Variables -/ 39 //--------------------------/ 40 41 /** 42 * The default goal (or phase in Maven 2) to execute when none 43 * is specified for 44 * the project. Note that in case of a multi-module 45 * build, only the default goal of the top-level 46 * project is relevant, i.e. the default goals of 47 * child modules are ignored. Since Maven 3, 48 * multiple goals/phases can be separated by 49 * whitespace. 50 */ 51 private String defaultGoal; 52 53 /** 54 * Field resources. 55 */ 56 private java.util.List<Resource> resources; 57 58 /** 59 * Field testResources. 60 */ 61 private java.util.List<Resource> testResources; 62 63 /** 64 * 65 * The directory where all files generated by the 66 * build are placed. 67 * The default value is <code>target</code>. 68 * 69 */ 70 private String directory; 71 72 /** 73 * 74 * 75 * The filename (excluding the extension, and with 76 * no path information) that 77 * the produced artifact will be called. 78 * The default value is 79 * <code>${artifactId}-${version}</code>. 80 * 81 * 82 */ 83 private String finalName; 84 85 /** 86 * Field filters. 87 */ 88 private java.util.List<String> filters; 89 90 91 //-----------/ 92 //- Methods -/ 93 //-----------/ 94 95 /** 96 * Method addFilter. 97 * 98 * @param string a string object. 99 */ 100 public void addFilter( String string ) 101 { 102 getFilters().add( string ); 103 } //-- void addFilter( String ) 104 105 /** 106 * Method addResource. 107 * 108 * @param resource a resource object. 109 */ 110 public void addResource( Resource resource ) 111 { 112 getResources().add( resource ); 113 } //-- void addResource( Resource ) 114 115 /** 116 * Method addTestResource. 117 * 118 * @param resource a resource object. 119 */ 120 public void addTestResource( Resource resource ) 121 { 122 getTestResources().add( resource ); 123 } //-- void addTestResource( Resource ) 124 125 /** 126 * Method clone. 127 * 128 * @return BuildBase 129 */ 130 public BuildBase clone() 131 { 132 try 133 { 134 BuildBase copy = (BuildBase) super.clone(); 135 136 if ( this.resources != null ) 137 { 138 copy.resources = new java.util.ArrayList<Resource>(); 139 for ( Resource item : this.resources ) 140 { 141 copy.resources.add( ( (Resource) item).clone() ); 142 } 143 } 144 145 if ( this.testResources != null ) 146 { 147 copy.testResources = new java.util.ArrayList<Resource>(); 148 for ( Resource item : this.testResources ) 149 { 150 copy.testResources.add( ( (Resource) item).clone() ); 151 } 152 } 153 154 if ( this.filters != null ) 155 { 156 copy.filters = new java.util.ArrayList<String>(); 157 copy.filters.addAll( this.filters ); 158 } 159 160 return copy; 161 } 162 catch ( java.lang.Exception ex ) 163 { 164 throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName() 165 + " does not support clone()" ).initCause( ex ); 166 } 167 } //-- BuildBase clone() 168 169 /** 170 * Get the default goal (or phase in Maven 2) to execute when 171 * none is specified for 172 * the project. Note that in case of a multi-module 173 * build, only the default goal of the top-level 174 * project is relevant, i.e. the default goals of 175 * child modules are ignored. Since Maven 3, 176 * multiple goals/phases can be separated by 177 * whitespace. 178 * 179 * @return String 180 */ 181 public String getDefaultGoal() 182 { 183 return this.defaultGoal; 184 } //-- String getDefaultGoal() 185 186 /** 187 * Get the directory where all files generated by the build are 188 * placed. 189 * The default value is <code>target</code>. 190 * 191 * @return String 192 */ 193 public String getDirectory() 194 { 195 return this.directory; 196 } //-- String getDirectory() 197 198 /** 199 * Method getFilters. 200 * 201 * @return List 202 */ 203 public java.util.List<String> getFilters() 204 { 205 if ( this.filters == null ) 206 { 207 this.filters = new java.util.ArrayList<String>(); 208 } 209 210 return this.filters; 211 } //-- java.util.List<String> getFilters() 212 213 /** 214 * Get the filename (excluding the extension, and with no path 215 * information) that 216 * the produced artifact will be called. 217 * The default value is 218 * <code>${artifactId}-${version}</code>. 219 * 220 * @return String 221 */ 222 public String getFinalName() 223 { 224 return this.finalName; 225 } //-- String getFinalName() 226 227 /** 228 * Method getResources. 229 * 230 * @return List 231 */ 232 public java.util.List<Resource> getResources() 233 { 234 if ( this.resources == null ) 235 { 236 this.resources = new java.util.ArrayList<Resource>(); 237 } 238 239 return this.resources; 240 } //-- java.util.List<Resource> getResources() 241 242 /** 243 * Method getTestResources. 244 * 245 * @return List 246 */ 247 public java.util.List<Resource> getTestResources() 248 { 249 if ( this.testResources == null ) 250 { 251 this.testResources = new java.util.ArrayList<Resource>(); 252 } 253 254 return this.testResources; 255 } //-- java.util.List<Resource> getTestResources() 256 257 /** 258 * Method removeFilter. 259 * 260 * @param string a string object. 261 */ 262 public void removeFilter( String string ) 263 { 264 getFilters().remove( string ); 265 } //-- void removeFilter( String ) 266 267 /** 268 * Method removeResource. 269 * 270 * @param resource a resource object. 271 */ 272 public void removeResource( Resource resource ) 273 { 274 getResources().remove( resource ); 275 } //-- void removeResource( Resource ) 276 277 /** 278 * Method removeTestResource. 279 * 280 * @param resource a resource object. 281 */ 282 public void removeTestResource( Resource resource ) 283 { 284 getTestResources().remove( resource ); 285 } //-- void removeTestResource( Resource ) 286 287 /** 288 * Set the default goal (or phase in Maven 2) to execute when 289 * none is specified for 290 * the project. Note that in case of a multi-module 291 * build, only the default goal of the top-level 292 * project is relevant, i.e. the default goals of 293 * child modules are ignored. Since Maven 3, 294 * multiple goals/phases can be separated by 295 * whitespace. 296 * 297 * @param defaultGoal a defaultGoal object. 298 */ 299 public void setDefaultGoal( String defaultGoal ) 300 { 301 this.defaultGoal = defaultGoal; 302 } //-- void setDefaultGoal( String ) 303 304 /** 305 * Set the directory where all files generated by the build are 306 * placed. 307 * The default value is <code>target</code>. 308 * 309 * @param directory a directory object. 310 */ 311 public void setDirectory( String directory ) 312 { 313 this.directory = directory; 314 } //-- void setDirectory( String ) 315 316 /** 317 * Set the list of filter properties files that are used when 318 * filtering is enabled. 319 * 320 * @param filters a filters object. 321 */ 322 public void setFilters( java.util.List<String> filters ) 323 { 324 this.filters = filters; 325 } //-- void setFilters( java.util.List ) 326 327 /** 328 * Set the filename (excluding the extension, and with no path 329 * information) that 330 * the produced artifact will be called. 331 * The default value is 332 * <code>${artifactId}-${version}</code>. 333 * 334 * @param finalName a finalName object. 335 */ 336 public void setFinalName( String finalName ) 337 { 338 this.finalName = finalName; 339 } //-- void setFinalName( String ) 340 341 /** 342 * Set this element describes all of the classpath resources 343 * such as properties 344 * files associated with a project. These resources 345 * are often included in the final 346 * package. 347 * The default value is 348 * <code>src/main/resources</code>. 349 * 350 * @param resources a resources object. 351 */ 352 public void setResources( java.util.List<Resource> resources ) 353 { 354 this.resources = resources; 355 } //-- void setResources( java.util.List ) 356 357 /** 358 * Set this element describes all of the classpath resources 359 * such as properties 360 * files associated with a project's unit tests. 361 * The default value is 362 * <code>src/test/resources</code>. 363 * 364 * @param testResources a testResources object. 365 */ 366 public void setTestResources( java.util.List<Resource> testResources ) 367 { 368 this.testResources = testResources; 369 } //-- void setTestResources( java.util.List ) 370 371 372 373 /** 374 * @see java.lang.Object#toString() 375 */ 376 public String toString() 377 { 378 return "BuildBase {" + super.toString() + "}"; 379 } 380 381 382 }