-
Notifications
You must be signed in to change notification settings - Fork 0
/
pom.xml
134 lines (122 loc) · 5.43 KB
/
pom.xml
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
<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>
<!-- Project Coordinates -->
<groupId>com.example</groupId>
<artifactId>my-app</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<!-- Project Information -->
<name>My App</name>
<description>Example project for Maven with detailed configuration</description>
<url>http://example.com/my-app</url>
<!-- Properties for Plugin Versions and Java Version -->
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.clean.plugin.version>3.2.0</maven.clean.plugin.version>
<maven.resources.plugin.version>3.2.0</maven.resources.plugin.version>
<maven.surefire.plugin.version>3.0.0-M5</maven.surefire.plugin.version>
<maven.jar.plugin.version>4.0.0-beta-1</maven.jar.plugin.version>
<maven.site.plugin.version>3.3</maven.site.plugin.version>
<maven.project.info.reports.plugin.version>3.2.0</maven.project.info.reports.plugin.version>
</properties>
<!-- Build Section -->
<build>
<plugins>
<!-- Maven Clean Plugin: Cleans the project build directory -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>${maven.clean.plugin.version}</version>
<configuration>
<filesets>
<fileset>
<directory>${project.build.directory}</directory>
<includes>
<include>**/*</include>
</includes>
</fileset>
</filesets>
</configuration>
</plugin>
<!-- Maven Resources Plugin: Handles copying resources -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>${maven.resources.plugin.version}</version>
<configuration>
<encoding>UTF-8</encoding>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
</configuration>
</plugin>
<!-- Maven Compiler Plugin: Compiles Java source code -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
</configuration>
</plugin>
<!-- Maven Surefire Plugin: Runs tests and generates reports -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven.surefire.plugin.version}</version>
<configuration>
<includes>
<include>**/*Test.java</include>
</includes>
<reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
</configuration>
</plugin>
<!-- Maven JAR Plugin: Packages the application into a JAR file -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>${maven.jar.plugin.version}</version>
<configuration>
<finalName>${project.artifactId}-${project.version}</finalName>
</configuration>
</plugin>
<!-- Maven Site Plugin: Generates project documentation -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>${maven.site.plugin.version}</version>
</plugin>
<!-- Maven Project Info Reports Plugin: Provides project information reports -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>${maven.project.info.reports.plugin.version}</version>
</plugin>
</plugins>
</build>
<!-- Dependencies Section -->
<dependencies>
<!-- JUnit Dependency for Running Tests -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.2</version>
<scope>test</scope>
</dependency>
</dependencies>
<!-- Distribution Management Section -->
<distributionManagement>
<repository>
<id>releases</id>
<url>http://example.com/releases</url>
</repository>
<snapshotRepository>
<id>snapshots</id>
<url>http://example.com/snapshots</url>
</snapshotRepository>
</distributionManagement>
</project>