From db7fa6e018dc3876aff537faa03d4fc3cf45f3a0 Mon Sep 17 00:00:00 2001
From: TROMEL LOUIS <58844429+Ash84@users.noreply.github.com>
Date: Fri, 5 Jul 2024 11:37:31 +0200
Subject: [PATCH] maven-source-plugin

---
 sava-core/pom.xml | 27 +++++++++++++++++++++------
 1 file changed, 21 insertions(+), 6 deletions(-)

diff --git a/sava-core/pom.xml b/sava-core/pom.xml
index d27c707..0b17110 100644
--- a/sava-core/pom.xml
+++ b/sava-core/pom.xml
@@ -10,6 +10,7 @@
 	<artifactId>sava-core</artifactId>
 	<name>SAVA library</name>
 	<packaging>jar</packaging>
+
 	<properties>
 		<client_java.version>0.16.0</client_java.version>
 		<jaxrs.version>3.1.0</jaxrs.version>
@@ -18,14 +19,13 @@
 		<servlet-api.version>3.1.0</servlet-api.version>
 		<checkstyle.config.location>file://${basedir}/../config/sun_checks.xml</checkstyle.config.location>
 	</properties>
-	<dependencies>
 
+	<dependencies>
 		<!-- Log4J -->
 		<dependency>
 			<groupId>org.apache.logging.log4j</groupId>
 			<artifactId>log4j-core</artifactId>
 		</dependency>
-
 		<dependency>
 			<groupId>javax.servlet</groupId>
 			<artifactId>javax.servlet-api</artifactId>
@@ -38,14 +38,12 @@
 			<version>${junit.version}</version>
 			<scope>test</scope>
 		</dependency>
-
 		<!-- Lombok -->
 		<dependency>
 			<groupId>org.projectlombok</groupId>
 			<artifactId>lombok</artifactId>
 			<scope>provided</scope>
 		</dependency>
-
 		<!-- The client -->
 		<dependency>
 			<groupId>io.prometheus</groupId>
@@ -68,13 +66,30 @@
 			<artifactId>simpleclient_servlet</artifactId>
 			<version>${client_java.version}</version>
 		</dependency>
-
 	</dependencies>
 
+    <build>
+        <plugins>
+            <!-- Attach source and javadoc artifacts -->
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-source-plugin</artifactId>
+                <version>3.3.1</version>
+                <executions>
+                    <execution>
+                        <id>attach-sources</id>
+                        <goals>
+                            <goal>jar-no-fork</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+		</plugins>
+	</build>
+	
 	<reporting>
 		<!-- Those plugins are used by `mvn site` -->
 		<plugins>
-
 			<!-- Generates API JavaDoc. -->
 			<!-- mvn javadoc:javadoc -->
 			<plugin>
-- 
GitLab