1 /* 2 =================== DO NOT EDIT THIS FILE ==================== 3 Generated by Modello 1.4.1 on 2011-11-29 12:00:52, 4 any modifications will be overwritten. 5 ============================================================== 6 */ 7 8 package org.apache.maven.plugin.assembly.model; 9 10 /** 11 * 12 * 13 * An assembly defines a collection of files usually 14 * distributed in an 15 * archive format such as zip, tar, or tar.gz that is 16 * generated from a 17 * project. For example, a project could produce a ZIP 18 * assembly which 19 * contains a project's JAR artifact in the root directory, 20 * the 21 * runtime dependencies in a lib/ directory, and a shell 22 * script to launch 23 * a stand-alone application. 24 * 25 * 26 * 27 * @version $Revision$ $Date$ 28 */ 29 @SuppressWarnings( "all" ) 30 public class Assembly 31 implements java.io.Serializable 32 { 33 34 //--------------------------/ 35 //- Class/Member Variables -/ 36 //--------------------------/ 37 38 /** 39 * 40 * Sets the id of this assembly. This is a symbolic 41 * name for a 42 * particular assembly of files from this project. 43 * Also, aside from 44 * being used to distinctly name the assembled 45 * package by attaching 46 * its value to the generated archive, the id is 47 * used as your 48 * artifact's classifier when deploying. 49 * 50 */ 51 private String id; 52 53 /** 54 * Field formats. 55 */ 56 private java.util.List<String> formats; 57 58 /** 59 * 60 * Includes a base directory in the final archive. 61 * For example, 62 * if you are creating an assembly named 63 * "your-app", setting 64 * includeBaseDirectory to true will create an 65 * archive that 66 * includes this base directory. If this option is 67 * set to false 68 * the archive created will unzip its content to 69 * the current 70 * directory. Default value is true. 71 * 72 */ 73 private boolean includeBaseDirectory = true; 74 75 /** 76 * 77 * Sets the base directory of the resulting 78 * assembly archive. If this is not 79 * set and includeBaseDirectory == true, 80 * ${project.build.finalName} will be used instead. 81 * (Since 2.2-beta-1) 82 * . 83 */ 84 private String baseDirectory; 85 86 /** 87 * 88 * Includes a site directory in the final archive. 89 * The site directory 90 * location of a project is determined by the 91 * siteDirectory parameter 92 * of the Assembly Plugin. Default value is false. 93 * 94 */ 95 private boolean includeSiteDirectory = false; 96 97 /** 98 * Field containerDescriptorHandlers. 99 */ 100 private java.util.List<ContainerDescriptorHandlerConfig> containerDescriptorHandlers; 101 102 /** 103 * Field moduleSets. 104 */ 105 private java.util.List<ModuleSet> moduleSets; 106 107 /** 108 * Field fileSets. 109 */ 110 private java.util.List<FileSet> fileSets; 111 112 /** 113 * Field files. 114 */ 115 private java.util.List<FileItem> files; 116 117 /** 118 * Field dependencySets. 119 */ 120 private java.util.List<DependencySet> dependencySets; 121 122 /** 123 * Field repositories. 124 */ 125 private java.util.List<Repository> repositories; 126 127 /** 128 * Field componentDescriptors. 129 */ 130 private java.util.List<String> componentDescriptors; 131 132 /** 133 * Field modelEncoding. 134 */ 135 private String modelEncoding = "UTF-8"; 136 137 138 //-----------/ 139 //- Methods -/ 140 //-----------/ 141 142 /** 143 * Method addComponentDescriptor. 144 * 145 * @param string 146 */ 147 public void addComponentDescriptor( String string ) 148 { 149 getComponentDescriptors().add( string ); 150 } //-- void addComponentDescriptor( String ) 151 152 /** 153 * Method addContainerDescriptorHandler. 154 * 155 * @param containerDescriptorHandlerConfig 156 */ 157 public void addContainerDescriptorHandler( ContainerDescriptorHandlerConfig containerDescriptorHandlerConfig ) 158 { 159 getContainerDescriptorHandlers().add( containerDescriptorHandlerConfig ); 160 } //-- void addContainerDescriptorHandler( ContainerDescriptorHandlerConfig ) 161 162 /** 163 * Method addDependencySet. 164 * 165 * @param dependencySet 166 */ 167 public void addDependencySet( DependencySet dependencySet ) 168 { 169 getDependencySets().add( dependencySet ); 170 } //-- void addDependencySet( DependencySet ) 171 172 /** 173 * Method addFile. 174 * 175 * @param fileItem 176 */ 177 public void addFile( FileItem fileItem ) 178 { 179 getFiles().add( fileItem ); 180 } //-- void addFile( FileItem ) 181 182 /** 183 * Method addFileSet. 184 * 185 * @param fileSet 186 */ 187 public void addFileSet( FileSet fileSet ) 188 { 189 getFileSets().add( fileSet ); 190 } //-- void addFileSet( FileSet ) 191 192 /** 193 * Method addFormat. 194 * 195 * @param string 196 */ 197 public void addFormat( String string ) 198 { 199 getFormats().add( string ); 200 } //-- void addFormat( String ) 201 202 /** 203 * Method addModuleSet. 204 * 205 * @param moduleSet 206 */ 207 public void addModuleSet( ModuleSet moduleSet ) 208 { 209 getModuleSets().add( moduleSet ); 210 } //-- void addModuleSet( ModuleSet ) 211 212 /** 213 * Method addRepository. 214 * 215 * @param repository 216 */ 217 public void addRepository( Repository repository ) 218 { 219 getRepositories().add( repository ); 220 } //-- void addRepository( Repository ) 221 222 /** 223 * Get sets the base directory of the resulting assembly 224 * archive. If this is not 225 * set and includeBaseDirectory == true, 226 * ${project.build.finalName} will be used instead. 227 * (Since 2.2-beta-1). 228 * 229 * @return String 230 */ 231 public String getBaseDirectory() 232 { 233 return this.baseDirectory; 234 } //-- String getBaseDirectory() 235 236 /** 237 * Method getComponentDescriptors. 238 * 239 * @return List 240 */ 241 public java.util.List<String> getComponentDescriptors() 242 { 243 if ( this.componentDescriptors == null ) 244 { 245 this.componentDescriptors = new java.util.ArrayList<String>(); 246 } 247 248 return this.componentDescriptors; 249 } //-- java.util.List<String> getComponentDescriptors() 250 251 /** 252 * Method getContainerDescriptorHandlers. 253 * 254 * @return List 255 */ 256 public java.util.List<ContainerDescriptorHandlerConfig> getContainerDescriptorHandlers() 257 { 258 if ( this.containerDescriptorHandlers == null ) 259 { 260 this.containerDescriptorHandlers = new java.util.ArrayList<ContainerDescriptorHandlerConfig>(); 261 } 262 263 return this.containerDescriptorHandlers; 264 } //-- java.util.List<ContainerDescriptorHandlerConfig> getContainerDescriptorHandlers() 265 266 /** 267 * Method getDependencySets. 268 * 269 * @return List 270 */ 271 public java.util.List<DependencySet> getDependencySets() 272 { 273 if ( this.dependencySets == null ) 274 { 275 this.dependencySets = new java.util.ArrayList<DependencySet>(); 276 } 277 278 return this.dependencySets; 279 } //-- java.util.List<DependencySet> getDependencySets() 280 281 /** 282 * Method getFileSets. 283 * 284 * @return List 285 */ 286 public java.util.List<FileSet> getFileSets() 287 { 288 if ( this.fileSets == null ) 289 { 290 this.fileSets = new java.util.ArrayList<FileSet>(); 291 } 292 293 return this.fileSets; 294 } //-- java.util.List<FileSet> getFileSets() 295 296 /** 297 * Method getFiles. 298 * 299 * @return List 300 */ 301 public java.util.List<FileItem> getFiles() 302 { 303 if ( this.files == null ) 304 { 305 this.files = new java.util.ArrayList<FileItem>(); 306 } 307 308 return this.files; 309 } //-- java.util.List<FileItem> getFiles() 310 311 /** 312 * Method getFormats. 313 * 314 * @return List 315 */ 316 public java.util.List<String> getFormats() 317 { 318 if ( this.formats == null ) 319 { 320 this.formats = new java.util.ArrayList<String>(); 321 } 322 323 return this.formats; 324 } //-- java.util.List<String> getFormats() 325 326 /** 327 * Get sets the id of this assembly. This is a symbolic name 328 * for a 329 * particular assembly of files from this project. 330 * Also, aside from 331 * being used to distinctly name the assembled 332 * package by attaching 333 * its value to the generated archive, the id is 334 * used as your 335 * artifact's classifier when deploying. 336 * 337 * @return String 338 */ 339 public String getId() 340 { 341 return this.id; 342 } //-- String getId() 343 344 /** 345 * Get the modelEncoding field. 346 * 347 * @return String 348 */ 349 public String getModelEncoding() 350 { 351 return this.modelEncoding; 352 } //-- String getModelEncoding() 353 354 /** 355 * Method getModuleSets. 356 * 357 * @return List 358 */ 359 public java.util.List<ModuleSet> getModuleSets() 360 { 361 if ( this.moduleSets == null ) 362 { 363 this.moduleSets = new java.util.ArrayList<ModuleSet>(); 364 } 365 366 return this.moduleSets; 367 } //-- java.util.List<ModuleSet> getModuleSets() 368 369 /** 370 * Method getRepositories. 371 * 372 * @return List 373 */ 374 public java.util.List<Repository> getRepositories() 375 { 376 if ( this.repositories == null ) 377 { 378 this.repositories = new java.util.ArrayList<Repository>(); 379 } 380 381 return this.repositories; 382 } //-- java.util.List<Repository> getRepositories() 383 384 /** 385 * Get includes a base directory in the final archive. For 386 * example, 387 * if you are creating an assembly named 388 * "your-app", setting 389 * includeBaseDirectory to true will create an 390 * archive that 391 * includes this base directory. If this option is 392 * set to false 393 * the archive created will unzip its content to 394 * the current 395 * directory. Default value is true. 396 * 397 * @return boolean 398 */ 399 public boolean isIncludeBaseDirectory() 400 { 401 return this.includeBaseDirectory; 402 } //-- boolean isIncludeBaseDirectory() 403 404 /** 405 * Get includes a site directory in the final archive. The site 406 * directory 407 * location of a project is determined by the 408 * siteDirectory parameter 409 * of the Assembly Plugin. Default value is false. 410 * 411 * @return boolean 412 */ 413 public boolean isIncludeSiteDirectory() 414 { 415 return this.includeSiteDirectory; 416 } //-- boolean isIncludeSiteDirectory() 417 418 /** 419 * Method removeComponentDescriptor. 420 * 421 * @param string 422 */ 423 public void removeComponentDescriptor( String string ) 424 { 425 getComponentDescriptors().remove( string ); 426 } //-- void removeComponentDescriptor( String ) 427 428 /** 429 * Method removeContainerDescriptorHandler. 430 * 431 * @param containerDescriptorHandlerConfig 432 */ 433 public void removeContainerDescriptorHandler( ContainerDescriptorHandlerConfig containerDescriptorHandlerConfig ) 434 { 435 getContainerDescriptorHandlers().remove( containerDescriptorHandlerConfig ); 436 } //-- void removeContainerDescriptorHandler( ContainerDescriptorHandlerConfig ) 437 438 /** 439 * Method removeDependencySet. 440 * 441 * @param dependencySet 442 */ 443 public void removeDependencySet( DependencySet dependencySet ) 444 { 445 getDependencySets().remove( dependencySet ); 446 } //-- void removeDependencySet( DependencySet ) 447 448 /** 449 * Method removeFile. 450 * 451 * @param fileItem 452 */ 453 public void removeFile( FileItem fileItem ) 454 { 455 getFiles().remove( fileItem ); 456 } //-- void removeFile( FileItem ) 457 458 /** 459 * Method removeFileSet. 460 * 461 * @param fileSet 462 */ 463 public void removeFileSet( FileSet fileSet ) 464 { 465 getFileSets().remove( fileSet ); 466 } //-- void removeFileSet( FileSet ) 467 468 /** 469 * Method removeFormat. 470 * 471 * @param string 472 */ 473 public void removeFormat( String string ) 474 { 475 getFormats().remove( string ); 476 } //-- void removeFormat( String ) 477 478 /** 479 * Method removeModuleSet. 480 * 481 * @param moduleSet 482 */ 483 public void removeModuleSet( ModuleSet moduleSet ) 484 { 485 getModuleSets().remove( moduleSet ); 486 } //-- void removeModuleSet( ModuleSet ) 487 488 /** 489 * Method removeRepository. 490 * 491 * @param repository 492 */ 493 public void removeRepository( Repository repository ) 494 { 495 getRepositories().remove( repository ); 496 } //-- void removeRepository( Repository ) 497 498 /** 499 * Set sets the base directory of the resulting assembly 500 * archive. If this is not 501 * set and includeBaseDirectory == true, 502 * ${project.build.finalName} will be used instead. 503 * (Since 2.2-beta-1). 504 * 505 * @param baseDirectory 506 */ 507 public void setBaseDirectory( String baseDirectory ) 508 { 509 this.baseDirectory = baseDirectory; 510 } //-- void setBaseDirectory( String ) 511 512 /** 513 * Set specifies the shared components xml file locations to 514 * include in the 515 * assembly. The locations specified must be 516 * relative to the base location 517 * of the descriptor. If the descriptor was found 518 * via a <descriptorRef/> 519 * element in the 520 * classpath, any components it specifies will also 521 * be found on the classpath. 522 * If it is found by pathname via a 523 * <descriptor/> element 524 * the value here will be interpreted 525 * as a path relative to the project basedir. 526 * When multiple componentDescriptors are found, 527 * their 528 * contents are merged. Check out the <a 529 * href="component.html"> 530 * descriptor components</a> for more information. 531 * A 532 * componentDescriptor is specified by providing 533 * one or more of 534 * <componentDescriptor> subelements. 535 * 536 * @param componentDescriptors 537 */ 538 public void setComponentDescriptors( java.util.List<String> componentDescriptors ) 539 { 540 this.componentDescriptors = componentDescriptors; 541 } //-- void setComponentDescriptors( java.util.List ) 542 543 /** 544 * Set set of components which filter various container 545 * descriptors out of 546 * the normal archive stream, so they can be 547 * aggregated then added. 548 * 549 * @param containerDescriptorHandlers 550 */ 551 public void setContainerDescriptorHandlers( java.util.List<ContainerDescriptorHandlerConfig> containerDescriptorHandlers ) 552 { 553 this.containerDescriptorHandlers = containerDescriptorHandlers; 554 } //-- void setContainerDescriptorHandlers( java.util.List ) 555 556 /** 557 * Set specifies which dependencies to include in the assembly. 558 * A 559 * dependencySet is specified by providing one or 560 * more of 561 * <dependencySet> subelements. 562 * 563 * @param dependencySets 564 */ 565 public void setDependencySets( java.util.List<DependencySet> dependencySets ) 566 { 567 this.dependencySets = dependencySets; 568 } //-- void setDependencySets( java.util.List ) 569 570 /** 571 * Set specifies which groups of files to include in the 572 * assembly. A 573 * fileSet is specified by providing one or more of 574 * <fileSet> 575 * subelements. 576 * 577 * @param fileSets 578 */ 579 public void setFileSets( java.util.List<FileSet> fileSets ) 580 { 581 this.fileSets = fileSets; 582 } //-- void setFileSets( java.util.List ) 583 584 /** 585 * Set specifies which single files to include in the assembly. 586 * A file 587 * is specified by providing one or more of 588 * <file> 589 * subelements. 590 * 591 * @param files 592 */ 593 public void setFiles( java.util.List<FileItem> files ) 594 { 595 this.files = files; 596 } //-- void setFiles( java.util.List ) 597 598 /** 599 * Set specifies the formats of the assembly. 600 * 601 * It is often better to specify the formats via 602 * the goal parameter rather 603 * than here. For example, that allows different 604 * profiles to generate 605 * different types of archives. 606 * 607 * Multiple formats can be 608 * supplied and the Assembly Plugin will generate 609 * an archive for each 610 * desired formats. When deploying your project, 611 * all file formats 612 * specified will also be deployed. A format is 613 * specified by supplying 614 * one of the following values in a <format> 615 * subelement: 616 * <ul> 617 * <li><b>"zip"</b> - Creates a ZIP file 618 * format</li> 619 * <li><b>"tar"</b> - Creates a TAR format</li> 620 * <li><b>"tar.gz"</b> - Creates a gzip'd TAR 621 * format</li> 622 * <li><b>"tar.bz2"</b> - Creates a bzip'd TAR 623 * format</li> 624 * </ul> 625 * 626 * @param formats 627 */ 628 public void setFormats( java.util.List<String> formats ) 629 { 630 this.formats = formats; 631 } //-- void setFormats( java.util.List ) 632 633 /** 634 * Set sets the id of this assembly. This is a symbolic name 635 * for a 636 * particular assembly of files from this project. 637 * Also, aside from 638 * being used to distinctly name the assembled 639 * package by attaching 640 * its value to the generated archive, the id is 641 * used as your 642 * artifact's classifier when deploying. 643 * 644 * @param id 645 */ 646 public void setId( String id ) 647 { 648 this.id = id; 649 } //-- void setId( String ) 650 651 /** 652 * Set includes a base directory in the final archive. For 653 * example, 654 * if you are creating an assembly named 655 * "your-app", setting 656 * includeBaseDirectory to true will create an 657 * archive that 658 * includes this base directory. If this option is 659 * set to false 660 * the archive created will unzip its content to 661 * the current 662 * directory. Default value is true. 663 * 664 * @param includeBaseDirectory 665 */ 666 public void setIncludeBaseDirectory( boolean includeBaseDirectory ) 667 { 668 this.includeBaseDirectory = includeBaseDirectory; 669 } //-- void setIncludeBaseDirectory( boolean ) 670 671 /** 672 * Set includes a site directory in the final archive. The site 673 * directory 674 * location of a project is determined by the 675 * siteDirectory parameter 676 * of the Assembly Plugin. Default value is false. 677 * 678 * @param includeSiteDirectory 679 */ 680 public void setIncludeSiteDirectory( boolean includeSiteDirectory ) 681 { 682 this.includeSiteDirectory = includeSiteDirectory; 683 } //-- void setIncludeSiteDirectory( boolean ) 684 685 /** 686 * Set the modelEncoding field. 687 * 688 * @param modelEncoding 689 */ 690 public void setModelEncoding( String modelEncoding ) 691 { 692 this.modelEncoding = modelEncoding; 693 } //-- void setModelEncoding( String ) 694 695 /** 696 * Set specifies which module files to include in the assembly. 697 * A moduleSet 698 * is specified by providing one or more of 699 * <moduleSet> 700 * subelements. 701 * 702 * @param moduleSets 703 */ 704 public void setModuleSets( java.util.List<ModuleSet> moduleSets ) 705 { 706 this.moduleSets = moduleSets; 707 } //-- void setModuleSets( java.util.List ) 708 709 /** 710 * Set specifies which repository files to include in the 711 * assembly. A 712 * repository is specified by providing one or more 713 * of 714 * <repository> subelements. 715 * 716 * @param repositories 717 */ 718 public void setRepositories( java.util.List<Repository> repositories ) 719 { 720 this.repositories = repositories; 721 } //-- void setRepositories( java.util.List ) 722 723 }