From 200eb384f13dc764a75c8692c4dcdc0487c2d83e Mon Sep 17 00:00:00 2001 From: Vandewaeter Fabio <fabio.vandewaeter.etu@univ-lille.fr> Date: Mon, 10 Mar 2025 08:21:57 +0100 Subject: [PATCH 1/2] modification pom et gitignore --- .gitignore | 1 + pom.xml | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 2f7896d..639ff7f 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ target/ +*.jar diff --git a/pom.xml b/pom.xml index fddd694..493ed0d 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ <artifactId>jersey-service</artifactId> <packaging>jar</packaging> <version>1.0-SNAPSHOT</version> - <name>jersey-service</name> + <name>flopbox</name> <dependencyManagement> <dependencies> @@ -46,6 +46,7 @@ </dependencies> <build> + <finalName>FlopBox</finalName> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> @@ -72,6 +73,18 @@ <mainClass>fil.sr2.flopbox.Main</mainClass> </configuration> </plugin> + <plugin> + <artifactId>maven-jar-plugin</artifactId> + <version>3.4.2</version> + <configuration> + <archive> + <manifest> + <mainClass>fil.sr2.flopbox.Main</mainClass> + </manifest> + </archive> + <outputDirectory>${project.basedir}</outputDirectory> + </configuration> + </plugin> </plugins> </build> -- GitLab 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 2/2] 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