001 /* 002 =================== DO NOT EDIT THIS FILE ==================== 003 Generated by Modello 1.4.1 on 2012-01-20 18:09:18, 004 any modifications will be overwritten. 005 ============================================================== 006 */ 007 008 package org.apache.maven.model; 009 010 /** 011 * This elements describes all that pertains to distribution for a 012 * project. It is 013 * primarily used for deployment of artifacts and the site 014 * produced by the build. 015 * 016 * @version $Revision$ $Date$ 017 */ 018 @SuppressWarnings( "all" ) 019 public class DistributionManagement 020 implements java.io.Serializable, java.lang.Cloneable, org.apache.maven.model.InputLocationTracker 021 { 022 023 //--------------------------/ 024 //- Class/Member Variables -/ 025 //--------------------------/ 026 027 /** 028 * Information needed to deploy the artifacts generated by the 029 * project to a 030 * remote repository. 031 */ 032 private DeploymentRepository repository; 033 034 /** 035 * 036 * 037 * Where to deploy snapshots of artifacts to. If 038 * not given, it defaults to the 039 * <code>repository</code> element. 040 * 041 * 042 */ 043 private DeploymentRepository snapshotRepository; 044 045 /** 046 * Information needed for deploying the web site of the project. 047 */ 048 private Site site; 049 050 /** 051 * 052 * 053 * The URL of the project's download page. If not 054 * given users will be 055 * referred to the homepage given by 056 * <code>url</code>. 057 * This is given to assist in locating artifacts 058 * that are not in the repository due to 059 * licensing restrictions. 060 * 061 * 062 */ 063 private String downloadUrl; 064 065 /** 066 * Relocation information of the artifact if it has been moved 067 * to a new group ID 068 * and/or artifact ID. 069 */ 070 private Relocation relocation; 071 072 /** 073 * 074 * 075 * Gives the status of this artifact in the remote 076 * repository. 077 * This must not be set in your local project, as 078 * it is updated by 079 * tools placing it in the reposiory. Valid values 080 * are: <code>none</code> (default), 081 * <code>converted</code> (repository manager 082 * converted this from an Maven 1 POM), 083 * <code>partner</code> 084 * (directly synced from a partner Maven 2 085 * repository), <code>deployed</code> (was deployed from a 086 * Maven 2 087 * instance), <code>verified</code> (has been hand 088 * verified as correct and final). 089 * 090 * 091 */ 092 private String status; 093 094 /** 095 * Field locations. 096 */ 097 private java.util.Map<Object, InputLocation> locations; 098 099 100 //-----------/ 101 //- Methods -/ 102 //-----------/ 103 104 /** 105 * Method clone. 106 * 107 * @return DistributionManagement 108 */ 109 public DistributionManagement clone() 110 { 111 try 112 { 113 DistributionManagement copy = (DistributionManagement) super.clone(); 114 115 if ( this.repository != null ) 116 { 117 copy.repository = (DeploymentRepository) this.repository.clone(); 118 } 119 120 if ( this.snapshotRepository != null ) 121 { 122 copy.snapshotRepository = (DeploymentRepository) this.snapshotRepository.clone(); 123 } 124 125 if ( this.site != null ) 126 { 127 copy.site = (Site) this.site.clone(); 128 } 129 130 if ( this.relocation != null ) 131 { 132 copy.relocation = (Relocation) this.relocation.clone(); 133 } 134 135 if ( copy.locations != null ) 136 { 137 copy.locations = new java.util.LinkedHashMap( copy.locations ); 138 } 139 140 return copy; 141 } 142 catch ( java.lang.Exception ex ) 143 { 144 throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName() 145 + " does not support clone()" ).initCause( ex ); 146 } 147 } //-- DistributionManagement clone() 148 149 /** 150 * Get the URL of the project's download page. If not given 151 * users will be 152 * referred to the homepage given by 153 * <code>url</code>. 154 * This is given to assist in locating artifacts 155 * that are not in the repository due to 156 * licensing restrictions. 157 * 158 * @return String 159 */ 160 public String getDownloadUrl() 161 { 162 return this.downloadUrl; 163 } //-- String getDownloadUrl() 164 165 /** 166 * 167 * 168 * @param key 169 * @return InputLocation 170 */ 171 public InputLocation getLocation( Object key ) 172 { 173 return ( locations != null ) ? locations.get( key ) : null; 174 } //-- InputLocation getLocation( Object ) 175 176 /** 177 * Get relocation information of the artifact if it has been 178 * moved to a new group ID 179 * and/or artifact ID. 180 * 181 * @return Relocation 182 */ 183 public Relocation getRelocation() 184 { 185 return this.relocation; 186 } //-- Relocation getRelocation() 187 188 /** 189 * Get information needed to deploy the artifacts generated by 190 * the project to a 191 * remote repository. 192 * 193 * @return DeploymentRepository 194 */ 195 public DeploymentRepository getRepository() 196 { 197 return this.repository; 198 } //-- DeploymentRepository getRepository() 199 200 /** 201 * Get information needed for deploying the web site of the 202 * project. 203 * 204 * @return Site 205 */ 206 public Site getSite() 207 { 208 return this.site; 209 } //-- Site getSite() 210 211 /** 212 * Get where to deploy snapshots of artifacts to. If not given, 213 * it defaults to the 214 * <code>repository</code> element. 215 * 216 * @return DeploymentRepository 217 */ 218 public DeploymentRepository getSnapshotRepository() 219 { 220 return this.snapshotRepository; 221 } //-- DeploymentRepository getSnapshotRepository() 222 223 /** 224 * Get gives the status of this artifact in the remote 225 * repository. 226 * This must not be set in your local project, as 227 * it is updated by 228 * tools placing it in the reposiory. Valid values 229 * are: <code>none</code> (default), 230 * <code>converted</code> (repository manager 231 * converted this from an Maven 1 POM), 232 * <code>partner</code> 233 * (directly synced from a partner Maven 2 234 * repository), <code>deployed</code> (was deployed from a 235 * Maven 2 236 * instance), <code>verified</code> (has been hand 237 * verified as correct and final). 238 * 239 * @return String 240 */ 241 public String getStatus() 242 { 243 return this.status; 244 } //-- String getStatus() 245 246 /** 247 * Set the URL of the project's download page. If not given 248 * users will be 249 * referred to the homepage given by 250 * <code>url</code>. 251 * This is given to assist in locating artifacts 252 * that are not in the repository due to 253 * licensing restrictions. 254 * 255 * @param downloadUrl 256 */ 257 public void setDownloadUrl( String downloadUrl ) 258 { 259 this.downloadUrl = downloadUrl; 260 } //-- void setDownloadUrl( String ) 261 262 /** 263 * 264 * 265 * @param key 266 * @param location 267 */ 268 public void setLocation( Object key, InputLocation location ) 269 { 270 if ( location != null ) 271 { 272 if ( this.locations == null ) 273 { 274 this.locations = new java.util.LinkedHashMap<Object, InputLocation>(); 275 } 276 this.locations.put( key, location ); 277 } 278 } //-- void setLocation( Object, InputLocation ) 279 280 /** 281 * Set relocation information of the artifact if it has been 282 * moved to a new group ID 283 * and/or artifact ID. 284 * 285 * @param relocation 286 */ 287 public void setRelocation( Relocation relocation ) 288 { 289 this.relocation = relocation; 290 } //-- void setRelocation( Relocation ) 291 292 /** 293 * Set information needed to deploy the artifacts generated by 294 * the project to a 295 * remote repository. 296 * 297 * @param repository 298 */ 299 public void setRepository( DeploymentRepository repository ) 300 { 301 this.repository = repository; 302 } //-- void setRepository( DeploymentRepository ) 303 304 /** 305 * Set information needed for deploying the web site of the 306 * project. 307 * 308 * @param site 309 */ 310 public void setSite( Site site ) 311 { 312 this.site = site; 313 } //-- void setSite( Site ) 314 315 /** 316 * Set where to deploy snapshots of artifacts to. If not given, 317 * it defaults to the 318 * <code>repository</code> element. 319 * 320 * @param snapshotRepository 321 */ 322 public void setSnapshotRepository( DeploymentRepository snapshotRepository ) 323 { 324 this.snapshotRepository = snapshotRepository; 325 } //-- void setSnapshotRepository( DeploymentRepository ) 326 327 /** 328 * Set gives the status of this artifact in the remote 329 * repository. 330 * This must not be set in your local project, as 331 * it is updated by 332 * tools placing it in the reposiory. Valid values 333 * are: <code>none</code> (default), 334 * <code>converted</code> (repository manager 335 * converted this from an Maven 1 POM), 336 * <code>partner</code> 337 * (directly synced from a partner Maven 2 338 * repository), <code>deployed</code> (was deployed from a 339 * Maven 2 340 * instance), <code>verified</code> (has been hand 341 * verified as correct and final). 342 * 343 * @param status 344 */ 345 public void setStatus( String status ) 346 { 347 this.status = status; 348 } //-- void setStatus( String ) 349 350 }