Skip to content

Commit

Permalink
Merge pull request #125 from wireapp/chore/cleanup-classpath
Browse files Browse the repository at this point in the history
chore: cleanup classpath dependencies and finalize migration to jakarta
  • Loading branch information
yamilmedina authored Mar 13, 2024
2 parents e87c24d + 62f90c6 commit ed84d74
Show file tree
Hide file tree
Showing 10 changed files with 64 additions and 26 deletions.
61 changes: 50 additions & 11 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.wire</groupId>
<artifactId>lithium</artifactId>
<version>3.6.2</version>
<version>3.6.3</version>
<name>Lithium</name>
<description>Wire Bots SDK written in Java</description>
<url>https://wire.com/</url>
Expand Down Expand Up @@ -34,6 +34,13 @@
<organizationUrl>https://wire.com</organizationUrl>
<timezone>UTC+01:00</timezone>
</developer>
<developer>
<name>Yamil Medina</name>
<email>[email protected]</email>
<organization>Wire Swiss GmbH</organization>
<organizationUrl>https://wire.com</organizationUrl>
<timezone>UTC+01:00</timezone>
</developer>
</developers>

<scm>
Expand All @@ -59,7 +66,8 @@
<maven.test.skip>true</maven.test.skip>
<!-- BEFORE UPGRADING! VERIFY RUNTIME PG VERSION COMPATIBILITY -->
<flyway.version>7.15.0</flyway.version>

<dropwizard.version>4.0.0</dropwizard.version>
<jakarta.version>2.1.1</jakarta.version>
</properties>

<repositories>
Expand All @@ -70,6 +78,18 @@
</repository>
</repositories>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.dropwizard</groupId>
<artifactId>dropwizard-bom</artifactId>
<version>${dropwizard.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>com.wire</groupId>
Expand All @@ -89,38 +109,57 @@
<dependency>
<groupId>io.dropwizard</groupId>
<artifactId>dropwizard-core</artifactId>
<version>4.0.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.dropwizard</groupId>
<artifactId>dropwizard-jdbi3</artifactId>
<version>4.0.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.dropwizard</groupId>
<artifactId>dropwizard-client</artifactId>
<version>4.0.2</version>
</dependency>
<dependency>
<groupId>com.github.smoketurner</groupId>
<artifactId>dropwizard-swagger</artifactId>
<version>72e8441e4a</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>42.6.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-core</artifactId>
<version>${flyway.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>jakarta.annotation</groupId>
<artifactId>jakarta.annotation-api</artifactId>
<version>${jakarta.version}</version>
</dependency>
<dependency>
<groupId>jakarta.validation</groupId>
<artifactId>jakarta.validation-api</artifactId>
<version>3.0.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.smoketurner</groupId>
<artifactId>dropwizard-swagger</artifactId>
<version>4.0.0-1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId>
<version>1.6.13</version>
</dependency>


<dependency>
<groupId>io.dropwizard</groupId>
<artifactId>dropwizard-testing</artifactId>
<version>4.0.2</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/wire/lithium/API.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import com.wire.xenon.models.otr.*;
import com.wire.xenon.tools.Logger;
import com.wire.xenon.tools.Util;
import jakarta.annotation.Nullable;
import jakarta.ws.rs.NotSupportedException;
import jakarta.ws.rs.client.Client;
import jakarta.ws.rs.client.Entity;
Expand All @@ -39,7 +40,6 @@
import org.glassfish.jersey.client.ClientProperties;
import org.glassfish.jersey.logging.LoggingFeature;

import javax.annotation.Nullable;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.net.URI;
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/wire/lithium/Configuration.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
import io.dropwizard.client.JerseyClientConfiguration;
import io.dropwizard.db.DataSourceFactory;
import io.federecio.dropwizard.swagger.SwaggerBundleConfiguration;
import jakarta.validation.Valid;
import jakarta.validation.constraints.NotNull;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;

/**
* Application configuration class. Extend this class to add your custom configuration
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/wire/lithium/Server.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@
import io.dropwizard.core.setup.Bootstrap;
import io.dropwizard.core.setup.Environment;
import io.dropwizard.servlets.tasks.Task;
import jakarta.annotation.Nullable;
import jakarta.ws.rs.client.Client;
import org.flywaydb.core.Flyway;
import org.jdbi.v3.core.Jdbi;
import org.jdbi.v3.sqlobject.SqlObjectPlugin;

import javax.annotation.Nullable;
import java.util.SortedMap;
import java.util.concurrent.TimeUnit;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
import ch.qos.logback.core.spi.FilterReply;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import jakarta.annotation.Nullable;
import org.jboss.logging.MDC;

import javax.annotation.Nullable;
import java.time.Instant;
import java.time.ZoneOffset;
import java.time.format.DateTimeFormatter;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.wire.lithium.server.monitoring;

import jakarta.annotation.Nullable;
import jakarta.validation.constraints.NotNull;
import org.slf4j.MDC;

import javax.annotation.Nullable;
import javax.validation.constraints.NotNull;

public class MDCUtils {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package com.wire.lithium.server.monitoring;

import jakarta.annotation.Nullable;
import jakarta.ws.rs.container.ContainerRequestContext;
import jakarta.ws.rs.container.ContainerRequestFilter;
import jakarta.ws.rs.ext.Provider;
import org.slf4j.MDC;

import javax.annotation.Nullable;
import java.util.UUID;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.Produces;
import jakarta.ws.rs.core.MediaType;
import jakarta.ws.rs.core.Response;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.RandomAccessFile;

@Api
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
import jakarta.ws.rs.core.MediaType;
import jakarta.ws.rs.core.Response;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import jakarta.validation.Valid;
import jakarta.validation.constraints.NotNull;
import java.util.UUID;

@Api
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,8 @@
import jakarta.ws.rs.*;
import jakarta.ws.rs.core.MediaType;
import jakarta.ws.rs.core.Response;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import jakarta.validation.Valid;
import jakarta.validation.constraints.NotNull;
import java.io.IOException;
import java.util.UUID;
import java.util.logging.Level;
Expand Down

0 comments on commit ed84d74

Please sign in to comment.