Repository navigation
Expand file tree
/
Copy pathpom.xml
More file actions
75 lines (65 loc) · 4.18 KB
/
Copy pathpom.xml
File metadata and controls
75 lines (65 loc) · 4.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<?xml version="1.0" encoding="UTF-8"?>
<!-- Root element + namespaces: default Maven POM namespace; xsi used for schema hints -->
<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> <!-- POM model version (fixed at 4.0.0 for Maven 3/4) -->
<!-- Project coordinates (GAV) uniquely identify the artifact in repos -->
<groupId>com.mycompany.app</groupId> <!-- Org/domain (reverse-DNS) -->
<artifactId>my-app</artifactId> <!-- Module name (machine-friendly, no spaces) -->
<version>1.0-SNAPSHOT</version> <!-- Release/SNAPSHOT; drives dependency resolution -->
<!-- Note: <packaging> is optional and defaults to jar -->
<!-- Coordinate format: groupId:artifactId:version -> com.cwvj:payments-service:1.0.0 -->
<!-- Human-facing metadata for reports/sites/UIs -->
<name>my-app</name> <!-- Display name; can contain spaces -->
<url>http://www.example.com</url> <!-- Project homepage; can be repo/docs/wiki, not necessarily a public website -->
<!-- Maven properties: build-time placeholders (not OS env vars) -->
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <!-- Source/resource file encoding -->
<maven.compiler.release>17</maven.compiler.release> <!-- Language level + stdlib target (prefer over source/target) -->
</properties>
<!-- dependencyManagement: define versions once (BOMs/parents) without bringing dependencies in automatically -->
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.junit</groupId>
<artifactId>junit-bom</artifactId>
<version>5.11.0</version>
<type>pom</type> <!-- BOM is a POM packaging that carries versions -->
<scope>import</scope> <!-- Import BOM into this POM’s dependencyManagement -->
</dependency>
</dependencies>
</dependencyManagement>
<!-- Actual dependencies used by this module (versions may come from BOM or properties) -->
<dependencies>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<scope>test</scope> <!-- test scope: available in tests only -->
</dependency>
<!-- Optionally: parameterized tests support -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<!-- pluginManagement: pin plugin versions (children reference by artifactId without repeating versions) -->
<pluginManagement>
<plugins>
<!-- clean lifecycle -->
<plugin><artifactId>maven-clean-plugin</artifactId><version>3.4.0</version></plugin> <!-- Removes target/ during clean -->
<!-- default (build) lifecycle: jar packaging -->
<plugin><artifactId>maven-resources-plugin</artifactId><version>3.3.1</version></plugin> <!-- Copies/filters resources -->
<plugin><artifactId>maven-compiler-plugin</artifactId><version>3.13.0</version></plugin> <!-- Compiles sources; honors <maven.compiler.release> -->
<plugin><artifactId>maven-surefire-plugin</artifactId><version>3.3.0</version></plugin> <!-- Runs unit tests in test phase -->
<plugin><artifactId>maven-jar-plugin</artifactId><version>3.4.2</version></plugin> <!-- Packages classes/resources into JAR -->
<plugin><artifactId>maven-install-plugin</artifactId><version>3.1.2</version></plugin> <!-- Publishes artifact to local ~/.m2 -->
<plugin><artifactId>maven-deploy-plugin</artifactId><version>3.1.2</version></plugin> <!-- Deploys to remote repo via <distributionManagement> -->
<!-- site lifecycle -->
<plugin><artifactId>maven-site-plugin</artifactId><version>3.12.1</version></plugin> <!-- Generates project site at target/site -->
<plugin><artifactId>maven-project-info-reports-plugin</artifactId><version>3.6.1</version></plugin> <!-- Produces site reports (deps, plugins, SCM) -->
</plugins>
</pluginManagement>
</build>
</project>