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