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