Introduction to Pom elements in Maven

Source: Internet
Author: User

Project-Root element of POM. XML files.

Modelversion-Setting the POM version is similar to setting the project version. Currently, it seems that Maven 2 only allows this value to be 4.0.0.

Groupid-Set the organization or group ID of a project, which is one of the unique identifiers of a project (the other is artifactid ). Groupid usually uses full domain name as the attribute value. For example, the groupid attribute value of all Maven plugins is org. Apache. Maven. plugins.

Artifactid-Set the unique base name of the primary artifact generated by the current project (Note: It is base name, not name, because artifact name is composed of "<artifactid>-<version>, for example, myapp-1.0.jar ).

Packaging-Set package type to be used by this artifact (e.g. jar, war, ear, etc .). This attribute value is used not only to set whether the generated artifact is jar, war, or ear, but also to set the lifecycle (jar, war) of the process when the package artifact is set, the build lifecycle of the ear is different. The default value of packaging is jar. If your project needs to package into jar, you do not need to set this attribute.

Version-Set the version of artifact generated by the project. Maven can help you with version management. If the property value contains a "snapshot" string, it indicates that the project is in the development stage, not the release stage.

Name-Set the project name, which is usually used for Maven's generated documentation.

URL-Set the web site URL of the project. This attribute value is usually used for Maven's generated documentation.

Description-Set Project Description This attribute value is usually used for Maven's generated documentation.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.