Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (101)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (309)
Collections:
Other Resources:
pom.xml - Maven Project File
What is pom.xml?
✍: FYIcenter.com
pom.xml, the POM (Project Object Model) file, is the Maven project file
that defines a fundamental unit of work in Maven.
It is an XML file that contains information about the project and
configuration details used by Maven to build the project. It contains
default values for most projects.
Here is the pom.xml generated by the "mvn archetype:generate" using the "maven-archetype-quickstart" project template:
C:\fyicenter>cd hello C:\fyicenter\hello>type pom.xml <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/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.fyicenter</groupId> <artifactId>hello</artifactId> <packaging>jar</packaging> <version>1.0-SNAPSHOT</version> <name>hello</name> <url>http://maven.apache.org</url> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>3.8.1</version> <scope>test</scope> </dependency> </dependencies> </project>
But this default pom.xml is outdated now. It uses 1.5 as the default JDK version for source code and target class code, which is too low for JDK 10.
You can modify pom.xml by adding JDK version configuraitons:
<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/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.fyicenter</groupId> <artifactId>hello</artifactId> <packaging>jar</packaging> <version>1.0-SNAPSHOT</version> <name>hello</name> <url>http://jar.fyicenter.com</url> <properties> <maven.compiler.source>1.7</maven.compiler.source> <maven.compiler.target>1.7</maven.compiler.target> </properties> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>3.8.1</version> <scope>test</scope> </dependency> </dependencies> </project>
⇒ Maven Project Compilation Output
2020-10-17, 1392🔥, 0💬
Popular Posts:
JDK 11 jdk.internal.opt.jmod is the JMOD file for JDK 11 Internal Opt module. JDK 11 Internal Opt mo...
How to download and install ojdbc11.jar for Oracle 21c? ojdbc11.jar for Oracle 21c is a Java JDBC Dr...
What Is jaxb-impl-2.1.12.jar? Java Architecture for XML Binding (JAXB) is a Java API that allows Jav...
kernel.jar is a component in iText Java library to provide low-level functionalities. iText Java lib...
JDK 17 jdk.jdi.jmod is the JMOD file for JDK 17 JDI (Java Debug Interface) tool. JDK 17 JDI tool com...