1 // =================== DO NOT EDIT THIS FILE ==================== 2 // Generated by Modello 1.11, 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 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 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 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 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 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 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 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 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 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 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 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 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 766 */ 767 public void setChildProjectUrlInheritAppendPath( String childProjectUrlInheritAppendPath ) 768 { 769 this.childProjectUrlInheritAppendPath = childProjectUrlInheritAppendPath; 770 } //-- void setChildProjectUrlInheritAppendPath( String ) 771 772 /** 773 * Set the project's continuous integration information. 774 * 775 * @param ciManagement 776 */ 777 public void setCiManagement( CiManagement ciManagement ) 778 { 779 this.ciManagement = ciManagement; 780 } //-- void setCiManagement( CiManagement ) 781 782 /** 783 * Set describes the contributors to a project that are not yet 784 * committers. 785 * 786 * @param contributors 787 */ 788 public void setContributors( java.util.List<Contributor> contributors ) 789 { 790 this.contributors = contributors; 791 } //-- void setContributors( java.util.List ) 792 793 /** 794 * Set a detailed description of the project, used by Maven 795 * whenever it needs to 796 * describe the project, such as on the web site. 797 * While this element can be specified as 798 * CDATA to enable the use of HTML tags within the 799 * description, it is discouraged to allow 800 * plain text representation. If you need to modify 801 * the index page of the generated web 802 * site, you are able to specify your own instead 803 * of adjusting this text. 804 * 805 * @param description 806 */ 807 public void setDescription( String description ) 808 { 809 this.description = description; 810 } //-- void setDescription( String ) 811 812 /** 813 * Set describes the committers of a project. 814 * 815 * @param developers 816 */ 817 public void setDevelopers( java.util.List<Developer> developers ) 818 { 819 this.developers = developers; 820 } //-- void setDevelopers( java.util.List ) 821 822 /** 823 * Set a universally unique identifier for a project. It is 824 * normal to 825 * use a fully-qualified package name to 826 * distinguish it from other 827 * projects with a similar name (eg. 828 * <code>org.apache.maven</code>). 829 * 830 * @param groupId 831 */ 832 public void setGroupId( String groupId ) 833 { 834 this.groupId = groupId; 835 } //-- void setGroupId( String ) 836 837 /** 838 * Set the year of the project's inception, specified with 4 839 * digits. This value is 840 * used when generating copyright notices as well 841 * as being informational. 842 * 843 * @param inceptionYear 844 */ 845 public void setInceptionYear( String inceptionYear ) 846 { 847 this.inceptionYear = inceptionYear; 848 } //-- void setInceptionYear( String ) 849 850 /** 851 * Set the project's issue management system information. 852 * 853 * @param issueManagement 854 */ 855 public void setIssueManagement( IssueManagement issueManagement ) 856 { 857 this.issueManagement = issueManagement; 858 } //-- void setIssueManagement( IssueManagement ) 859 860 /** 861 * Set this element describes all of the licenses for this 862 * project. 863 * Each license is described by a 864 * <code>license</code> element, which 865 * is then described by additional elements. 866 * Projects should only list the license(s) that 867 * applies to the project 868 * and not the licenses that apply to dependencies. 869 * If multiple licenses are listed, it is assumed 870 * that the user can select 871 * any of them, not that they must accept all. 872 * 873 * @param licenses 874 */ 875 public void setLicenses( java.util.List<License> licenses ) 876 { 877 this.licenses = licenses; 878 } //-- void setLicenses( java.util.List ) 879 880 /** 881 * Set contains information about a project's mailing lists. 882 * 883 * @param mailingLists 884 */ 885 public void setMailingLists( java.util.List<MailingList> mailingLists ) 886 { 887 this.mailingLists = mailingLists; 888 } //-- void setMailingLists( java.util.List ) 889 890 /** 891 * Set the modelEncoding field. 892 * 893 * @param modelEncoding 894 */ 895 public void setModelEncoding( String modelEncoding ) 896 { 897 this.modelEncoding = modelEncoding; 898 } //-- void setModelEncoding( String ) 899 900 /** 901 * Set declares to which version of project descriptor this POM 902 * conforms. 903 * 904 * @param modelVersion 905 */ 906 public void setModelVersion( String modelVersion ) 907 { 908 this.modelVersion = modelVersion; 909 } //-- void setModelVersion( String ) 910 911 /** 912 * Set the full name of the project. 913 * 914 * @param name 915 */ 916 public void setName( String name ) 917 { 918 this.name = name; 919 } //-- void setName( String ) 920 921 /** 922 * Set this element describes various attributes of the 923 * organization to which the 924 * project belongs. These attributes are utilized 925 * when documentation is created (for 926 * copyright notices and links). 927 * 928 * @param organization 929 */ 930 public void setOrganization( Organization organization ) 931 { 932 this.organization = organization; 933 } //-- void setOrganization( Organization ) 934 935 /** 936 * Set the type of artifact this project produces, for example 937 * <code>jar</code> 938 * <code>war</code> 939 * <code>ear</code> 940 * <code>pom</code>. 941 * Plugins can create their own packaging, and 942 * therefore their own packaging types, 943 * so this list does not contain all possible 944 * types. 945 * 946 * @param packaging 947 */ 948 public void setPackaging( String packaging ) 949 { 950 this.packaging = packaging; 951 } //-- void setPackaging( String ) 952 953 /** 954 * Set the location of the parent project, if one exists. 955 * Values from the parent 956 * project will be the default for this project if 957 * they are left unspecified. The location 958 * is given as a group ID, artifact ID and version. 959 * 960 * @param parent 961 */ 962 public void setParent( Parent parent ) 963 { 964 this.parent = parent; 965 } //-- void setParent( Parent ) 966 967 /** 968 * Set describes the prerequisites in the build environment for 969 * this project. 970 * 971 * @param prerequisites 972 */ 973 public void setPrerequisites( Prerequisites prerequisites ) 974 { 975 this.prerequisites = prerequisites; 976 } //-- void setPrerequisites( Prerequisites ) 977 978 /** 979 * Set a listing of project-local build profiles which will 980 * modify the build process 981 * when activated. 982 * 983 * @param profiles 984 */ 985 public void setProfiles( java.util.List<Profile> profiles ) 986 { 987 this.profiles = profiles; 988 } //-- void setProfiles( java.util.List ) 989 990 /** 991 * Set specification for the SCM used by the project, such as 992 * CVS, Subversion, etc. 993 * 994 * @param scm 995 */ 996 public void setScm( Scm scm ) 997 { 998 this.scm = scm; 999 } //-- void setScm( Scm ) 1000 1001 /** 1002 * Set the URL to the project's homepage. 1003 * <br><b>Default value is</b>: parent value [+ 1004 * path adjustment] + (artifactId or project.directory 1005 * property), or just parent value if 1006 * project's 1007 * <code>child.project.url.inherit.append.path="false"</code> 1008 * 1009 * @param url 1010 */ 1011 public void setUrl( String url ) 1012 { 1013 this.url = url; 1014 } //-- void setUrl( String ) 1015 1016 /** 1017 * Set the current version of the artifact produced by this 1018 * project. 1019 * 1020 * @param version 1021 */ 1022 public void setVersion( String version ) 1023 { 1024 this.version = version; 1025 } //-- void setVersion( String ) 1026 1027 1028 1029 private void cloneHook( Model copy ) 1030 { 1031 copy.pomFile = pomFile; 1032 } 1033 1034 /** 1035 * The POM from which this model originated. This is transient runtime state and therefore not managed by Modello. 1036 */ 1037 private java.io.File pomFile; 1038 1039 /** 1040 * Gets the POM file for the corresponding project (if any). 1041 * 1042 * @return The POM file from which this model originated or {@code null} if this model does not belong to a local 1043 * project (e.g. describes the metadata of some artifact from the repository). 1044 */ 1045 public java.io.File getPomFile() 1046 { 1047 return pomFile; 1048 } 1049 1050 public void setPomFile( java.io.File pomFile ) 1051 { 1052 this.pomFile = ( pomFile != null ) ? pomFile.getAbsoluteFile() : null; 1053 } 1054 1055 /** 1056 * Gets the base directory for the corresponding project (if any). 1057 * 1058 * @return The base directory for the corresponding project or {@code null} if this model does not belong to a local 1059 * project (e.g. describes the metadata of some artifact from the repository). 1060 */ 1061 public java.io.File getProjectDirectory() 1062 { 1063 return ( pomFile != null ) ? pomFile.getParentFile() : null; 1064 } 1065 1066 /** 1067 * @return the model id as <code>groupId:artifactId:packaging:version</code> 1068 */ 1069 public String getId() 1070 { 1071 StringBuilder id = new StringBuilder( 64 ); 1072 1073 id.append( ( getGroupId() == null ) ? "[inherited]" : getGroupId() ); 1074 id.append( ":" ); 1075 id.append( getArtifactId() ); 1076 id.append( ":" ); 1077 id.append( getPackaging() ); 1078 id.append( ":" ); 1079 id.append( ( getVersion() == null ) ? "[inherited]" : getVersion() ); 1080 1081 return id.toString(); 1082 } 1083 1084 @Override 1085 public String toString() 1086 { 1087 return getId(); 1088 } 1089 1090 1091 1092 1093 1094 public boolean isChildProjectUrlInheritAppendPath() 1095 { 1096 return ( childProjectUrlInheritAppendPath != null ) ? Boolean.parseBoolean( childProjectUrlInheritAppendPath ) : true; 1097 } 1098 1099 public void setChildProjectUrlInheritAppendPath( boolean childProjectUrlInheritAppendPath ) 1100 { 1101 this.childProjectUrlInheritAppendPath = String.valueOf( childProjectUrlInheritAppendPath ); 1102 } 1103 1104 1105 1106 }