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 * 28 * 29 * The <code><build></code> element contains 30 * informations required to build the project. 31 * Default values are defined in Super POM. 32 * 33 * 34 * 35 * @version $Revision$ $Date$ 36 */ 37 @SuppressWarnings( "all" ) 38 public class Build 39 extends BuildBase 40 implements java.io.Serializable, java.lang.Cloneable 41 { 42 43 //--------------------------/ 44 //- Class/Member Variables -/ 45 //--------------------------/ 46 47 /** 48 * 49 * This element specifies a directory containing 50 * the source of the project. The 51 * generated build system will compile the sources 52 * from this directory when the project is 53 * built. The path given is relative to the project 54 * descriptor. 55 * The default value is <code>src/main/java</code>. 56 * 57 */ 58 private String sourceDirectory; 59 60 /** 61 * 62 * This element specifies a directory containing 63 * the script sources of the 64 * project. This directory is meant to be different 65 * from the sourceDirectory, in that its 66 * contents will be copied to the output directory 67 * in most cases (since scripts are 68 * interpreted rather than compiled). 69 * The default value is 70 * <code>src/main/scripts</code>. 71 * 72 */ 73 private String scriptSourceDirectory; 74 75 /** 76 * 77 * This element specifies a directory containing 78 * the unit test source of the 79 * project. The generated build system will compile 80 * these directories when the project is 81 * being tested. The path given is relative to the 82 * project descriptor. 83 * The default value is <code>src/test/java</code>. 84 * 85 */ 86 private String testSourceDirectory; 87 88 /** 89 * 90 * The directory where compiled application classes 91 * are placed. 92 * The default value is 93 * <code>target/classes</code>. 94 * 95 */ 96 private String outputDirectory; 97 98 /** 99 * 100 * The directory where compiled test classes are 101 * placed. 102 * The default value is 103 * <code>target/test-classes</code>. 104 * 105 */ 106 private String testOutputDirectory; 107 108 /** 109 * Field extensions. 110 */ 111 private java.util.List<Extension> extensions; 112 113 114 //-----------/ 115 //- Methods -/ 116 //-----------/ 117 118 /** 119 * Method addExtension. 120 * 121 * @param extension a extension object. 122 */ 123 public void addExtension( Extension extension ) 124 { 125 getExtensions().add( extension ); 126 } //-- void addExtension( Extension ) 127 128 /** 129 * Method clone. 130 * 131 * @return Build 132 */ 133 public Build clone() 134 { 135 try 136 { 137 Build copy = (Build) super.clone(); 138 139 if ( this.extensions != null ) 140 { 141 copy.extensions = new java.util.ArrayList<Extension>(); 142 for ( Extension item : this.extensions ) 143 { 144 copy.extensions.add( ( (Extension) item).clone() ); 145 } 146 } 147 148 return copy; 149 } 150 catch ( java.lang.Exception ex ) 151 { 152 throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName() 153 + " does not support clone()" ).initCause( ex ); 154 } 155 } //-- Build clone() 156 157 /** 158 * Method getExtensions. 159 * 160 * @return List 161 */ 162 public java.util.List<Extension> getExtensions() 163 { 164 if ( this.extensions == null ) 165 { 166 this.extensions = new java.util.ArrayList<Extension>(); 167 } 168 169 return this.extensions; 170 } //-- java.util.List<Extension> getExtensions() 171 172 /** 173 * Get the directory where compiled application classes are 174 * placed. 175 * The default value is 176 * <code>target/classes</code>. 177 * 178 * @return String 179 */ 180 public String getOutputDirectory() 181 { 182 return this.outputDirectory; 183 } //-- String getOutputDirectory() 184 185 /** 186 * Get this element specifies a directory containing the script 187 * sources of the 188 * project. This directory is meant to be different 189 * from the sourceDirectory, in that its 190 * contents will be copied to the output directory 191 * in most cases (since scripts are 192 * interpreted rather than compiled). 193 * The default value is 194 * <code>src/main/scripts</code>. 195 * 196 * @return String 197 */ 198 public String getScriptSourceDirectory() 199 { 200 return this.scriptSourceDirectory; 201 } //-- String getScriptSourceDirectory() 202 203 /** 204 * Get this element specifies a directory containing the source 205 * of the project. The 206 * generated build system will compile the sources 207 * from this directory when the project is 208 * built. The path given is relative to the project 209 * descriptor. 210 * The default value is <code>src/main/java</code>. 211 * 212 * @return String 213 */ 214 public String getSourceDirectory() 215 { 216 return this.sourceDirectory; 217 } //-- String getSourceDirectory() 218 219 /** 220 * Get the directory where compiled test classes are placed. 221 * The default value is 222 * <code>target/test-classes</code>. 223 * 224 * @return String 225 */ 226 public String getTestOutputDirectory() 227 { 228 return this.testOutputDirectory; 229 } //-- String getTestOutputDirectory() 230 231 /** 232 * Get this element specifies a directory containing the unit 233 * test source of the 234 * project. The generated build system will compile 235 * these directories when the project is 236 * being tested. The path given is relative to the 237 * project descriptor. 238 * The default value is <code>src/test/java</code>. 239 * 240 * @return String 241 */ 242 public String getTestSourceDirectory() 243 { 244 return this.testSourceDirectory; 245 } //-- String getTestSourceDirectory() 246 247 /** 248 * Method removeExtension. 249 * 250 * @param extension a extension object. 251 */ 252 public void removeExtension( Extension extension ) 253 { 254 getExtensions().remove( extension ); 255 } //-- void removeExtension( Extension ) 256 257 /** 258 * Set a set of build extensions to use from this project. 259 * 260 * @param extensions a extensions object. 261 */ 262 public void setExtensions( java.util.List<Extension> extensions ) 263 { 264 this.extensions = extensions; 265 } //-- void setExtensions( java.util.List ) 266 267 /** 268 * Set the directory where compiled application classes are 269 * placed. 270 * The default value is 271 * <code>target/classes</code>. 272 * 273 * @param outputDirectory a outputDirectory object. 274 */ 275 public void setOutputDirectory( String outputDirectory ) 276 { 277 this.outputDirectory = outputDirectory; 278 } //-- void setOutputDirectory( String ) 279 280 /** 281 * Set this element specifies a directory containing the script 282 * sources of the 283 * project. This directory is meant to be different 284 * from the sourceDirectory, in that its 285 * contents will be copied to the output directory 286 * in most cases (since scripts are 287 * interpreted rather than compiled). 288 * The default value is 289 * <code>src/main/scripts</code>. 290 * 291 * @param scriptSourceDirectory a scriptSourceDirectory object. 292 */ 293 public void setScriptSourceDirectory( String scriptSourceDirectory ) 294 { 295 this.scriptSourceDirectory = scriptSourceDirectory; 296 } //-- void setScriptSourceDirectory( String ) 297 298 /** 299 * Set this element specifies a directory containing the source 300 * of the project. The 301 * generated build system will compile the sources 302 * from this directory when the project is 303 * built. The path given is relative to the project 304 * descriptor. 305 * The default value is <code>src/main/java</code>. 306 * 307 * @param sourceDirectory a sourceDirectory object. 308 */ 309 public void setSourceDirectory( String sourceDirectory ) 310 { 311 this.sourceDirectory = sourceDirectory; 312 } //-- void setSourceDirectory( String ) 313 314 /** 315 * Set the directory where compiled test classes are placed. 316 * The default value is 317 * <code>target/test-classes</code>. 318 * 319 * @param testOutputDirectory a testOutputDirectory object. 320 */ 321 public void setTestOutputDirectory( String testOutputDirectory ) 322 { 323 this.testOutputDirectory = testOutputDirectory; 324 } //-- void setTestOutputDirectory( String ) 325 326 /** 327 * Set this element specifies a directory containing the unit 328 * test source of the 329 * project. The generated build system will compile 330 * these directories when the project is 331 * being tested. The path given is relative to the 332 * project descriptor. 333 * The default value is <code>src/test/java</code>. 334 * 335 * @param testSourceDirectory a testSourceDirectory object. 336 */ 337 public void setTestSourceDirectory( String testSourceDirectory ) 338 { 339 this.testSourceDirectory = testSourceDirectory; 340 } //-- void setTestSourceDirectory( String ) 341 342 343 344 /** 345 * @see java.lang.Object#toString() 346 */ 347 public String toString() 348 { 349 return "Build {" + super.toString() + "}"; 350 } 351 352 353 }