CodesJava

Easy learning with example program codes

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.

Element Description
project This is the root element of pom.xml file.
modelVersion This is the sub element of project which specifies the modelVersion. Model version should be 4.0.0.
groupId This is the sub element of project which specifies the id for the project group.
artifactId This 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.
version This is the sub element of project which specifies the version of the project.
packaging It is used to define the packaging type such as jar, war etc.
name It is used to define the name of the maven project.
url It is used to define the url of the project.
dependencies It is used to define the dependencies for this project.
dependency It is used to define a dependency. It is used inside dependencies element.
scope It is used to define the scope for this maven project. It can be compile, provided, runtime, test and system.

Related topics



Copyright © 2018 CodesJava DMCA.com Protection Status SiteMap