-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpom.xml
More file actions
237 lines (220 loc) · 8.72 KB
/
Copy pathpom.xml
File metadata and controls
237 lines (220 loc) · 8.72 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
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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
<?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>
<!-- Project coordinates (GAV) - uniquely identifies this project -->
<groupId>fr.univtln.bruno.samples.network</groupId> <!-- Organization's reversed domain name -->
<artifactId>tcpclientserver</artifactId> <!-- Project name -->
<version>0.0.1-SNAPSHOT</version> <!-- Version with SNAPSHOT indicating in development -->
<packaging>pom</packaging> <!-- POM packaging for parent/multi-module projects -->
<!-- Basic project information -->
<name>tcpclientserver</name>
<url>https://github.com/yourusername/tcpclientserver</url>
<!-- Sub-modules of this multi-module project -->
<modules>
<module>client</module> <!-- Client application module -->
<module>server</module> <!-- Server application module -->
</modules>
<description>A TCP client-server sample application</description>
<!-- Properties: Central place for version numbers and configuration values -->
<properties>
<!-- Build Properties: Character encoding for source and reporting -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<!-- Java Version Configuration -->
<java.version>21</java.version> <!-- Using Java 21 (LTS) -->
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
<maven.compiler.release>${java.version}</maven.compiler.release>
<!-- Dependency Versions: Third-party libraries -->
<junit.version>5.12.0</junit.version> <!-- Testing framework -->
<logback.version>1.5.16</logback.version> <!-- Logging implementation -->
<sl4j.version>2.0.16</sl4j.version> <!-- Logging facade -->
<lombok.version>1.18.36</lombok.version> <!-- Boilerplate code reduction -->
<!-- Plugin Versions -->
<maven.compiler.version>3.14.0</maven.compiler.version>
<maven.surefire.version>3.5.2</maven.surefire.version>
<versions.maven.version>2.18.0</versions.maven.version>
<maven.jlink.plugin.version>3.2.0</maven.jlink.plugin.version>
<mavenjigsaw.version>1.1.3</mavenjigsaw.version>
<maven.dependency.version>3.4.0</maven.dependency.version>
<maven.clean.version>3.4.1</maven.clean.version>
<maven.resources.version>3.3.1</maven.resources.version>
<maven.jar.version>3.4.2</maven.jar.version>
<maven.install.version>3.1.3</maven.install.version>
<maven.deploy.version>3.1.3</maven.deploy.version>
<maven.site.version>3.21.0</maven.site.version>
</properties>
<!-- Dependencies shared by all modules -->
<dependencies>
<!-- Logging: SLF4J API + Logback Implementation -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${sl4j.version}</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>${logback.version}</version>
</dependency>
<!-- Lombok: Reduces boilerplate code through annotations -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<!-- Test Dependencies -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<!-- Versions plugin configuration -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<version>${versions.maven.version}</version>
<configuration>
<rulesUri>https://bruno.univ-tln.fr/rules.xml</rulesUri>
</configuration>
</plugin>
<!-- Compiler plugin configuration -->
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven.compiler.version}</version>
<configuration>
<release>${maven.compiler.release}</release>
<parameters>true</parameters>
<annotationProcessorPaths>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
<!-- Surefire plugin for running tests -->
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven.surefire.version}</version>
</plugin>
</plugins>
<!-- Plugin management with updated versions -->
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>${maven.clean.version}</version>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>${maven.resources.version}</version>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>${maven.jar.version}</version>
<configuration>
<archive>
<manifest>
<mainClass>${app.main.class}</mainClass>
</manifest>
<manifestEntries>
<Built-By>${user.name}</Built-By>
<Build-Timestamp>${maven.build.timestamp}</Build-Timestamp>
</manifestEntries>
</archive>
</configuration>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>${maven.install.version}</version>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>${maven.deploy.version}</version>
</plugin>
<plugin>
<artifactId>maven-site-plugin</artifactId>
<version>${maven.site.version}</version>
</plugin>
</plugins>
</pluginManagement>
</build>
<!-- Profiles: Different build configurations -->
<profiles>
<!-- JLink Profile: Creates custom runtime image -->
<profile>
<id>jlink</id>
<build>
<plugins>
<!-- Copy dependencies for modular build -->
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<version>${maven.dependency.version}</version>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>prepare-package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/modules</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<!-- JLink: Creates custom JRE with only required modules -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jlink-plugin</artifactId>
<version>${maven.jlink.plugin.version}</version>
<configuration>
<classifier>runtime-image</classifier>
<verbose>true</verbose>
<addModules>
<addModule>${project.module}</addModule>
</addModules>
<modulePaths>
<modulePath>${project.build.directory}/modules</modulePath>
</modulePaths>
<launcher>app=${project.module}/${app.main.class}</launcher>
<stripDebug>true</stripDebug>
<noHeaderFiles>true</noHeaderFiles>
<noManPages>true</noManPages>
<bindServices>true</bindServices>
</configuration>
<executions>
<execution>
<id>create-runtime-image</id>
<phase>package</phase>
<goals>
<goal>jlink</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Installation -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>