Configure project-dependent libraries and third-party tools.
As the example of Pom.xml
<Projectxmlns= "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> <groupId>Company Name</groupId> <Artifactid>Project name</Artifactid> <version>0.0.1-snapshot</version> <Packaging>War</Packaging> <name>Project name</name> <!--Configuration of version information for frequently updated libraries - <Properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <struts2.version>2.5.16</struts2.version> <log4j2.version>2.11.0</log4j2.version> <jetty-plugin.version>9.4.11.v20180605</jetty-plugin.version> </Properties> <Dependencies> <Dependency> <groupId>Junit</groupId> <Artifactid>Junit</Artifactid> <version>3.8.1</version> <!--The scope test means that the release is ignored when the package is released. - <Scope>Test</Scope> </Dependency> <!--Https://mvnrepository.com/artifact/org.apache.struts/struts2-core - <Dependency> <groupId>Org.apache.struts</groupId> <Artifactid>Struts2-core</Artifactid> <version>${struts2.version}</version> </Dependency> <Dependency> <groupId>org.apache.logging.log4j</groupId> <Artifactid>Log4j-core</Artifactid> <version>${log4j2.version}</version> </Dependency> <Dependency> <groupId>Org.apache.struts</groupId> <Artifactid>Struts2-tiles-plugin</Artifactid> <version>${struts2.version}</version> </Dependency> <!--<dependency> <groupId>org.apache.struts</groupId> <artifactid>s Truts2-convention-plugin</artifactid> <version>${struts2.version}</version> </depen Dency> - </Dependencies> <!--if the dependent library of the reference library has multiple versions of the same library, you can explicitly use this version here - <dependencymanagement> <Dependencies> <Dependency> <groupId>org.apache.logging.log4j</groupId> <Artifactid>Log4j-api</Artifactid> <version>${log4j2.version}</version> </Dependency> </Dependencies> </dependencymanagement> <Build> <Plugins> <plugin> <groupId>Org.apache.maven.plugins</groupId> <Artifactid>Maven-compiler-plugin</Artifactid> <version>3.3</version> <Configuration> <Source>1.8</Source> <Target>1.8</Target> </Configuration> </plugin> <plugin> <groupId>Org.apache.maven.plugins</groupId> <Artifactid>Maven-javadoc-plugin</Artifactid> <version>2.10.4</version> <Configuration> <Additionalparam>-xdoclint:none</Additionalparam> </Configuration> </plugin> <!--plug-in jetty configuration information, then you can happily run the test with MVN jetty:run command - <plugin> <groupId>Org.eclipse.jetty</groupId> <Artifactid>Jetty-maven-plugin</Artifactid> <version>${jetty-plugin.version}</version> <Configuration> <webApp> <ContextPath>/${project.artifactid}</ContextPath> </webApp> <Stopkey>CTRL + C</Stopkey> <Stopport>8999</Stopport> <Scanintervalseconds>10</Scanintervalseconds> </Configuration> </plugin> </Plugins> </Build></Project>
Eclipse Oxygen Creating a MAVEN Web project (ii)