What information does pom contain?

POM refers to Project Object Model. It is an XML file which contains the information about the project and various configuration detail used by Maven to build the project like build directory, source directory, dependencies, test source directory, plugin, goals etc.

ElementDescription
projectThis is the root element of pom.xml file.
modelVersionThis is the sub element of project which specifies the modelVersion. Model version should be 4.0.0.
groupIdThis is the sub element of project which specifies the id for the project group.
artifactIdThis is the sub element of project which specifies the id for the project. This is generally refers to the name of the project. The artifact ID is also used as part of the name of the JAR, WAR or EAR file produced when building the project.
versionThis is the sub element of project which specifies the version of the project.
packagingIt is used to define the packaging type such as jar, war etc.
nameIt is used to define the name of the maven project.
urlIt is used to define the url of the project.
dependenciesIt is used to define the dependencies for this project.
dependencyIt is used to define a dependency. It is used inside dependencies element.
scopeIt is used to define the scope for this maven project. It can be compile, provided, runtime, test and system.

Related topics

Content Protection by DMCA.com
Please Share