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