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 * A dependencySet allows inclusion and exclusion of 29 * project dependencies 30 * in the assembly. 31 * 32 * 33 * @version $Revision$ $Date$ 34 */ 35 @SuppressWarnings( "all" ) 36 public class DependencySet 37 implements java.io.Serializable 38 { 39 40 //--------------------------/ 41 //- Class/Member Variables -/ 42 //--------------------------/ 43 44 /** 45 * 46 * Sets the output directory relative to the root 47 * of the root directory of the assembly. For 48 * example, 49 * "log" will put the specified files in the log 50 * directory, 51 * directly beneath the root of the archive. 52 * 53 */ 54 private String outputDirectory; 55 56 /** 57 * Field includes. 58 */ 59 private java.util.List<String> includes; 60 61 /** 62 * Field excludes. 63 */ 64 private java.util.List<String> excludes; 65 66 /** 67 * 68 * 69 * Similar to a UNIX permission, sets the file mode 70 * of the files included. 71 * THIS IS AN OCTAL VALUE. 72 * Format: (User)(Group)(Other) where each 73 * component is a sum of Read = 4, 74 * Write = 2, and Execute = 1. For example, the 75 * value 0644 76 * translates to User read-write, Group and Other 77 * read-only. The default value is 0644. 78 * <a 79 * href="http://www.onlamp.com/pub/a/bsd/2000/09/06/FreeBSD_Basics.html">(more 80 * on unix-style permissions)</a> 81 * 82 * 83 */ 84 private String fileMode; 85 86 /** 87 * 88 * 89 * Similar to a UNIX permission, sets the directory 90 * mode of the directories 91 * included. 92 * THIS IS AN OCTAL VALUE. 93 * Format: (User)(Group)(Other) where each 94 * component is a sum of 95 * Read = 4, Write = 2, and Execute = 1. For 96 * example, the value 97 * 0755 translates to User read-write, Group and 98 * Other read-only. The default value is 0755. 99 * <a 100 * href="http://www.onlamp.com/pub/a/bsd/2000/09/06/FreeBSD_Basics.html">(more 101 * on unix-style permissions)</a> 102 * 103 * 104 */ 105 private String directoryMode; 106 107 /** 108 * 109 * When specified as true, any include/exclude 110 * patterns which aren't used to filter an actual 111 * artifact during assembly creation will cause the 112 * build to fail with an error. This is meant 113 * to highlight obsolete inclusions or exclusions, or 114 * else signal that the assembly descriptor 115 * is incorrectly configured. (Since 2.2) 116 * . 117 */ 118 private boolean useStrictFiltering = false; 119 120 /** 121 * 122 * Sets the mapping pattern for all dependencies 123 * included in this 124 * assembly. Default is 125 * ${artifact.artifactId}-${artifact.version}${dashClassifier?}.${artifact.extension}. 126 * (Since 2.2-beta-2; 2.2-beta-1 uses 127 * ${artifactId}-${version}${dashClassifier?}.${extension}). 128 * NOTE: If the dependencySet specifies unpack == 129 * true, outputFileNameMapping WILL NOT BE USED; in these 130 * cases, 131 * use outputDirectory. 132 * See the plugin FAQ for more details about 133 * entries usable in the outputFileNameMapping parameter. 134 * 135 */ 136 private String outputFileNameMapping = "${artifact.artifactId}-${artifact.version}${dashClassifier?}.${artifact.extension}"; 137 138 /** 139 * 140 * If set to true, this property will unpack all 141 * dependencies 142 * into the specified output directory. When set to 143 * false, 144 * dependencies will be included as archives 145 * (jars). Can only unpack 146 * jar, zip, tar.gz, and tar.bz archives. Default 147 * value is false. 148 * 149 */ 150 private boolean unpack = false; 151 152 /** 153 * 154 * Allows the specification of includes and excludes, 155 * along with filtering options, for items 156 * unpacked from a dependency artifact. (Since 2.2) 157 * . 158 */ 159 private UnpackOptions unpackOptions; 160 161 /** 162 * 163 * Sets the dependency scope for this 164 * dependencySet. 165 * Default scope value is "runtime". 166 * 167 */ 168 private String scope = "runtime"; 169 170 /** 171 * 172 * Determines whether the artifact produced during 173 * the current project's 174 * build should be included in this dependency set. 175 * Default value is true, 176 * for backward compatibility. (Since 2.2) 177 * . 178 */ 179 private boolean useProjectArtifact = true; 180 181 /** 182 * 183 * Determines whether the attached artifacts produced 184 * during the current project's 185 * build should be included in this dependency set. 186 * Default value is false. (Since 2.2) 187 * . 188 */ 189 private boolean useProjectAttachments = false; 190 191 /** 192 * 193 * Determines whether transitive dependencies will be 194 * included in the processing of 195 * the current dependency set. If true, 196 * includes/excludes/useTransitiveFiltering 197 * will apply to transitive dependency artifacts in 198 * addition to the main project 199 * dependency artifacts. If false, 200 * useTransitiveFiltering is meaningless, and 201 * includes/excludes only affect the immediate 202 * dependencies of the project. 203 * By default, this value is true. (Since 2.2) 204 * . 205 */ 206 private boolean useTransitiveDependencies = true; 207 208 /** 209 * 210 * Determines whether the include/exclude patterns in 211 * this dependency set will be applied to 212 * the transitive path of a given artifact. If true, 213 * and the current artifact is a transitive 214 * dependency brought in by another artifact which 215 * matches an inclusion or exclusion pattern, 216 * then the current artifact has the same 217 * inclusion/exclusion logic applied to it as well. By 218 * default, this value is false, in order to preserve 219 * backward compatibility with version 2.1. 220 * This means that includes/excludes only apply 221 * directly to the current artifact, and not to 222 * the transitive set of artifacts which brought it 223 * in. (Since 2.2) 224 * . 225 */ 226 private boolean useTransitiveFiltering = false; 227 228 229 //-----------/ 230 //- Methods -/ 231 //-----------/ 232 233 /** 234 * Method addExclude. 235 * 236 * @param string a string object. 237 */ 238 public void addExclude( String string ) 239 { 240 getExcludes().add( string ); 241 } //-- void addExclude( String ) 242 243 /** 244 * Method addInclude. 245 * 246 * @param string a string object. 247 */ 248 public void addInclude( String string ) 249 { 250 getIncludes().add( string ); 251 } //-- void addInclude( String ) 252 253 /** 254 * Get similar to a UNIX permission, sets the directory mode of 255 * the directories 256 * included. 257 * THIS IS AN OCTAL VALUE. 258 * Format: (User)(Group)(Other) where each 259 * component is a sum of 260 * Read = 4, Write = 2, and Execute = 1. For 261 * example, the value 262 * 0755 translates to User read-write, Group and 263 * Other read-only. The default value is 0755. 264 * <a 265 * href="http://www.onlamp.com/pub/a/bsd/2000/09/06/FreeBSD_Basics.html">(more 266 * on unix-style permissions)</a> 267 * 268 * @return String 269 */ 270 public String getDirectoryMode() 271 { 272 return this.directoryMode; 273 } //-- String getDirectoryMode() 274 275 /** 276 * Method getExcludes. 277 * 278 * @return List 279 */ 280 public java.util.List<String> getExcludes() 281 { 282 if ( this.excludes == null ) 283 { 284 this.excludes = new java.util.ArrayList<String>(); 285 } 286 287 return this.excludes; 288 } //-- java.util.List<String> getExcludes() 289 290 /** 291 * Get similar to a UNIX permission, sets the file mode of the 292 * files included. 293 * THIS IS AN OCTAL VALUE. 294 * Format: (User)(Group)(Other) where each 295 * component is a sum of Read = 4, 296 * Write = 2, and Execute = 1. For example, the 297 * value 0644 298 * translates to User read-write, Group and Other 299 * read-only. The default value is 0644. 300 * <a 301 * href="http://www.onlamp.com/pub/a/bsd/2000/09/06/FreeBSD_Basics.html">(more 302 * on unix-style permissions)</a> 303 * 304 * @return String 305 */ 306 public String getFileMode() 307 { 308 return this.fileMode; 309 } //-- String getFileMode() 310 311 /** 312 * Method getIncludes. 313 * 314 * @return List 315 */ 316 public java.util.List<String> getIncludes() 317 { 318 if ( this.includes == null ) 319 { 320 this.includes = new java.util.ArrayList<String>(); 321 } 322 323 return this.includes; 324 } //-- java.util.List<String> getIncludes() 325 326 /** 327 * Get sets the output directory relative to the root 328 * of the root directory of the assembly. For 329 * example, 330 * "log" will put the specified files in the log 331 * directory, 332 * directly beneath the root of the archive. 333 * 334 * @return String 335 */ 336 public String getOutputDirectory() 337 { 338 return this.outputDirectory; 339 } //-- String getOutputDirectory() 340 341 /** 342 * Get sets the mapping pattern for all dependencies included 343 * in this 344 * assembly. Default is 345 * ${artifact.artifactId}-${artifact.version}${dashClassifier?}.${artifact.extension}. 346 * (Since 2.2-beta-2; 2.2-beta-1 uses 347 * ${artifactId}-${version}${dashClassifier?}.${extension}). 348 * NOTE: If the dependencySet specifies unpack == 349 * true, outputFileNameMapping WILL NOT BE USED; in these 350 * cases, 351 * use outputDirectory. 352 * See the plugin FAQ for more details about 353 * entries usable in the outputFileNameMapping parameter. 354 * 355 * @return String 356 */ 357 public String getOutputFileNameMapping() 358 { 359 return this.outputFileNameMapping; 360 } //-- String getOutputFileNameMapping() 361 362 /** 363 * Get sets the dependency scope for this dependencySet. 364 * Default scope value is "runtime". 365 * 366 * @return String 367 */ 368 public String getScope() 369 { 370 return this.scope; 371 } //-- String getScope() 372 373 /** 374 * Get allows the specification of includes and excludes, along 375 * with filtering options, for items 376 * unpacked from a dependency artifact. (Since 2.2). 377 * 378 * @return UnpackOptions 379 */ 380 public UnpackOptions getUnpackOptions() 381 { 382 return this.unpackOptions; 383 } //-- UnpackOptions getUnpackOptions() 384 385 /** 386 * Get if set to true, this property will unpack all 387 * dependencies 388 * into the specified output directory. When set to 389 * false, 390 * dependencies will be included as archives 391 * (jars). Can only unpack 392 * jar, zip, tar.gz, and tar.bz archives. Default 393 * value is false. 394 * 395 * @return boolean 396 */ 397 public boolean isUnpack() 398 { 399 return this.unpack; 400 } //-- boolean isUnpack() 401 402 /** 403 * Get determines whether the artifact produced during the 404 * current project's 405 * build should be included in this dependency set. 406 * Default value is true, 407 * for backward compatibility. (Since 2.2). 408 * 409 * @return boolean 410 */ 411 public boolean isUseProjectArtifact() 412 { 413 return this.useProjectArtifact; 414 } //-- boolean isUseProjectArtifact() 415 416 /** 417 * Get determines whether the attached artifacts produced 418 * during the current project's 419 * build should be included in this dependency set. 420 * Default value is false. (Since 2.2). 421 * 422 * @return boolean 423 */ 424 public boolean isUseProjectAttachments() 425 { 426 return this.useProjectAttachments; 427 } //-- boolean isUseProjectAttachments() 428 429 /** 430 * Get when specified as true, any include/exclude patterns 431 * which aren't used to filter an actual 432 * artifact during assembly creation will cause the 433 * build to fail with an error. This is meant 434 * to highlight obsolete inclusions or exclusions, or 435 * else signal that the assembly descriptor 436 * is incorrectly configured. (Since 2.2). 437 * 438 * @return boolean 439 */ 440 public boolean isUseStrictFiltering() 441 { 442 return this.useStrictFiltering; 443 } //-- boolean isUseStrictFiltering() 444 445 /** 446 * Get determines whether transitive dependencies will be 447 * included in the processing of 448 * the current dependency set. If true, 449 * includes/excludes/useTransitiveFiltering 450 * will apply to transitive dependency artifacts in 451 * addition to the main project 452 * dependency artifacts. If false, 453 * useTransitiveFiltering is meaningless, and 454 * includes/excludes only affect the immediate 455 * dependencies of the project. 456 * By default, this value is true. (Since 2.2). 457 * 458 * @return boolean 459 */ 460 public boolean isUseTransitiveDependencies() 461 { 462 return this.useTransitiveDependencies; 463 } //-- boolean isUseTransitiveDependencies() 464 465 /** 466 * Get determines whether the include/exclude patterns in this 467 * dependency set will be applied to 468 * the transitive path of a given artifact. If true, 469 * and the current artifact is a transitive 470 * dependency brought in by another artifact which 471 * matches an inclusion or exclusion pattern, 472 * then the current artifact has the same 473 * inclusion/exclusion logic applied to it as well. By 474 * default, this value is false, in order to preserve 475 * backward compatibility with version 2.1. 476 * This means that includes/excludes only apply 477 * directly to the current artifact, and not to 478 * the transitive set of artifacts which brought it 479 * in. (Since 2.2). 480 * 481 * @return boolean 482 */ 483 public boolean isUseTransitiveFiltering() 484 { 485 return this.useTransitiveFiltering; 486 } //-- boolean isUseTransitiveFiltering() 487 488 /** 489 * Method removeExclude. 490 * 491 * @param string a string object. 492 */ 493 public void removeExclude( String string ) 494 { 495 getExcludes().remove( string ); 496 } //-- void removeExclude( String ) 497 498 /** 499 * Method removeInclude. 500 * 501 * @param string a string object. 502 */ 503 public void removeInclude( String string ) 504 { 505 getIncludes().remove( string ); 506 } //-- void removeInclude( String ) 507 508 /** 509 * Set similar to a UNIX permission, sets the directory mode of 510 * the directories 511 * included. 512 * THIS IS AN OCTAL VALUE. 513 * Format: (User)(Group)(Other) where each 514 * component is a sum of 515 * Read = 4, Write = 2, and Execute = 1. For 516 * example, the value 517 * 0755 translates to User read-write, Group and 518 * Other read-only. The default value is 0755. 519 * <a 520 * href="http://www.onlamp.com/pub/a/bsd/2000/09/06/FreeBSD_Basics.html">(more 521 * on unix-style permissions)</a> 522 * 523 * @param directoryMode a directoryMode object. 524 */ 525 public void setDirectoryMode( String directoryMode ) 526 { 527 this.directoryMode = directoryMode; 528 } //-- void setDirectoryMode( String ) 529 530 /** 531 * Set when <exclude> subelements are present, they 532 * define a set of 533 * dependency artifact coordinates to exclude. If 534 * none is present, then 535 * <excludes> represents no exclusions. 536 * 537 * Artifact coordinates may be given in simple 538 * groupId:artifactId form, 539 * or they may be fully qualified in the form 540 * groupId:artifactId:type[:classifier]:version. 541 * Additionally, wildcards can be used, as in 542 * *:maven-*. 543 * 544 * @param excludes a excludes object. 545 */ 546 public void setExcludes( java.util.List<String> excludes ) 547 { 548 this.excludes = excludes; 549 } //-- void setExcludes( java.util.List ) 550 551 /** 552 * Set similar to a UNIX permission, sets the file mode of the 553 * files included. 554 * THIS IS AN OCTAL VALUE. 555 * Format: (User)(Group)(Other) where each 556 * component is a sum of Read = 4, 557 * Write = 2, and Execute = 1. For example, the 558 * value 0644 559 * translates to User read-write, Group and Other 560 * read-only. The default value is 0644. 561 * <a 562 * href="http://www.onlamp.com/pub/a/bsd/2000/09/06/FreeBSD_Basics.html">(more 563 * on unix-style permissions)</a> 564 * 565 * @param fileMode a fileMode object. 566 */ 567 public void setFileMode( String fileMode ) 568 { 569 this.fileMode = fileMode; 570 } //-- void setFileMode( String ) 571 572 /** 573 * Set when <include> subelements are present, they 574 * define a set of 575 * artifact coordinates to include. If none is 576 * present, then 577 * <includes> represents all valid values. 578 * 579 * Artifact coordinates may be given in simple 580 * groupId:artifactId form, 581 * or they may be fully qualified in the form 582 * groupId:artifactId:type[:classifier]:version. 583 * Additionally, wildcards can be used, as in 584 * *:maven-*. 585 * 586 * @param includes a includes object. 587 */ 588 public void setIncludes( java.util.List<String> includes ) 589 { 590 this.includes = includes; 591 } //-- void setIncludes( java.util.List ) 592 593 /** 594 * Set sets the output directory relative to the root 595 * of the root directory of the assembly. For 596 * example, 597 * "log" will put the specified files in the log 598 * directory, 599 * directly beneath the root of the archive. 600 * 601 * @param outputDirectory a outputDirectory object. 602 */ 603 public void setOutputDirectory( String outputDirectory ) 604 { 605 this.outputDirectory = outputDirectory; 606 } //-- void setOutputDirectory( String ) 607 608 /** 609 * Set sets the mapping pattern for all dependencies included 610 * in this 611 * assembly. Default is 612 * ${artifact.artifactId}-${artifact.version}${dashClassifier?}.${artifact.extension}. 613 * (Since 2.2-beta-2; 2.2-beta-1 uses 614 * ${artifactId}-${version}${dashClassifier?}.${extension}). 615 * NOTE: If the dependencySet specifies unpack == 616 * true, outputFileNameMapping WILL NOT BE USED; in these 617 * cases, 618 * use outputDirectory. 619 * See the plugin FAQ for more details about 620 * entries usable in the outputFileNameMapping parameter. 621 * 622 * @param outputFileNameMapping a outputFileNameMapping object. 623 */ 624 public void setOutputFileNameMapping( String outputFileNameMapping ) 625 { 626 this.outputFileNameMapping = outputFileNameMapping; 627 } //-- void setOutputFileNameMapping( String ) 628 629 /** 630 * Set sets the dependency scope for this dependencySet. 631 * Default scope value is "runtime". 632 * 633 * @param scope a scope object. 634 */ 635 public void setScope( String scope ) 636 { 637 this.scope = scope; 638 } //-- void setScope( String ) 639 640 /** 641 * Set if set to true, this property will unpack all 642 * dependencies 643 * into the specified output directory. When set to 644 * false, 645 * dependencies will be included as archives 646 * (jars). Can only unpack 647 * jar, zip, tar.gz, and tar.bz archives. Default 648 * value is false. 649 * 650 * @param unpack a unpack object. 651 */ 652 public void setUnpack( boolean unpack ) 653 { 654 this.unpack = unpack; 655 } //-- void setUnpack( boolean ) 656 657 /** 658 * Set allows the specification of includes and excludes, along 659 * with filtering options, for items 660 * unpacked from a dependency artifact. (Since 2.2). 661 * 662 * @param unpackOptions a unpackOptions object. 663 */ 664 public void setUnpackOptions( UnpackOptions unpackOptions ) 665 { 666 this.unpackOptions = unpackOptions; 667 } //-- void setUnpackOptions( UnpackOptions ) 668 669 /** 670 * Set determines whether the artifact produced during the 671 * current project's 672 * build should be included in this dependency set. 673 * Default value is true, 674 * for backward compatibility. (Since 2.2). 675 * 676 * @param useProjectArtifact a useProjectArtifact object. 677 */ 678 public void setUseProjectArtifact( boolean useProjectArtifact ) 679 { 680 this.useProjectArtifact = useProjectArtifact; 681 } //-- void setUseProjectArtifact( boolean ) 682 683 /** 684 * Set determines whether the attached artifacts produced 685 * during the current project's 686 * build should be included in this dependency set. 687 * Default value is false. (Since 2.2). 688 * 689 * @param useProjectAttachments a useProjectAttachments object. 690 */ 691 public void setUseProjectAttachments( boolean useProjectAttachments ) 692 { 693 this.useProjectAttachments = useProjectAttachments; 694 } //-- void setUseProjectAttachments( boolean ) 695 696 /** 697 * Set when specified as true, any include/exclude patterns 698 * which aren't used to filter an actual 699 * artifact during assembly creation will cause the 700 * build to fail with an error. This is meant 701 * to highlight obsolete inclusions or exclusions, or 702 * else signal that the assembly descriptor 703 * is incorrectly configured. (Since 2.2). 704 * 705 * @param useStrictFiltering a useStrictFiltering object. 706 */ 707 public void setUseStrictFiltering( boolean useStrictFiltering ) 708 { 709 this.useStrictFiltering = useStrictFiltering; 710 } //-- void setUseStrictFiltering( boolean ) 711 712 /** 713 * Set determines whether transitive dependencies will be 714 * included in the processing of 715 * the current dependency set. If true, 716 * includes/excludes/useTransitiveFiltering 717 * will apply to transitive dependency artifacts in 718 * addition to the main project 719 * dependency artifacts. If false, 720 * useTransitiveFiltering is meaningless, and 721 * includes/excludes only affect the immediate 722 * dependencies of the project. 723 * By default, this value is true. (Since 2.2). 724 * 725 * @param useTransitiveDependencies a useTransitiveDependencies 726 * object. 727 */ 728 public void setUseTransitiveDependencies( boolean useTransitiveDependencies ) 729 { 730 this.useTransitiveDependencies = useTransitiveDependencies; 731 } //-- void setUseTransitiveDependencies( boolean ) 732 733 /** 734 * Set determines whether the include/exclude patterns in this 735 * dependency set will be applied to 736 * the transitive path of a given artifact. If true, 737 * and the current artifact is a transitive 738 * dependency brought in by another artifact which 739 * matches an inclusion or exclusion pattern, 740 * then the current artifact has the same 741 * inclusion/exclusion logic applied to it as well. By 742 * default, this value is false, in order to preserve 743 * backward compatibility with version 2.1. 744 * This means that includes/excludes only apply 745 * directly to the current artifact, and not to 746 * the transitive set of artifacts which brought it 747 * in. (Since 2.2). 748 * 749 * @param useTransitiveFiltering a useTransitiveFiltering object 750 */ 751 public void setUseTransitiveFiltering( boolean useTransitiveFiltering ) 752 { 753 this.useTransitiveFiltering = useTransitiveFiltering; 754 } //-- void setUseTransitiveFiltering( boolean ) 755 756 }