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