1 // =================== DO NOT EDIT THIS FILE ==================== 2 // Generated by Modello 1.8.1, 3 // any modifications will be overwritten. 4 // ============================================================== 5 6 package org.apache.maven.plugin.invoker.model; 7 8 /** 9 * 10 * Describes a build job processed by the Maven Invoker 11 * Plugin. A build job can consist of a pre-build hook script, 12 * one ore more invocations of Maven and a post-build hook 13 * script. 14 * 15 * 16 * @version $Revision$ $Date$ 17 */ 18 @SuppressWarnings( "all" ) 19 public class BuildJob 20 implements java.io.Serializable 21 { 22 23 //--------------------------/ 24 //- Class/Member Variables -/ 25 //--------------------------/ 26 27 /** 28 * The path to the project to build. This path is usually 29 * relative and can denote both a POM file or a project 30 * directory. 31 */ 32 private String project; 33 34 /** 35 * The name of this build job. 36 */ 37 private String name; 38 39 /** 40 * The description of this build job. 41 */ 42 private String description; 43 44 /** 45 * The result of this build job. 46 */ 47 private String result; 48 49 /** 50 * Any failure message(s) in case this build job failed. 51 */ 52 private String failureMessage; 53 54 /** 55 * The number of seconds that this build job took to complete. 56 */ 57 private double time = 0.0; 58 59 /** 60 * The type of the build job. 61 */ 62 private String type; 63 64 /** 65 * Field modelEncoding. 66 */ 67 private String modelEncoding = "UTF-8"; 68 69 70 //-----------/ 71 //- Methods -/ 72 //-----------/ 73 74 /** 75 * Get the description of this build job. 76 * 77 * @return String 78 */ 79 public String getDescription() 80 { 81 return this.description; 82 } //-- String getDescription() 83 84 /** 85 * Get any failure message(s) in case this build job failed. 86 * 87 * @return String 88 */ 89 public String getFailureMessage() 90 { 91 return this.failureMessage; 92 } //-- String getFailureMessage() 93 94 /** 95 * Get the modelEncoding field. 96 * 97 * @return String 98 */ 99 public String getModelEncoding() 100 { 101 return this.modelEncoding; 102 } //-- String getModelEncoding() 103 104 /** 105 * Get the name of this build job. 106 * 107 * @return String 108 */ 109 public String getName() 110 { 111 return this.name; 112 } //-- String getName() 113 114 /** 115 * Get the path to the project to build. This path is usually 116 * relative and can denote both a POM file or a project 117 * directory. 118 * 119 * @return String 120 */ 121 public String getProject() 122 { 123 return this.project; 124 } //-- String getProject() 125 126 /** 127 * Get the result of this build job. 128 * 129 * @return String 130 */ 131 public String getResult() 132 { 133 return this.result; 134 } //-- String getResult() 135 136 /** 137 * Get the number of seconds that this build job took to 138 * complete. 139 * 140 * @return double 141 */ 142 public double getTime() 143 { 144 return this.time; 145 } //-- double getTime() 146 147 /** 148 * Get the type of the build job. 149 * 150 * @return String 151 */ 152 public String getType() 153 { 154 return this.type; 155 } //-- String getType() 156 157 /** 158 * Set the description of this build job. 159 * 160 * @param description 161 */ 162 public void setDescription( String description ) 163 { 164 this.description = description; 165 } //-- void setDescription( String ) 166 167 /** 168 * Set any failure message(s) in case this build job failed. 169 * 170 * @param failureMessage 171 */ 172 public void setFailureMessage( String failureMessage ) 173 { 174 this.failureMessage = failureMessage; 175 } //-- void setFailureMessage( String ) 176 177 /** 178 * Set the modelEncoding field. 179 * 180 * @param modelEncoding 181 */ 182 public void setModelEncoding( String modelEncoding ) 183 { 184 this.modelEncoding = modelEncoding; 185 } //-- void setModelEncoding( String ) 186 187 /** 188 * Set the name of this build job. 189 * 190 * @param name 191 */ 192 public void setName( String name ) 193 { 194 this.name = name; 195 } //-- void setName( String ) 196 197 /** 198 * Set the path to the project to build. This path is usually 199 * relative and can denote both a POM file or a project 200 * directory. 201 * 202 * @param project 203 */ 204 public void setProject( String project ) 205 { 206 this.project = project; 207 } //-- void setProject( String ) 208 209 /** 210 * Set the result of this build job. 211 * 212 * @param result 213 */ 214 public void setResult( String result ) 215 { 216 this.result = result; 217 } //-- void setResult( String ) 218 219 /** 220 * Set the number of seconds that this build job took to 221 * complete. 222 * 223 * @param time 224 */ 225 public void setTime( double time ) 226 { 227 this.time = time; 228 } //-- void setTime( double ) 229 230 /** 231 * Set the type of the build job. 232 * 233 * @param type 234 */ 235 public void setType( String type ) 236 { 237 this.type = type; 238 } //-- void setType( String ) 239 240 241 /** 242 * Creates a new empty build job. 243 */ 244 public BuildJob() 245 { 246 // enables no-arg construction 247 } 248 249 /** 250 * Creates a new build job with the specified project path and type. 251 * 252 * @param project The path to the project. 253 * @param type The type of the build job. 254 */ 255 public BuildJob( String project, String type ) 256 { 257 this.project = project; 258 this.type = type; 259 } 260 261 262 /** 263 * The various results with which a build job can complete. 264 */ 265 public static class Result 266 { 267 268 /** 269 * The result value corresponding with a successful invocation of Maven and completion of all post-hook scripts. 270 */ 271 public static final String SUCCESS = "success"; 272 273 /** 274 * The result value corresponding with an invocation that failed before Maven was be invoked. 275 */ 276 public static final String FAILURE_PRE_HOOK = "failure-pre-hook"; 277 278 /** 279 * The result value corresponding with an invocation that failed while invoking of Maven. 280 */ 281 public static final String FAILURE_BUILD = "failure-build"; 282 283 /** 284 * The result value corresponding with an invocation that failed after the invocation of Maven. 285 */ 286 public static final String FAILURE_POST_HOOK = "failure-post-hook"; 287 288 /** 289 * The result value corresponding with an invocation that was skipped. 290 */ 291 public static final String SKIPPED = "skipped"; 292 293 /** 294 * The result value corresponding with an unexpected error trying to invoke Maven. 295 */ 296 public static final String ERROR = "error"; 297 298 } 299 300 301 /** 302 * The various types of a build job. 303 */ 304 public static class Type 305 { 306 307 /** 308 * A build job that should be invoked before any non-setup build jobs. 309 */ 310 public static final String SETUP = "setup"; 311 312 /** 313 * A normal build job. 314 */ 315 public static final String NORMAL = "normal"; 316 317 /** 318 * A build job that was directly selected via the <code>-Dinvoker.test=xxx,yyy</code> parameter. 319 */ 320 public static final String DIRECT = "direct"; 321 322 } 323 324 325 public String toString() 326 { 327 StringBuffer buf = new StringBuffer( 128 ); 328 buf.append( "BuildJob[project = \"" ); 329 buf.append( project ); 330 buf.append( "\", type = " ); 331 buf.append( type ); 332 buf.append( ']' ); 333 return buf.toString(); 334 } 335 336 }