Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions server.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM maven:3.9.2-eclipse-temurin-17
WORKDIR /app
COPY warehouse .
RUN mvn clean install -DskipUiTests -DskipTests

WORKDIR /app/springboot/server

# Download dependencies
RUN mvn spring-boot:start
RUN mvn spring-boot:stop

CMD [ "mvn", "spring-boot:run" ]
EXPOSE 8080
2 changes: 1 addition & 1 deletion warehouse/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>16</maven.compiler.source>
<maven.compiler.target>16</maven.compiler.target>
<jackson.version>2.12.5</jackson.version>
<jackson.version>2.12.7</jackson.version>
<skipTests>false</skipTests>
</properties>

Expand Down
31 changes: 26 additions & 5 deletions warehouse/springboot/server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@

<packaging>jar</packaging>

<properties>
<spring.version>5.3.28</spring.version>
<spring-boot.version>2.4.13</spring-boot.version>
</properties>

<dependencies>
<dependency>
<groupId>it1901</groupId>
Expand Down Expand Up @@ -58,7 +63,7 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<version>2.4.4</version>
<version>${spring-boot.version}</version>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
Expand All @@ -70,13 +75,13 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jetty</artifactId>
<version>2.4.4</version>
<version>${spring-boot.version}</version>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<version>2.4.4</version>
<version>${spring-boot.version}</version>
<scope>test</scope>
<exclusions>
<exclusion>
Expand All @@ -92,7 +97,7 @@
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>5.3.13</version>
<version>${spring.version}</version>
</dependency>
</dependencies>

Expand Down Expand Up @@ -134,7 +139,23 @@
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.4.4</version>
<version>${spring-boot.version}</version>
</plugin>

<plugin>
<!-- Build an executable JAR -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<classpathPrefix>lib/</classpathPrefix>
<mainClass>springboot.server.WarehouseServerApplication</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
</plugins>
</build>
Expand Down
5 changes: 3 additions & 2 deletions warehouse/ui/src/main/java/ui/ServerSelectController.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,14 @@ public ServerSelectController(WarehouseController whController) {
stage.setOnCloseRequest(event -> {
try {
whController.close();
System.exit(0);
} catch (Exception e) {
e.printStackTrace();
}
});
this.whController = whController;
}
}

@FXML
private void connect() {
String serverUrl = serverUrlField.getText();
Expand Down