The pom.xml configuration file
You must configure Maven with a declarative XML file. This file declares, in XML format, all the information necessary to build a project. It lists the required libraries here, along with the plugins needed to support Maven tasks. In this section, we will examine the pom.xml
file that holds the Maven configuration to build the CompoundInterest
program.
Here are the first three tags that are used in every pom.xml
file by everyone:
<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion>
Let’s describe the parts of the code we just wrote:
- The...