Added: jar

This commit is contained in:
rubenpirreram
2026-05-18 15:19:54 +02:00
parent 8e943608a2
commit 295a021fbf
5 changed files with 274 additions and 19 deletions
+172
View File
@@ -0,0 +1,172 @@
<?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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>it.polimi.ingsw</groupId>
<artifactId>GC14</artifactId>
<name>ing-sw-2026-pirrera-radice-pagani-pellegrino</name>
<version>1.0-SNAPSHOT</version>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.13.0</version>
<configuration>
<source>25</source>
<target>25</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.2.5</version>
</plugin>
<plugin>
<groupId>org.openjfx</groupId>
<artifactId>javafx-maven-plugin</artifactId>
<version>0.0.8</version>
<executions>
<execution>
<id>default-cli</id>
<configuration>
<mainClass>it.polimi.ingsw.gc14.HelloApplication</mainClass>
<launcher>app</launcher>
<jlinkZipName>app</jlinkZipName>
<jlinkImageName>app</jlinkImageName>
<noManPages>true</noManPages>
<stripDebug>true</stripDebug>
<noHeaderFiles>true</noHeaderFiles>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-shade-plugin</artifactId>
<version>3.5.2</version>
<executions>
<execution>
<id>server</id>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<finalName>Server</finalName>
<transformers>
<transformer>
<mainClass>it.polimi.ingsw.gc14.ServerLauncher</mainClass>
</transformer>
</transformers>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
</configuration>
</execution>
<execution>
<id>client-tui</id>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<finalName>ClientTUI</finalName>
<transformers>
<transformer>
<mainClass>it.polimi.ingsw.gc14.ClientLauncherTUI</mainClass>
</transformer>
</transformers>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
</configuration>
</execution>
<execution>
<id>client-gui</id>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<finalName>ClientGUI</finalName>
<transformers>
<transformer>
<mainClass>it.polimi.ingsw.gc14.ClientLauncherGUI</mainClass>
</transformer>
</transformers>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.12.1</version>
<scope>test</scope>
<exclusions>
<exclusion>
<artifactId>opentest4j</artifactId>
<groupId>org.opentest4j</groupId>
</exclusion>
<exclusion>
<artifactId>junit-platform-commons</artifactId>
<groupId>org.junit.platform</groupId>
</exclusion>
<exclusion>
<artifactId>apiguardian-api</artifactId>
<groupId>org.apiguardian</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.12.1</version>
<scope>test</scope>
<exclusions>
<exclusion>
<artifactId>junit-platform-engine</artifactId>
<groupId>org.junit.platform</groupId>
</exclusion>
<exclusion>
<artifactId>apiguardian-api</artifactId>
<groupId>org.apiguardian</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<junit.version>5.12.1</junit.version>
</properties>
</project>
+83
View File
@@ -91,6 +91,89 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.5.2</version>
<executions>
<!-- SERVER -->
<execution>
<id>server</id>
<phase>package</phase>
<goals><goal>shade</goal></goals>
<configuration>
<finalName>Server</finalName>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>it.polimi.ingsw.gc14.ServerLauncher</mainClass>
</transformer>
</transformers>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
</configuration>
</execution>
<!-- CLIENT TUI -->
<execution>
<id>client-tui</id>
<phase>package</phase>
<goals><goal>shade</goal></goals>
<configuration>
<finalName>ClientTUI</finalName>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>it.polimi.ingsw.gc14.ClientLauncherTUI</mainClass>
</transformer>
</transformers>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
</configuration>
</execution>
<!-- CLIENT GUI -->
<execution>
<id>client-gui</id>
<phase>package</phase>
<goals><goal>shade</goal></goals>
<configuration>
<finalName>ClientGUI</finalName>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>it.polimi.ingsw.gc14.ClientLauncherGUI</mainClass>
</transformer>
</transformers>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
@@ -2,14 +2,17 @@ package it.polimi.ingsw.gc14;
import it.polimi.ingsw.gc14.Controller.ClientController;
import it.polimi.ingsw.gc14.View.GUI.GUI;
import it.polimi.ingsw.gc14.View.IView;
import javafx.application.Application;
import javafx.stage.Stage;
import static javafx.application.Application.launch;
public class ClientLauncherGUI {
public class ClientLauncherGUI extends Application {
public static void main(String[] args) {
System.setProperty("glass.win.uiScale", "1.0");
Application.launch(GUIApp.class, args);
}
public static class GUIApp extends Application {
@Override
public void start(Stage stage) throws Exception {
GUI view = new GUI(stage);
@@ -17,8 +20,5 @@ public class ClientLauncherGUI extends Application {
view.setController(controller);
view.start(stage);
}
public static void main(String[] args) {
launch();
}
}
@@ -155,7 +155,7 @@ public class MainFXMLController {
// ==== ELEMENTS ====
private StackPane createOrder(String num) {
ImageView img = new ImageView(loadImage("/GUIImages/Orders/order-" + num + ".png"));
img.setFitHeight(240);
img.fitHeightProperty().bind(board.heightProperty().add(-15));
img.setPreserveRatio(true);
addClip(img);
return new StackPane(img);
@@ -171,10 +171,10 @@ public class MainFXMLController {
Player player = controller.miniModel.slotPlayerMap.get(slot);
if (player != null && controller.miniModel.getPositionByUsername(player.getUserName()) != -1) {
ImageView totem = new ImageView(loadImage("/GUIImages/Totems/totem_" + player.totem.toString().toLowerCase(Locale.ROOT) + ".png"));
totem.setFitHeight(70);
totem.setFitHeight(68);
totem.setPreserveRatio(true);
StackPane.setAlignment(totem, Pos.TOP_LEFT);
StackPane.setMargin(totem, new Insets(8, 0, 0, 57));
StackPane.setMargin(totem, new Insets(0, 0, 0, 46));
wrapper.getChildren().add(totem);
}
@@ -433,7 +433,7 @@ public class MainFXMLController {
default -> "/GUIImages/Backs/back-001.png";
};
ImageView back = new ImageView(loadImage(path));
back.setFitHeight(240);
back.fitHeightProperty().bind(board.heightProperty().add(-15));
back.setPreserveRatio(true);
addClip(back);
addShadow(back);
@@ -447,7 +447,7 @@ public class MainFXMLController {
VBox overlay = new VBox(-20);
overlay.setPickOnBounds(false);
StackPane.setAlignment(overlay, Pos.TOP_LEFT);
StackPane.setMargin(overlay, new Insets(9, 0, 0, 57));
StackPane.setMargin(overlay, new Insets(9, 0, 0, 46));
for (OrderPlayer player : controller.miniModel.orderLogicCard.playerList) {
ImageView totem = new ImageView(loadImage("/GUIImages/Totems/totem_" + player.player.totem.toString().toLowerCase(Locale.ROOT) + ".png"));
+1 -1
View File
@@ -29,7 +29,7 @@
</VBox.margin>
</HBox>
<HBox fx:id="board" prefHeight="255" minHeight="255" maxHeight="255" styleClass="card-list" VBox.vgrow="NEVER">
<HBox fx:id="board" prefHeight="220" minHeight="220" maxHeight="220" styleClass="card-list" VBox.vgrow="NEVER">
<VBox.margin>
<Insets top="5" right="5" bottom="5" left="5" />
</VBox.margin>