From 37039ae0b7c7d61b0743884fa2f6dd427c244f67 Mon Sep 17 00:00:00 2001 From: Vandewaeter Fabio <fabio.vandewaeter.etu@univ-lille.fr> Date: Mon, 10 Mar 2025 08:37:56 +0100 Subject: [PATCH] pom et README pour faire un fat JAR --- README.md | 2 +- pom.xml | 17 ++++++++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 65671f6..8065859 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ mvn clean package ### Utiliser le programme ``` -java -jar FlopBox.jar +java -jar target/FlopBox.jar ``` ### Exécuter les tests diff --git a/pom.xml b/pom.xml index 493ed0d..292d21c 100644 --- a/pom.xml +++ b/pom.xml @@ -73,6 +73,22 @@ <mainClass>fil.sr2.flopbox.Main</mainClass> </configuration> </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-shade-plugin</artifactId> + <version>3.2.4</version> + <executions> + <execution> + <phase>package</phase> + <goals> + <goal>shade</goal> + </goals> + <configuration> + <createDependencyReducedPom>false</createDependencyReducedPom> + </configuration> + </execution> + </executions> + </plugin> <plugin> <artifactId>maven-jar-plugin</artifactId> <version>3.4.2</version> @@ -82,7 +98,6 @@ <mainClass>fil.sr2.flopbox.Main</mainClass> </manifest> </archive> - <outputDirectory>${project.basedir}</outputDirectory> </configuration> </plugin> </plugins> -- GitLab