001 // =================== DO NOT EDIT THIS FILE ==================== 002 // Generated by Modello 1.7, 003 // any modifications will be overwritten. 004 // ============================================================== 005 006 package org.apache.maven.model; 007 008 /** 009 * 010 * 011 * The <code><build></code> element contains 012 * informations required to build the project. 013 * 014 * 015 * 016 * @version $Revision$ $Date$ 017 */ 018 @SuppressWarnings( "all" ) 019 public class Build 020 extends BuildBase 021 implements java.io.Serializable, java.lang.Cloneable 022 { 023 024 //--------------------------/ 025 //- Class/Member Variables -/ 026 //--------------------------/ 027 028 /** 029 * This element specifies a directory containing the source of 030 * the project. The 031 * generated build system will compile the source 032 * in this directory when the project is 033 * built. The path given is relative to the project 034 * descriptor. 035 */ 036 private String sourceDirectory; 037 038 /** 039 * This element specifies a directory containing the script 040 * sources of the 041 * project. This directory is meant to be different 042 * from the sourceDirectory, in that its 043 * contents will be copied to the output directory 044 * in most cases (since scripts are 045 * interpreted rather than compiled). 046 */ 047 private String scriptSourceDirectory; 048 049 /** 050 * This element specifies a directory containing the unit test 051 * source of the 052 * project. The generated build system will compile 053 * these directories when the project is 054 * being tested. The path given is relative to the 055 * project descriptor. 056 */ 057 private String testSourceDirectory; 058 059 /** 060 * The directory where compiled application classes are placed. 061 */ 062 private String outputDirectory; 063 064 /** 065 * The directory where compiled test classes are placed. 066 */ 067 private String testOutputDirectory; 068 069 /** 070 * Field extensions. 071 */ 072 private java.util.List<Extension> extensions; 073 074 075 //-----------/ 076 //- Methods -/ 077 //-----------/ 078 079 /** 080 * Method addExtension. 081 * 082 * @param extension 083 */ 084 public void addExtension( Extension extension ) 085 { 086 getExtensions().add( extension ); 087 } //-- void addExtension( Extension ) 088 089 /** 090 * Method clone. 091 * 092 * @return Build 093 */ 094 public Build clone() 095 { 096 try 097 { 098 Build copy = (Build) super.clone(); 099 100 if ( this.extensions != null ) 101 { 102 copy.extensions = new java.util.ArrayList<Extension>(); 103 for ( Extension item : this.extensions ) 104 { 105 copy.extensions.add( ( (Extension) item).clone() ); 106 } 107 } 108 109 return copy; 110 } 111 catch ( java.lang.Exception ex ) 112 { 113 throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName() 114 + " does not support clone()" ).initCause( ex ); 115 } 116 } //-- Build clone() 117 118 /** 119 * Method getExtensions. 120 * 121 * @return List 122 */ 123 public java.util.List<Extension> getExtensions() 124 { 125 if ( this.extensions == null ) 126 { 127 this.extensions = new java.util.ArrayList<Extension>(); 128 } 129 130 return this.extensions; 131 } //-- java.util.List<Extension> getExtensions() 132 133 /** 134 * Get the directory where compiled application classes are 135 * placed. 136 * 137 * @return String 138 */ 139 public String getOutputDirectory() 140 { 141 return this.outputDirectory; 142 } //-- String getOutputDirectory() 143 144 /** 145 * Get this element specifies a directory containing the script 146 * sources of the 147 * project. This directory is meant to be different 148 * from the sourceDirectory, in that its 149 * contents will be copied to the output directory 150 * in most cases (since scripts are 151 * interpreted rather than compiled). 152 * 153 * @return String 154 */ 155 public String getScriptSourceDirectory() 156 { 157 return this.scriptSourceDirectory; 158 } //-- String getScriptSourceDirectory() 159 160 /** 161 * Get this element specifies a directory containing the source 162 * of the project. The 163 * generated build system will compile the source 164 * in this directory when the project is 165 * built. The path given is relative to the project 166 * descriptor. 167 * 168 * @return String 169 */ 170 public String getSourceDirectory() 171 { 172 return this.sourceDirectory; 173 } //-- String getSourceDirectory() 174 175 /** 176 * Get the directory where compiled test classes are placed. 177 * 178 * @return String 179 */ 180 public String getTestOutputDirectory() 181 { 182 return this.testOutputDirectory; 183 } //-- String getTestOutputDirectory() 184 185 /** 186 * Get this element specifies a directory containing the unit 187 * test source of the 188 * project. The generated build system will compile 189 * these directories when the project is 190 * being tested. The path given is relative to the 191 * project descriptor. 192 * 193 * @return String 194 */ 195 public String getTestSourceDirectory() 196 { 197 return this.testSourceDirectory; 198 } //-- String getTestSourceDirectory() 199 200 /** 201 * Method removeExtension. 202 * 203 * @param extension 204 */ 205 public void removeExtension( Extension extension ) 206 { 207 getExtensions().remove( extension ); 208 } //-- void removeExtension( Extension ) 209 210 /** 211 * Set a set of build extensions to use from this project. 212 * 213 * @param extensions 214 */ 215 public void setExtensions( java.util.List<Extension> extensions ) 216 { 217 this.extensions = extensions; 218 } //-- void setExtensions( java.util.List ) 219 220 /** 221 * Set the directory where compiled application classes are 222 * placed. 223 * 224 * @param outputDirectory 225 */ 226 public void setOutputDirectory( String outputDirectory ) 227 { 228 this.outputDirectory = outputDirectory; 229 } //-- void setOutputDirectory( String ) 230 231 /** 232 * Set this element specifies a directory containing the script 233 * sources of the 234 * project. This directory is meant to be different 235 * from the sourceDirectory, in that its 236 * contents will be copied to the output directory 237 * in most cases (since scripts are 238 * interpreted rather than compiled). 239 * 240 * @param scriptSourceDirectory 241 */ 242 public void setScriptSourceDirectory( String scriptSourceDirectory ) 243 { 244 this.scriptSourceDirectory = scriptSourceDirectory; 245 } //-- void setScriptSourceDirectory( String ) 246 247 /** 248 * Set this element specifies a directory containing the source 249 * of the project. The 250 * generated build system will compile the source 251 * in this directory when the project is 252 * built. The path given is relative to the project 253 * descriptor. 254 * 255 * @param sourceDirectory 256 */ 257 public void setSourceDirectory( String sourceDirectory ) 258 { 259 this.sourceDirectory = sourceDirectory; 260 } //-- void setSourceDirectory( String ) 261 262 /** 263 * Set the directory where compiled test classes are placed. 264 * 265 * @param testOutputDirectory 266 */ 267 public void setTestOutputDirectory( String testOutputDirectory ) 268 { 269 this.testOutputDirectory = testOutputDirectory; 270 } //-- void setTestOutputDirectory( String ) 271 272 /** 273 * Set this element specifies a directory containing the unit 274 * test source of the 275 * project. The generated build system will compile 276 * these directories when the project is 277 * being tested. The path given is relative to the 278 * project descriptor. 279 * 280 * @param testSourceDirectory 281 */ 282 public void setTestSourceDirectory( String testSourceDirectory ) 283 { 284 this.testSourceDirectory = testSourceDirectory; 285 } //-- void setTestSourceDirectory( String ) 286 287 }