001// =================== DO NOT EDIT THIS FILE ==================== 002// Generated by Modello 1.8.3, 003// any modifications will be overwritten. 004// ============================================================== 005 006package org.apache.maven.model; 007 008/** 009 * 010 * 011 * The <code><execution></code> element contains 012 * informations required for the 013 * execution of a plugin. 014 * 015 * 016 * 017 * @version $Revision$ $Date$ 018 */ 019@SuppressWarnings( "all" ) 020public class PluginExecution 021 extends ConfigurationContainer 022 implements java.io.Serializable, java.lang.Cloneable 023{ 024 025 //--------------------------/ 026 //- Class/Member Variables -/ 027 //--------------------------/ 028 029 /** 030 * The identifier of this execution for labelling the goals 031 * during the build, 032 * and for matching executions to merge during 033 * inheritance and profile injection. 034 */ 035 private String id = "default"; 036 037 /** 038 * The build lifecycle phase to bind the goals in this 039 * execution to. If omitted, 040 * the goals will be bound to the default phase 041 * specified by the plugin. 042 */ 043 private String phase; 044 045 /** 046 * 047 * 048 * The priority of this execution compared to other 049 * executions which are bound to the same phase. 050 * <strong>Warning:</strong> This is an internal 051 * utility property that is only public for technical reasons, 052 * it is not part of the public API. In particular, 053 * this property can be changed or deleted without prior 054 * notice. 055 * 056 * 057 */ 058 private int priority = 0; 059 060 /** 061 * Field goals. 062 */ 063 private java.util.List<String> goals; 064 065 066 //-----------/ 067 //- Methods -/ 068 //-----------/ 069 070 /** 071 * Method addGoal. 072 * 073 * @param string 074 */ 075 public void addGoal( String string ) 076 { 077 getGoals().add( string ); 078 } //-- void addGoal( String ) 079 080 /** 081 * Method clone. 082 * 083 * @return PluginExecution 084 */ 085 public PluginExecution clone() 086 { 087 try 088 { 089 PluginExecution copy = (PluginExecution) super.clone(); 090 091 if ( this.goals != null ) 092 { 093 copy.goals = new java.util.ArrayList<String>(); 094 copy.goals.addAll( this.goals ); 095 } 096 097 return copy; 098 } 099 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}