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