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