Class Model

    • Constructor Detail

      • Model

        public Model()
    • Method Detail

      • addContributor

        public void addContributor​(Contributor contributor)
        Method addContributor.
        Parameters:
        contributor - a contributor object.
      • addDeveloper

        public void addDeveloper​(Developer developer)
        Method addDeveloper.
        Parameters:
        developer - a developer object.
      • addLicense

        public void addLicense​(License license)
        Method addLicense.
        Parameters:
        license - a license object.
      • addMailingList

        public void addMailingList​(MailingList mailingList)
        Method addMailingList.
        Parameters:
        mailingList - a mailingList object.
      • addProfile

        public void addProfile​(Profile profile)
        Method addProfile.
        Parameters:
        profile - a profile object.
      • clone

        public Model clone()
        Method clone.
        Overrides:
        clone in class ModelBase
        Returns:
        Model
      • getArtifactId

        public String getArtifactId()
        Get the identifier for this artifact that is unique within the group given by the group ID. An artifact is something that is either produced or used by a project. Examples of artifacts produced by Maven for a project include: JARs, source and binary distributions, and WARs.
        Returns:
        String
      • getBuild

        public Build getBuild()
        Get information required to build the project.
        Returns:
        Build
      • getChildProjectUrlInheritAppendPath

        public String getChildProjectUrlInheritAppendPath()
        Get when children inherit from project's url, append path or not? Note: While the type of this field is String for technical reasons, the semantic type is actually Boolean
        Default value is: true
        Since: Maven 3.6.1.
        Returns:
        String
      • getCiManagement

        public CiManagement getCiManagement()
        Get the project's continuous integration information.
        Returns:
        CiManagement
      • getContributors

        public List<Contributor> getContributors()
        Method getContributors.
        Returns:
        List
      • getDescription

        public String getDescription()
        Get a detailed description of the project, used by Maven whenever it needs to describe the project, such as on the web site. While this element can be specified as CDATA to enable the use of HTML tags within the description, it is discouraged to allow plain text representation. If you need to modify the index page of the generated web site, you are able to specify your own instead of adjusting this text.
        Returns:
        String
      • getDevelopers

        public List<Developer> getDevelopers()
        Method getDevelopers.
        Returns:
        List
      • getGroupId

        public String getGroupId()
        Get a universally unique identifier for a project. It is normal to use a fully-qualified package name to distinguish it from other projects with a similar name (eg. org.apache.maven).
        Returns:
        String
      • getInceptionYear

        public String getInceptionYear()
        Get the year of the project's inception, specified with 4 digits. This value is used when generating copyright notices as well as being informational.
        Returns:
        String
      • getIssueManagement

        public IssueManagement getIssueManagement()
        Get the project's issue management system information.
        Returns:
        IssueManagement
      • getLicenses

        public List<License> getLicenses()
        Method getLicenses.
        Returns:
        List
      • getMailingLists

        public List<MailingList> getMailingLists()
        Method getMailingLists.
        Returns:
        List
      • getModelEncoding

        public String getModelEncoding()
        Get the modelEncoding field.
        Returns:
        String
      • getModelVersion

        public String getModelVersion()
        Get declares to which version of project descriptor this POM conforms.
        Returns:
        String
      • getName

        public String getName()
        Get the full name of the project.
        Returns:
        String
      • getOrganization

        public Organization getOrganization()
        Get this element describes various attributes of the organization to which the project belongs. These attributes are utilized when documentation is created (for copyright notices and links).
        Returns:
        Organization
      • getPackaging

        public String getPackaging()
        Get the type of artifact this project produces, for example jar war ear pom. Plugins can create their own packaging, and therefore their own packaging types, so this list does not contain all possible types.
        Returns:
        String
      • getParent

        public Parent getParent()
        Get the location of the parent project, if one exists. Values from the parent project will be the default for this project if they are left unspecified. The location is given as a group ID, artifact ID and version.
        Returns:
        Parent
      • getPrerequisites

        public Prerequisites getPrerequisites()
        Get describes the prerequisites in the build environment for this project.
        Returns:
        Prerequisites
      • getProfiles

        public List<Profile> getProfiles()
        Method getProfiles.
        Returns:
        List
      • getScm

        public Scm getScm()
        Get specification for the SCM used by the project, such as CVS, Subversion, etc.
        Returns:
        Scm
      • getUrl

        public String getUrl()
        Get the URL to the project's homepage.
        Default value is: parent value [+ path adjustment] + (artifactId or project.directory property), or just parent value if project's child.project.url.inherit.append.path="false"
        Returns:
        String
      • getVersion

        public String getVersion()
        Get the current version of the artifact produced by this project.
        Returns:
        String
      • removeContributor

        public void removeContributor​(Contributor contributor)
        Method removeContributor.
        Parameters:
        contributor - a contributor object.
      • removeDeveloper

        public void removeDeveloper​(Developer developer)
        Method removeDeveloper.
        Parameters:
        developer - a developer object.
      • removeLicense

        public void removeLicense​(License license)
        Method removeLicense.
        Parameters:
        license - a license object.
      • removeMailingList

        public void removeMailingList​(MailingList mailingList)
        Method removeMailingList.
        Parameters:
        mailingList - a mailingList object.
      • removeProfile

        public void removeProfile​(Profile profile)
        Method removeProfile.
        Parameters:
        profile - a profile object.
      • setArtifactId

        public void setArtifactId​(String artifactId)
        Set the identifier for this artifact that is unique within the group given by the group ID. An artifact is something that is either produced or used by a project. Examples of artifacts produced by Maven for a project include: JARs, source and binary distributions, and WARs.
        Parameters:
        artifactId - a artifactId object.
      • setBuild

        public void setBuild​(Build build)
        Set information required to build the project.
        Parameters:
        build - a build object.
      • setChildProjectUrlInheritAppendPath

        public void setChildProjectUrlInheritAppendPath​(String childProjectUrlInheritAppendPath)
        Set when children inherit from project's url, append path or not? Note: While the type of this field is String for technical reasons, the semantic type is actually Boolean
        Default value is: true
        Since: Maven 3.6.1.
        Parameters:
        childProjectUrlInheritAppendPath - a childProjectUrlInheritAppendPath object.
      • setCiManagement

        public void setCiManagement​(CiManagement ciManagement)
        Set the project's continuous integration information.
        Parameters:
        ciManagement - a ciManagement object.
      • setContributors

        public void setContributors​(List<Contributor> contributors)
        Set describes the contributors to a project that are not yet committers.
        Parameters:
        contributors - a contributors object.
      • setDescription

        public void setDescription​(String description)
        Set a detailed description of the project, used by Maven whenever it needs to describe the project, such as on the web site. While this element can be specified as CDATA to enable the use of HTML tags within the description, it is discouraged to allow plain text representation. If you need to modify the index page of the generated web site, you are able to specify your own instead of adjusting this text.
        Parameters:
        description - a description object.
      • setDevelopers

        public void setDevelopers​(List<Developer> developers)
        Set describes the committers of a project.
        Parameters:
        developers - a developers object.
      • setGroupId

        public void setGroupId​(String groupId)
        Set a universally unique identifier for a project. It is normal to use a fully-qualified package name to distinguish it from other projects with a similar name (eg. org.apache.maven).
        Parameters:
        groupId - a groupId object.
      • setInceptionYear

        public void setInceptionYear​(String inceptionYear)
        Set the year of the project's inception, specified with 4 digits. This value is used when generating copyright notices as well as being informational.
        Parameters:
        inceptionYear - a inceptionYear object.
      • setIssueManagement

        public void setIssueManagement​(IssueManagement issueManagement)
        Set the project's issue management system information.
        Parameters:
        issueManagement - a issueManagement object.
      • setLicenses

        public void setLicenses​(List<License> licenses)
        Set this element describes all of the licenses for this project. Each license is described by a license element, which is then described by additional elements. Projects should only list the license(s) that applies to the project and not the licenses that apply to dependencies. If multiple licenses are listed, it is assumed that the user can select any of them, not that they must accept all.
        Parameters:
        licenses - a licenses object.
      • setMailingLists

        public void setMailingLists​(List<MailingList> mailingLists)
        Set contains information about a project's mailing lists.
        Parameters:
        mailingLists - a mailingLists object.
      • setModelEncoding

        public void setModelEncoding​(String modelEncoding)
        Set the modelEncoding field.
        Parameters:
        modelEncoding - a modelEncoding object.
      • setModelVersion

        public void setModelVersion​(String modelVersion)
        Set declares to which version of project descriptor this POM conforms.
        Parameters:
        modelVersion - a modelVersion object.
      • setName

        public void setName​(String name)
        Set the full name of the project.
        Parameters:
        name - a name object.
      • setOrganization

        public void setOrganization​(Organization organization)
        Set this element describes various attributes of the organization to which the project belongs. These attributes are utilized when documentation is created (for copyright notices and links).
        Parameters:
        organization - a organization object.
      • setPackaging

        public void setPackaging​(String packaging)
        Set the type of artifact this project produces, for example jar war ear pom. Plugins can create their own packaging, and therefore their own packaging types, so this list does not contain all possible types.
        Parameters:
        packaging - a packaging object.
      • setParent

        public void setParent​(Parent parent)
        Set the location of the parent project, if one exists. Values from the parent project will be the default for this project if they are left unspecified. The location is given as a group ID, artifact ID and version.
        Parameters:
        parent - a parent object.
      • setPrerequisites

        public void setPrerequisites​(Prerequisites prerequisites)
        Set describes the prerequisites in the build environment for this project.
        Parameters:
        prerequisites - a prerequisites object.
      • setProfiles

        public void setProfiles​(List<Profile> profiles)
        Set a listing of project-local build profiles which will modify the build process when activated.
        Parameters:
        profiles - a profiles object.
      • setScm

        public void setScm​(Scm scm)
        Set specification for the SCM used by the project, such as CVS, Subversion, etc.
        Parameters:
        scm - a scm object.
      • setUrl

        public void setUrl​(String url)
        Set the URL to the project's homepage.
        Default value is: parent value [+ path adjustment] + (artifactId or project.directory property), or just parent value if project's child.project.url.inherit.append.path="false"
        Parameters:
        url - a url object.
      • setVersion

        public void setVersion​(String version)
        Set the current version of the artifact produced by this project.
        Parameters:
        version - a version object.
      • getPomFile

        public File getPomFile()
        Gets the POM file for the corresponding project (if any).
        Returns:
        The POM file from which this model originated or null if this model does not belong to a local project (e.g. describes the metadata of some artifact from the repository).
      • setPomFile

        public void setPomFile​(File pomFile)
      • getProjectDirectory

        public File getProjectDirectory()
        Gets the base directory for the corresponding project (if any).
        Returns:
        The base directory for the corresponding project or null if this model does not belong to a local project (e.g. describes the metadata of some artifact from the repository).
      • getId

        public String getId()
        Returns:
        the model id as groupId:artifactId:packaging:version
      • isChildProjectUrlInheritAppendPath

        public boolean isChildProjectUrlInheritAppendPath()
      • setChildProjectUrlInheritAppendPath

        public void setChildProjectUrlInheritAppendPath​(boolean childProjectUrlInheritAppendPath)