Taking the example of a simple pom shown in [1] we analyze in detail its content:
- project tag is the top-level element in all pom.xml files.
- modelVersion tag indicates what version of the object model this pom is using.
- groupId tag indicates the unique identifier of the organization or group that created the project.
- artifactId tag indicates the unique base name of the primary artifact being generated by this project.
- packaging tag indicates the package type to be used by this artifact (e.g. JAR, WAR, EAR, etc.). If this tag is not present so the default value is jar.
- version tag indicates the version of the artifact generated by the project.
- name tag indicates the display name used for the project.
- url tag indicates where the project's site can be found.
- description tag provides a basic description of your project.
Instead
the dependencies tag contains the dependency list, in our example there
is just junit dependency. A dependency is structured as:
Scope
and type are optional, (if it is not present) the default value for
scope is "compile". The default value for type is "jar". More details
will provided in future posts. <dependency>
<groupId>${mydependency.groupId}</groupId>
<artifactId>${mydependency.artifactId}</artifactId>
<version>${mydependency.version}</version>
<scope>${mydependency.scope}</scope>
<type>${mydependecy.type}</type>
</dependency>
Internal Links
May be of interest to you:
No comments:
Post a Comment