Skip to content

Commit

Permalink
feat: fixing tests and dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
yamilmedina committed Nov 29, 2023
1 parent dbb9576 commit c0ac3f1
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 13 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ WORKDIR ./frontend
RUN npm i
RUN npm run build

FROM maven:3-openjdk-11 AS build
FROM maven:3-openjdk-17 AS build
WORKDIR /app

COPY backend/pom.xml ./
Expand All @@ -18,7 +18,7 @@ COPY backend/ ./

RUN mvn -Dmaven.test.skip=true package

FROM wirebot/runtime:1.3.0 AS runtime
FROM --platform=linux/amd64 wirebot/runtime:1.4.0 AS runtime
LABEL description="Wire Roman"
LABEL project="wire-bots:roman"

Expand Down
62 changes: 52 additions & 10 deletions backend/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
</licenses>

<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

Expand All @@ -32,6 +32,7 @@
<dropwizard.version>4.0.0</dropwizard.version>
<jwt.version>0.11.5</jwt.version>
<junit5.version>5.8.2</junit5.version>
<jetty.version>10.0.18</jetty.version>
</properties>

<dependencyManagement>
Expand Down Expand Up @@ -59,6 +60,10 @@
<groupId>io.dropwizard</groupId>
<artifactId>dropwizard-assets</artifactId>
</dependency>
<dependency>
<groupId>io.dropwizard</groupId>
<artifactId>dropwizard-servlets</artifactId>
</dependency>
<dependency>
<groupId>io.dropwizard-bundles</groupId>
<artifactId>dropwizard-configurable-assets-bundle</artifactId>
Expand All @@ -70,12 +75,6 @@
<version>2.1.1</version>
</dependency>

<dependency>
<groupId>javax</groupId>
<artifactId>javaee-web-api</artifactId>
<version>8.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.wire</groupId>
<artifactId>lithium</artifactId>
Expand Down Expand Up @@ -114,13 +113,56 @@
<scope>runtime</scope>
</dependency>

<!--TODO. replace with jakarta version?-->
<!-- todo, old jee implementation -->
<dependency>
<groupId>jakarta.websocket</groupId>
<artifactId>jakarta.websocket-api</artifactId>
<version>1.1.2</version>
</dependency>
<!-- To run javax.websocket in embedded server -->
<dependency>
<groupId>org.eclipse.jetty.websocket</groupId>
<artifactId>websocket-javax-server</artifactId>
<version>${jetty.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.websocket</groupId>
<artifactId>websocket-jetty-api</artifactId>
<version>${jetty.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.websocket</groupId>
<artifactId>websocket-jetty-server</artifactId>
<version>${jetty.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.websocket</groupId>
<artifactId>javax-websocket-server-impl</artifactId>
<version>9.4.53.v20231009</version>
<version>9.4.51.v20230217</version>
</dependency>

<!-- MIGRATION TO JAKARTA EE 10-->
<!-- <dependency>-->
<!-- <groupId>org.eclipse.jetty.ee10.websocket</groupId>-->
<!-- <artifactId>jetty-ee10-websocket-jetty-api</artifactId>-->
<!-- <version>12.0.0.beta0</version>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>org.eclipse.jetty.ee10.websocket</groupId>-->
<!-- <artifactId>jetty-ee10-websocket-jetty-server</artifactId>-->
<!-- <version>${jetty.version}</version>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>org.eclipse.jetty.ee10.websocket</groupId>-->
<!-- <artifactId>jetty-ee10-websocket-jakarta-server</artifactId>-->
<!-- <version>${jetty.version}</version>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>org.eclipse.jetty.ee10</groupId>-->
<!-- <artifactId>jetty-ee10-servlet</artifactId>-->
<!-- <version>${jetty.version}</version>-->
<!-- </dependency>-->

<!-- test dependencies-->
<dependency>
<groupId>org.mockito</groupId>
Expand Down
2 changes: 1 addition & 1 deletion backend/src/main/java/com/wire/bots/roman/WebSocket.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@ public void onClose(Session session) throws IOException {

@OnError
public void onError(Session session, Throwable throwable) {
Logger.exception(throwable,"%s error: %s", session.getId(), throwable.getMessage());
Logger.exception(throwable, "%s error: %s", session.getId(), throwable.getMessage());
}
}

0 comments on commit c0ac3f1

Please sign in to comment.