1 // =================== DO NOT EDIT THIS FILE ==================== 2 // Generated by Modello 2.1.2, 3 // any modifications will be overwritten. 4 // ============================================================== 5 6 package org.apache.maven.model; 7 8 /** 9 * 10 * 11 * The <code><project></code> element is the root of 12 * the descriptor. 13 * The following table lists all of the possible child 14 * elements. 15 * 16 * 17 * 18 * @version $Revision$ $Date$ 19 */ 20 @SuppressWarnings( "all" ) 21 public class Model 22 extends ModelBase 23 implements java.io.Serializable, java.lang.Cloneable 24 { 25 26 //--------------------------/ 27 //- Class/Member Variables -/ 28 //--------------------------/ 29 30 /** 31 * Declares to which version of project descriptor this POM 32 * conforms. 33 */ 34 private String modelVersion; 35 36 /** 37 * The location of the parent project, if one exists. Values 38 * from the parent 39 * project will be the default for this project if 40 * they are left unspecified. The location 41 * is given as a group ID, artifact ID and version. 42 */ 43 private Parent parent; 44 45 /** 46 * 47 * 48 * A universally unique identifier for a project. 49 * It is normal to 50 * use a fully-qualified package name to 51 * distinguish it from other 52 * projects with a similar name (eg. 53 * <code>org.apache.maven</code>). 54 * 55 * 56 */ 57 private String groupId; 58 59 /** 60 * The identifier for this artifact that is unique within the 61 * group given by the 62 * group ID. An artifact is something that is 63 * either produced or used by a project. 64 * Examples of artifacts produced by Maven for a 65 * project include: JARs, source and binary 66 * distributions, and WARs. 67 */ 68 private String artifactId; 69 70 /** 71 * The current version of the artifact produced by this project. 72 */ 73 private String version; 74 75 /** 76 * 77 * 78 * The type of artifact this project produces, for 79 * example <code>jar</code> 80 * <code>war</code> 81 * <code>ear</code> 82 * <code>pom</code>. 83 * Plugins can create their own packaging, and 84 * therefore their own packaging types, 85 * so this list does not contain all possible 86 * types. 87 * 88 * 89 */ 90 private String packaging = "jar"; 91 92 /** 93 * The full name of the project. 94 */ 95 private String name; 96 97 /** 98 * A detailed description of the project, used by Maven 99 * whenever it needs to 100 * describe the project, such as on the web site. 101 * While this element can be specified as 102 * CDATA to enable the use of HTML tags within the 103 * description, it is discouraged to allow 104 * plain text representation. If you need to modify 105 * the index page of the generated web 106 * site, you are able to specify your own instead 107 * of adjusting this text. 108 */ 109 private String description; 110 111 /** 112 * 113 * 114 * The URL to the project's homepage. 115 * <br><b>Default value is</b>: parent value [+ 116 * path adjustment] + (artifactId or project.directory 117 * property), or just parent value if 118 * project's 119 * <code>child.project.url.inherit.append.path="false"</code> 120 * 121 * 122 */ 123 private String url; 124 125 /** 126 * 127 * 128 * When children inherit from project's url, append 129 * path or not? Note: While the type 130 * of this field is <code>String</code> for 131 * technical reasons, the semantic type is actually 132 * <code>Boolean</code> 133 * <br><b>Default value is</b>: <code>true</code> 134 * <br><b>Since</b>: Maven 3.6.1 135 * 136 * . 137 */ 138 private String childProjectUrlInheritAppendPath; 139 140 /** 141 * The year of the project's inception, specified with 4 142 * digits. This value is 143 * used when generating copyright notices as well 144 * as being informational. 145 */ 146 private String inceptionYear; 147 148 /** 149 * This element describes various attributes of the 150 * organization to which the 151 * project belongs. These attributes are utilized 152 * when documentation is created (for 153 * copyright notices and links). 154 */ 155 private Organization organization; 156 157 /** 158 * Field licenses. 159 */ 160 private java.util.List<License> licenses; 161 162 /** 163 * Field developers. 164 */ 165 private java.util.List<Developer> developers; 166 167 /** 168 * Field contributors. 169 */ 170 private java.util.List<Contributor> contributors; 171 172 /** 173 * Field mailingLists. 174 */ 175 private java.util.List<MailingList> mailingLists; 176 177 /** 178 * Describes the prerequisites in the build environment for 179 * this project. 180 */ 181 private Prerequisites prerequisites; 182 183 /** 184 * Specification for the SCM used by the project, such as CVS, 185 * Subversion, etc. 186 */ 187 private Scm scm; 188 189 /** 190 * The project's issue management system information. 191 */ 192 private IssueManagement issueManagement; 193 194 /** 195 * The project's continuous integration information. 196 */ 197 private CiManagement ciManagement; 198 199 /** 200 * Information required to build the project. 201 */ 202 private Build build; 203 204 /** 205 * Field profiles. 206 */ 207 private java.util.List<Profile> profiles; 208 209 /** 210 * Field modelEncoding. 211 */ 212 private String modelEncoding = "UTF-8"; 213 214 215 //-----------/ 216 //- Methods -/ 217 //-----------/ 218 219 /** 220 * Method addContributor. 221 * 222 * @param contributor a contributor object. 223 */ 224 public void addContributor( Contributor contributor ) 225 { 226 getContributors().add( contributor ); 227 } //-- void addContributor( Contributor ) 228 229 /** 230 * Method addDeveloper. 231 * 232 * @param developer a developer object. 233 */ 234 public void addDeveloper( Developer developer ) 235 { 236 getDevelopers().add( developer ); 237 } //-- void addDeveloper( Developer ) 238 239 /** 240 * Method addLicense. 241 * 242 * @param license a license object. 243 */ 244 public void addLicense( License license ) 245 { 246 getLicenses().add( license ); 247 } //-- void addLicense( License ) 248 249 /** 250 * Method addMailingList. 251 * 252 * @param mailingList a mailingList object. 253 */ 254 public void addMailingList( MailingList mailingList ) 255 { 256 getMailingLists().add( mailingList ); 257 } //-- void addMailingList( MailingList ) 258 259 /** 260 * Method addProfile. 261 * 262 * @param profile a profile object. 263 */ 264 public void addProfile( Profile profile ) 265 { 266 getProfiles().add( profile ); 267 } //-- void addProfile( Profile ) 268 269 /** 270 * Method clone. 271 * 272 * @return Model 273 */ 274 public Model clone() 275 { 276 try 277 { 278 Model copy = (Model) super.clone(); 279 280 if ( this.parent != null ) 281 { 282 copy.parent = (Parent) this.parent.clone(); 283 } 284 285 if ( this.organization != null ) 286 { 287 copy.organization = (Organization) this.organization.clone(); 288 } 289 290 if ( this.licenses != null ) 291 { 292 copy.licenses = new java.util.ArrayList<License>(); 293 for ( License item : this.licenses ) 294 { 295 copy.licenses.add( ( (License) item).clone() ); 296 } 297 } 298 299 if ( this.developers != null ) 300 { 301 copy.developers = new java.util.ArrayList<Developer>(); 302 for ( Developer item : this.developers ) 303 { 304 copy.developers.add( ( (Developer) item).clone() ); 305 } 306 } 307 308 if ( this.contributors != null ) 309 { 310 copy.contributors = new java.util.ArrayList<Contributor>(); 311 for ( Contributor item : this.contributors ) 312 { 313 copy.contributors.add( ( (Contributor) item).clone() ); 314 } 315 } 316 317 if ( this.mailingLists != null ) 318 { 319 copy.mailingLists = new java.util.ArrayList<MailingList>(); 320 for ( MailingList item : this.mailingLists ) 321 { 322 copy.mailingLists.add( ( (MailingList) item).clone() ); 323 } 324 } 325 326 if ( this.prerequisites != null ) 327 { 328 copy.prerequisites = (Prerequisites) this.prerequisites.clone(); 329 } 330 331 if ( this.scm != null ) 332 { 333 copy.scm = (Scm) this.scm.clone(); 334 } 335 336 if ( this.issueManagement != null ) 337 { 338 copy.issueManagement = (IssueManagement) this.issueManagement.clone(); 339 } 340 341 if ( this.ciManagement != null ) 342 { 343 copy.ciManagement = (CiManagement) this.ciManagement.clone(); 344 } 345 346 if ( this.build != null ) 347 { 348 copy.build = (Build) this.build.clone(); 349 } 350 351 if ( this.profiles != null ) 352 { 353 copy.profiles = new java.util.ArrayList<Profile>(); 354 for ( Profile item : this.profiles ) 355 { 356 copy.profiles.add( ( (Profile) item).clone() ); 357 } 358 } 359 360 cloneHook( copy ); 361 362 return copy; 363 } 364 catch ( java.lang.Exception ex ) 365 { 366 throw (java.lang.RuntimeException) new java.lang.UnsupportedOperationException( getClass().getName() 367 + " does not support clone()" ).initCause( ex ); 368 } 369 } //-- Model clone() 370 371 /** 372 * Get the identifier for this artifact that is unique within 373 * the group given by the 374 * group ID. An artifact is something that is 375 * either produced or used by a project. 376 * Examples of artifacts produced by Maven for a 377 * project include: JARs, source and binary 378 * distributions, and WARs. 379 * 380 * @return String 381 */ 382 public String getArtifactId() 383 { 384 return this.artifactId; 385 } //-- String getArtifactId() 386 387 /** 388 * Get information required to build the project. 389 * 390 * @return Build 391 */ 392 public Build getBuild() 393 { 394 return this.build; 395 } //-- Build getBuild() 396 397 /** 398 * Get when children inherit from project's url, append path or 399 * not? Note: While the type 400 * of this field is <code>String</code> for 401 * technical reasons, the semantic type is actually 402 * <code>Boolean</code> 403 * <br><b>Default value is</b>: <code>true</code> 404 * <br><b>Since</b>: Maven 3.6.1. 405 * 406 * @return String 407 */ 408 public String getChildProjectUrlInheritAppendPath() 409 { 410 return this.childProjectUrlInheritAppendPath; 411 } //-- String getChildProjectUrlInheritAppendPath() 412 413 /** 414 * Get the project's continuous integration information. 415 * 416 * @return CiManagement 417 */ 418 public CiManagement getCiManagement() 419 { 420 return this.ciManagement; 421 } //-- CiManagement getCiManagement() 422 423 /** 424 * Method getContributors. 425 * 426 * @return List 427 */ 428 public java.util.List<Contributor> getContributors() 429 { 430 if ( this.contributors == null ) 431 { 432 this.contributors = new java.util.ArrayList<Contributor>(); 433 } 434 435 return this.contributors; 436 } //-- java.util.List<Contributor> getContributors() 437 438 /** 439 * Get a detailed description of the project, used by Maven 440 * whenever it needs to 441 * describe the project, such as on the web site. 442 * While this element can be specified as 443 * CDATA to enable the use of HTML tags within the 444 * description, it is discouraged to allow 445 * plain text representation. If you need to modify 446 * the index page of the generated web 447 * site, you are able to specify your own instead 448 * of adjusting this text. 449 * 450 * @return String 451 */ 452 public String getDescription() 453 { 454 return this.description; 455 } //-- String getDescription() 456 457 /** 458 * Method getDevelopers. 459 * 460 * @return List 461 */ 462 public java.util.List<Developer> getDevelopers() 463 { 464 if ( this.developers == null ) 465 { 466 this.developers = new java.util.ArrayList<Developer>(); 467 } 468 469 return this.developers; 470 } //-- java.util.List<Developer> getDevelopers() 471 472 /** 473 * Get a universally unique identifier for a project. It is 474 * normal to 475 * use a fully-qualified package name to 476 * distinguish it from other 477 * projects with a similar name (eg. 478 * <code>org.apache.maven</code>). 479 * 480 * @return String 481 */ 482 public String getGroupId() 483 { 484 return this.groupId; 485 } //-- String getGroupId() 486 487 /** 488 * Get the year of the project's inception, specified with 4 489 * digits. This value is 490 * used when generating copyright notices as well 491 * as being informational. 492 * 493 * @return String 494 */ 495 public String getInceptionYear() 496 { 497 return this.inceptionYear; 498 } //-- String getInceptionYear() 499 500 /** 501 * Get the project's issue management system information. 502 * 503 * @return IssueManagement 504 */ 505 public IssueManagement getIssueManagement() 506 { 507 return this.issueManagement; 508 } //-- IssueManagement getIssueManagement() 509 510 /** 511 * Method getLicenses. 512 * 513 * @return List 514 */ 515 public java.util.List<License> getLicenses() 516 { 517 if ( this.licenses == null ) 518 { 519 this.licenses = new java.util.ArrayList<License>(); 520 } 521 522 return this.licenses; 523 } //-- java.util.List<License> getLicenses() 524 525 /** 526 * Method getMailingLists. 527 * 528 * @return List 529 */ 530 public java.util.List<MailingList> getMailingLists() 531 { 532 if ( this.mailingLists == null ) 533 { 534 this.mailingLists = new java.util.ArrayList<MailingList>(); 535 } 536 537 return this.mailingLists; 538 } //-- java.util.List<MailingList> getMailingLists() 539 540 /** 541 * Get the modelEncoding field. 542 * 543 * @return String 544 */ 545 public String getModelEncoding() 546 { 547 return this.modelEncoding; 548 } //-- String getModelEncoding() 549 550 /** 551 * Get declares to which version of project descriptor this POM 552 * conforms. 553 * 554 * @return String 555 */ 556 public String getModelVersion() 557 { 558 return this.modelVersion; 559 } //-- String getModelVersion() 560 561 /** 562 * Get the full name of the project. 563 * 564 * @return String 565 */ 566 public String getName() 567 { 568 return this.name; 569 } //-- String getName() 570 571 /** 572 * Get this element describes various attributes of the 573 * organization to which the 574 * project belongs. These attributes are utilized 575 * when documentation is created (for 576 * copyright notices and links). 577 * 578 * @return Organization 579 */ 580 public Organization getOrganization() 581 { 582 return this.organization; 583 } //-- Organization getOrganization() 584 585 /** 586 * Get the type of artifact this project produces, for example 587 * <code>jar</code> 588 * <code>war</code> 589 * <code>ear</code> 590 * <code>pom</code>. 591 * Plugins can create their own packaging, and 592 * therefore their own packaging types, 593 * so this list does not contain all possible 594 * types. 595 * 596 * @return String 597 */ 598 public String getPackaging() 599 { 600 return this.packaging; 601 } //-- String getPackaging() 602 603 /** 604 * Get the location of the parent project, if one exists. 605 * Values from the parent 606 * project will be the default for this project if 607 * they are left unspecified. The location 608 * is given as a group ID, artifact ID and version. 609 * 610 * @return Parent 611 */ 612 public Parent getParent() 613 { 614 return this.parent; 615 } //-- Parent getParent() 616 617 /** 618 * Get describes the prerequisites in the build environment for 619 * this project. 620 * 621 * @return Prerequisites 622 */ 623 public Prerequisites getPrerequisites() 624 { 625 return this.prerequisites; 626 } //-- Prerequisites getPrerequisites() 627 628 /** 629 * Method getProfiles. 630 * 631 * @return List 632 */ 633 public java.util.List<Profile> getProfiles() 634 { 635 if ( this.profiles == null ) 636 { 637 this.profiles = new java.util.ArrayList<Profile>(); 638 } 639 640 return this.profiles; 641 } //-- java.util.List<Profile> getProfiles() 642 643 /** 644 * Get specification for the SCM used by the project, such as 645 * CVS, Subversion, etc. 646 * 647 * @return Scm 648 */ 649 public Scm getScm() 650 { 651 return this.scm; 652 } //-- Scm getScm() 653 654 /** 655 * Get the URL to the project's homepage. 656 * <br><b>Default value is</b>: parent value [+ 657 * path adjustment] + (artifactId or project.directory 658 * property), or just parent value if 659 * project's 660 * <code>child.project.url.inherit.append.path="false"</code> 661 * 662 * @return String 663 */ 664 public String getUrl() 665 { 666 return this.url; 667 } //-- String getUrl() 668 669 /** 670 * Get the current version of the artifact produced by this 671 * project. 672 * 673 * @return String 674 */ 675 public String getVersion() 676 { 677 return this.version; 678 } //-- String getVersion() 679 680 /** 681 * Method removeContributor. 682 * 683 * @param contributor a contributor object. 684 */ 685 public void removeContributor( Contributor contributor ) 686 { 687 getContributors().remove( contributor ); 688 } //-- void removeContributor( Contributor ) 689 690 /** 691 * Method removeDeveloper. 692 * 693 * @param developer a developer object. 694 */ 695 public void removeDeveloper( Developer developer ) 696 { 697 getDevelopers().remove( developer ); 698 } //-- void removeDeveloper( Developer ) 699 700 /** 701 * Method removeLicense. 702 * 703 * @param license a license object. 704 */ 705 public void removeLicense( License license ) 706 { 707 getLicenses().remove( license ); 708 } //-- void removeLicense( License ) 709 710 /** 711 * Method removeMailingList. 712 * 713 * @param mailingList a mailingList object. 714 */ 715 public void removeMailingList( MailingList mailingList ) 716 { 717 getMailingLists().remove( mailingList ); 718 } //-- void removeMailingList( MailingList ) 719 720 /** 721 * Method removeProfile. 722 * 723 * @param profile a profile object. 724 */ 725 public void removeProfile( Profile profile ) 726 { 727 getProfiles().remove( profile ); 728 } //-- void removeProfile( Profile ) 729 730 /** 731 * Set the identifier for this artifact that is unique within 732 * the group given by the 733 * group ID. An artifact is something that is 734 * either produced or used by a project. 735 * Examples of artifacts produced by Maven for a 736 * project include: JARs, source and binary 737 * distributions, and WARs. 738 * 739 * @param artifactId a artifactId object. 740 */ 741 public void setArtifactId( String artifactId ) 742 { 743 this.artifactId = artifactId; 744 } //-- void setArtifactId( String ) 745 746 /** 747 * Set information required to build the project. 748 * 749 * @param build a build object. 750 */ 751 public void setBuild( Build build ) 752 { 753 this.build = build; 754 } //-- void setBuild( Build ) 755 756 /** 757 * Set when children inherit from project's url, append path or 758 * not? Note: While the type 759 * of this field is <code>String</code> for 760 * technical reasons, the semantic type is actually 761 * <code>Boolean</code> 762 * <br><b>Default value is</b>: <code>true</code> 763 * <br><b>Since</b>: Maven 3.6.1. 764 * 765 * @param childProjectUrlInheritAppendPath a 766 * childProjectUrlInheritAppendPath object. 767 */ 768 public void setChildProjectUrlInheritAppendPath( String childProjectUrlInheritAppendPath ) 769 { 770 this.childProjectUrlInheritAppendPath = childProjectUrlInheritAppendPath; 771 } //-- void setChildProjectUrlInheritAppendPath( String ) 772 773 /** 774 * Set the project's continuous integration information. 775 * 776 * @param ciManagement a ciManagement object. 777 */ 778 public void setCiManagement( CiManagement ciManagement ) 779 { 780 this.ciManagement = ciManagement; 781 } //-- void setCiManagement( CiManagement ) 782 783 /** 784 * Set describes the contributors to a project that are not yet 785 * committers. 786 * 787 * @param contributors a contributors object. 788 */ 789 public void setContributors( java.util.List<Contributor> contributors ) 790 { 791 this.contributors = contributors; 792 } //-- void setContributors( java.util.List ) 793 794 /** 795 * Set a detailed description of the project, used by Maven 796 * whenever it needs to 797 * describe the project, such as on the web site. 798 * While this element can be specified as 799 * CDATA to enable the use of HTML tags within the 800 * description, it is discouraged to allow 801 * plain text representation. If you need to modify 802 * the index page of the generated web 803 * site, you are able to specify your own instead 804 * of adjusting this text. 805 * 806 * @param description a description object. 807 */ 808 public void setDescription( String description ) 809 { 810 this.description = description; 811 } //-- void setDescription( String ) 812 813 /** 814 * Set describes the committers of a project. 815 * 816 * @param developers a developers object. 817 */ 818 public void setDevelopers( java.util.List<Developer> developers ) 819 { 820 this.developers = developers; 821 } //-- void setDevelopers( java.util.List ) 822 823 /** 824 * Set a universally unique identifier for a project. It is 825 * normal to 826 * use a fully-qualified package name to 827 * distinguish it from other 828 * projects with a similar name (eg. 829 * <code>org.apache.maven</code>). 830 * 831 * @param groupId a groupId object. 832 */ 833 public void setGroupId( String groupId ) 834 { 835 this.groupId = groupId; 836 } //-- void setGroupId( String ) 837 838 /** 839 * Set the year of the project's inception, specified with 4 840 * digits. This value is 841 * used when generating copyright notices as well 842 * as being informational. 843 * 844 * @param inceptionYear a inceptionYear object. 845 */ 846 public void setInceptionYear( String inceptionYear ) 847 { 848 this.inceptionYear = inceptionYear; 849 } //-- void setInceptionYear( String ) 850 851 /** 852 * Set the project's issue management system information. 853 * 854 * @param issueManagement a issueManagement object. 855 */ 856 public void setIssueManagement( IssueManagement issueManagement ) 857 { 858 this.issueManagement = issueManagement; 859 } //-- void setIssueManagement( IssueManagement ) 860 861 /** 862 * Set this element describes all of the licenses for this 863 * project. 864 * Each license is described by a 865 * <code>license</code> element, which 866 * is then described by additional elements. 867 * Projects should only list the license(s) that 868 * applies to the project 869 * and not the licenses that apply to dependencies. 870 * If multiple licenses are listed, it is assumed 871 * that the user can select 872 * any of them, not that they must accept all. 873 * 874 * @param licenses a licenses object. 875 */ 876 public void setLicenses( java.util.List<License> licenses ) 877 { 878 this.licenses = licenses; 879 } //-- void setLicenses( java.util.List ) 880 881 /** 882 * Set contains information about a project's mailing lists. 883 * 884 * @param mailingLists a mailingLists object. 885 */ 886 public void setMailingLists( java.util.List<MailingList> mailingLists ) 887 { 888 this.mailingLists = mailingLists; 889 } //-- void setMailingLists( java.util.List ) 890 891 /** 892 * Set the modelEncoding field. 893 * 894 * @param modelEncoding a modelEncoding object. 895 */ 896 public void setModelEncoding( String modelEncoding ) 897 { 898 this.modelEncoding = modelEncoding; 899 } //-- void setModelEncoding( String ) 900 901 /** 902 * Set declares to which version of project descriptor this POM 903 * conforms. 904 * 905 * @param modelVersion a modelVersion object. 906 */ 907 public void setModelVersion( String modelVersion ) 908 { 909 this.modelVersion = modelVersion; 910 } //-- void setModelVersion( String ) 911 912 /** 913 * Set the full name of the project. 914 * 915 * @param name a name object. 916 */ 917 public void setName( String name ) 918 { 919 this.name = name; 920 } //-- void setName( String ) 921 922 /** 923 * Set this element describes various attributes of the 924 * organization to which the 925 * project belongs. These attributes are utilized 926 * when documentation is created (for 927 * copyright notices and links). 928 * 929 * @param organization a organization object. 930 */ 931 public void setOrganization( Organization organization ) 932 { 933 this.organization = organization; 934 } //-- void setOrganization( Organization ) 935 936 /** 937 * Set the type of artifact this project produces, for example 938 * <code>jar</code> 939 * <code>war</code> 940 * <code>ear</code> 941 * <code>pom</code>. 942 * Plugins can create their own packaging, and 943 * therefore their own packaging types, 944 * so this list does not contain all possible 945 * types. 946 * 947 * @param packaging a packaging object. 948 */ 949 public void setPackaging( String packaging ) 950 { 951 this.packaging = packaging; 952 } //-- void setPackaging( String ) 953 954 /** 955 * Set the location of the parent project, if one exists. 956 * Values from the parent 957 * project will be the default for this project if 958 * they are left unspecified. The location 959 * is given as a group ID, artifact ID and version. 960 * 961 * @param parent a parent object. 962 */ 963 public void setParent( Parent parent ) 964 { 965 this.parent = parent; 966 } //-- void setParent( Parent ) 967 968 /** 969 * Set describes the prerequisites in the build environment for 970 * this project. 971 * 972 * @param prerequisites a prerequisites object. 973 */ 974 public void setPrerequisites( Prerequisites prerequisites ) 975 { 976 this.prerequisites = prerequisites; 977 } //-- void setPrerequisites( Prerequisites ) 978 979 /** 980 * Set a listing of project-local build profiles which will 981 * modify the build process 982 * when activated. 983 * 984 * @param profiles a profiles object. 985 */ 986 public void setProfiles( java.util.List<Profile> profiles ) 987 { 988 this.profiles = profiles; 989 } //-- void setProfiles( java.util.List ) 990 991 /** 992 * Set specification for the SCM used by the project, such as 993 * CVS, Subversion, etc. 994 * 995 * @param scm a scm object. 996 */ 997 public void setScm( Scm scm ) 998 { 999 this.scm = scm; 1000 } //-- void setScm( Scm ) 1001 1002 /** 1003 * Set the URL to the project's homepage. 1004 * <br><b>Default value is</b>: parent value [+ 1005 * path adjustment] + (artifactId or project.directory 1006 * property), or just parent value if 1007 * project's 1008 * <code>child.project.url.inherit.append.path="false"</code> 1009 * 1010 * @param url a url object. 1011 */ 1012 public void setUrl( String url ) 1013 { 1014 this.url = url; 1015 } //-- void setUrl( String ) 1016 1017 /** 1018 * Set the current version of the artifact produced by this 1019 * project. 1020 * 1021 * @param version a version object. 1022 */ 1023 public void setVersion( String version ) 1024 { 1025 this.version = version; 1026 } //-- void setVersion( String ) 1027 1028 1029 1030 private void cloneHook( Model copy ) 1031 { 1032 copy.pomFile = pomFile; 1033 } 1034 1035 /** 1036 * The POM from which this model originated. This is transient runtime state and therefore not managed by Modello. 1037 */ 1038 private java.io.File pomFile; 1039 1040 /** 1041 * Gets the POM file for the corresponding project (if any). 1042 * 1043 * @return The POM file from which this model originated or {@code null} if this model does not belong to a local 1044 * project (e.g. describes the metadata of some artifact from the repository). 1045 */ 1046 public java.io.File getPomFile() 1047 { 1048 return pomFile; 1049 } 1050 1051 public void setPomFile( java.io.File pomFile ) 1052 { 1053 this.pomFile = ( pomFile != null ) ? pomFile.getAbsoluteFile() : null; 1054 } 1055 1056 /** 1057 * Gets the base directory for the corresponding project (if any). 1058 * 1059 * @return The base directory for the corresponding project or {@code null} if this model does not belong to a local 1060 * project (e.g. describes the metadata of some artifact from the repository). 1061 */ 1062 public java.io.File getProjectDirectory() 1063 { 1064 return ( pomFile != null ) ? pomFile.getParentFile() : null; 1065 } 1066 1067 /** 1068 * @return the model id as <code>groupId:artifactId:packaging:version</code> 1069 */ 1070 public String getId() 1071 { 1072 StringBuilder id = new StringBuilder( 64 ); 1073 1074 id.append( ( getGroupId() == null ) ? "[inherited]" : getGroupId() ); 1075 id.append( ":" ); 1076 id.append( getArtifactId() ); 1077 id.append( ":" ); 1078 id.append( getPackaging() ); 1079 id.append( ":" ); 1080 id.append( ( getVersion() == null ) ? "[inherited]" : getVersion() ); 1081 1082 return id.toString(); 1083 } 1084 1085 @Override 1086 public String toString() 1087 { 1088 return getId(); 1089 } 1090 1091 1092 1093 1094 1095 public boolean isChildProjectUrlInheritAppendPath() 1096 { 1097 return ( childProjectUrlInheritAppendPath != null ) ? Boolean.parseBoolean( childProjectUrlInheritAppendPath ) : true; 1098 } 1099 1100 public void setChildProjectUrlInheritAppendPath( boolean childProjectUrlInheritAppendPath ) 1101 { 1102 this.childProjectUrlInheritAppendPath = String.valueOf( childProjectUrlInheritAppendPath ); 1103 } 1104 1105 1106 1107 }