1 /* 2 =================== DO NOT EDIT THIS FILE ==================== 3 Generated by Modello 1.4.1 on 2012-01-20 18:05:12, 4 any modifications will be overwritten. 5 ============================================================== 6 */ 7 8 package org.apache.maven.model; 9 10 /** 11 * 12 * 13 * The <code><execution></code> element contains 14 * informations required for the 15 * execution of a plugin. 16 * 17 * 18 * 19 * @version $Revision$ $Date$ 20 */ 21 @SuppressWarnings( "all" ) 22 public class PluginExecution 23 extends ConfigurationContainer 24 implements java.io.Serializable, java.lang.Cloneable 25 { 26 27 //--------------------------/ 28 //- Class/Member Variables -/ 29 //--------------------------/ 30 31 /** 32 * The identifier of this execution for labelling the goals 33 * during the build, 34 * and for matching executions to merge during 35 * inheritance and profile injection. 36 */ 37 private String id = "default"; 38 39 /** 40 * The build lifecycle phase to bind the goals in this 41 * execution to. If omitted, 42 * the goals will be bound to the default phase 43 * specified in their metadata. 44 */ 45 private String phase; 46 47 /** 48 * 49 * 50 * The priority of this execution compared to other 51 * executions which are bound to the same phase. 52 * <strong>Warning:</strong> This is an internal 53 * utility property that is only public for technical reasons, 54 * it is not part of the public API. In particular, 55 * this property can be changed or deleted without prior 56 * notice. 57 * 58 * 59 */ 60 private int priority = 0; 61 62 /** 63 * Field goals. 64 */ 65 private java.util.List<String> goals; 66 67 68 //-----------/ 69 //- Methods -/ 70 //-----------/ 71 72 /** 73 * Method addGoal. 74 * 75 * @param string 76 */ 77 public void addGoal( String string ) 78 { 79 getGoals().add( string ); 80 } //-- void addGoal( String ) 81 82 /** 83 * Method clone. 84 * 85 * @return PluginExecution 86 */ 87 public PluginExecution clone() 88 { 89 try 90 { 91 PluginExecution copy = (PluginExecution) super.clone(); 92 93 if ( this.goals != null ) 94 { 95 copy.goals = new java.util.ArrayList<String>(); 96 copy.goals.addAll( this.goals ); 97 } 98 99 return copy; 100 } 101 catch ( java.lang.Exception ex ) 102 { 103 throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName() 104 + " does not support clone()" ).initCause( ex ); 105 } 106 } //-- PluginExecution clone() 107 108 /** 109 * Method getGoals. 110 * 111 * @return List 112 */ 113 public java.util.List<String> getGoals() 114 { 115 if ( this.goals == null ) 116 { 117 this.goals = new java.util.ArrayList<String>(); 118 } 119 120 return this.goals; 121 } //-- java.util.List<String> getGoals() 122 123 /** 124 * Get the identifier of this execution for labelling the goals 125 * during the build, 126 * and for matching executions to merge during 127 * inheritance and profile injection. 128 * 129 * @return String 130 */ 131 public String getId() 132 { 133 return this.id; 134 } //-- String getId() 135 136 /** 137 * Get the build lifecycle phase to bind the goals in this 138 * execution to. If omitted, 139 * the goals will be bound to the default phase 140 * specified in their metadata. 141 * 142 * @return String 143 */ 144 public String getPhase() 145 { 146 return this.phase; 147 } //-- String getPhase() 148 149 /** 150 * Get the priority of this execution compared to other 151 * executions which are bound to the same phase. 152 * <strong>Warning:</strong> This is an internal 153 * utility property that is only public for technical reasons, 154 * it is not part of the public API. In particular, 155 * this property can be changed or deleted without prior 156 * notice. 157 * 158 * @return int 159 */ 160 public int getPriority() 161 { 162 return this.priority; 163 } //-- int getPriority() 164 165 /** 166 * Method removeGoal. 167 * 168 * @param string 169 */ 170 public void removeGoal( String string ) 171 { 172 getGoals().remove( string ); 173 } //-- void removeGoal( String ) 174 175 /** 176 * Set the goals to execute with the given configuration. 177 * 178 * @param goals 179 */ 180 public void setGoals( java.util.List<String> goals ) 181 { 182 this.goals = goals; 183 } //-- void setGoals( java.util.List ) 184 185 /** 186 * Set the identifier of this execution for labelling the goals 187 * during the build, 188 * and for matching executions to merge during 189 * inheritance and profile injection. 190 * 191 * @param id 192 */ 193 public void setId( String id ) 194 { 195 this.id = id; 196 } //-- void setId( String ) 197 198 /** 199 * Set the build lifecycle phase to bind the goals in this 200 * execution to. If omitted, 201 * the goals will be bound to the default phase 202 * specified in their metadata. 203 * 204 * @param phase 205 */ 206 public void setPhase( String phase ) 207 { 208 this.phase = phase; 209 } //-- void setPhase( String ) 210 211 /** 212 * Set the priority of this execution compared to other 213 * executions which are bound to the same phase. 214 * <strong>Warning:</strong> This is an internal 215 * utility property that is only public for technical reasons, 216 * it is not part of the public API. In particular, 217 * this property can be changed or deleted without prior 218 * notice. 219 * 220 * @param priority 221 */ 222 public void setPriority( int priority ) 223 { 224 this.priority = priority; 225 } //-- void setPriority( int ) 226 227 228 229 public static final String DEFAULT_EXECUTION_ID = "default"; 230 231 @Override 232 public String toString() 233 { 234 return getId(); 235 } 236 237 238 }