Skip to content

Commit

Permalink
Merge pull request #37 from Coreoz/update-jersey
Browse files Browse the repository at this point in the history
Update jersey
  • Loading branch information
amanteaux authored Sep 18, 2024
2 parents b7b273c + 9d5733c commit b332ecc
Show file tree
Hide file tree
Showing 50 changed files with 158 additions and 136 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ A concrete example of how Plume works is the [Plume Mail](plume-mail/) module:
- It provides the [Simple Java Mail](http://www.simplejavamail.org/) dependency
- This module exposes 50 lines of code via the [MailerProvider](https://github.com/Coreoz/Plume/blob/master/plume-mail/src/main/java/com/coreoz/plume/mail/MailerProvider.java) class:
- In the constructor, it populates the config object from Simple Mail Java using [Config](https://github.com/typesafehub/config)
- The `MailerProvider` class implements the `javax.inject.Provider` interface to expose the Simple Mail Java `Mailer` object.
- The `MailerProvider` class implements the `jakarta.inject.Provider` interface to expose the Simple Mail Java `Mailer` object.

In this way, it is easy to replace most of the components suggested by Plume. The only "strong" requirement is to provide dependency injection objects using `javax.inject`.
In this way, it is easy to replace most of the components suggested by Plume. The only "strong" requirement is to provide dependency injection objects using `jakarta.inject`.

Plume is maintained by [Coreoz](http://coreoz.com/)
and licensed under [Apache License 2.0](http://www.apache.org/licenses/LICENSE-2.0).
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.coreoz.plume.conf;

import javax.inject.Inject;
import javax.inject.Provider;
import javax.inject.Singleton;
import jakarta.inject.Inject;
import jakarta.inject.Provider;
import jakarta.inject.Singleton;

import com.typesafe.config.Config;
import com.typesafe.config.ConfigFactory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import dagger.Module;
import dagger.Provides;

import javax.inject.Singleton;
import jakarta.inject.Singleton;

@Module
public class DaggerConfModule {
Expand Down
2 changes: 1 addition & 1 deletion plume-db-querydsl-codegen/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@
</dependencies>
</dependencyManagement>

</project>
</project>
8 changes: 4 additions & 4 deletions plume-db-querydsl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
<dependencies>
<!-- jdk9+ non included Java library required for SQL annotations -->
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
<groupId>jakarta.annotation</groupId>
<artifactId>jakarta.annotation-api</artifactId>
</dependency>

<dependency>
<groupId>com.coreoz</groupId>
<artifactId>plume-db</artifactId>
Expand Down Expand Up @@ -71,4 +71,4 @@
</dependencies>
</dependencyManagement>

</project>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import java.sql.SQLException;
import java.util.function.Supplier;

import javax.inject.Inject;
import javax.inject.Singleton;
import jakarta.inject.Inject;
import jakarta.inject.Singleton;
import javax.sql.DataSource;

import com.coreoz.plume.db.transaction.TransactionManager;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import java.time.temporal.ChronoUnit;
import java.util.List;

import javax.inject.Inject;
import jakarta.inject.Inject;

import org.assertj.core.api.Assertions;
import org.junit.Test;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import java.sql.SQLException;

import javax.inject.Inject;
import jakarta.inject.Inject;
import javax.sql.DataSource;

import org.junit.Test;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import com.querydsl.core.types.dsl.*;

import com.querydsl.core.types.PathMetadata;
import javax.annotation.Generated;
import jakarta.annotation.Generated;
import com.querydsl.core.types.Path;

import com.querydsl.sql.ColumnMetadata;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.coreoz.plume.db.querydsl.db;

import javax.annotation.Generated;
import jakarta.annotation.Generated;
import com.querydsl.sql.Column;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.coreoz.plume.db.querydsl.db;

import javax.inject.Inject;
import javax.inject.Singleton;
import jakarta.inject.Inject;
import jakarta.inject.Singleton;

import com.coreoz.plume.db.querydsl.crud.CrudDaoQuerydsl;
import com.coreoz.plume.db.querydsl.transaction.TransactionManagerQuerydsl;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ public TransactionManagerQuerydsl getTransactionManager() {
return transactionManager;
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import java.sql.SQLException;

import javax.inject.Inject;
import jakarta.inject.Inject;
import javax.sql.DataSource;

import org.junit.Test;
Expand Down
6 changes: 5 additions & 1 deletion plume-db-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@
<artifactId>guice</artifactId>
<groupId>com.google.inject</groupId>
</exclusion>
<exclusion>
<artifactId>javax.inject</artifactId>
<groupId>javax.inject</groupId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
Expand All @@ -67,4 +71,4 @@
</dependencies>
</dependencyManagement>

</project>
</project>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.coreoz.plume.db;

import javax.inject.Inject;
import javax.inject.Singleton;
import jakarta.inject.Inject;
import jakarta.inject.Singleton;
import javax.sql.DataSource;

import org.flywaydb.core.Flyway;
Expand Down
7 changes: 6 additions & 1 deletion plume-db/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@
<artifactId>guava</artifactId>
</dependency>

<dependency>
<groupId>jakarta.annotation</groupId>
<artifactId>jakarta.annotation-api</artifactId>
</dependency>

<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
Expand All @@ -55,4 +60,4 @@
</dependencies>
</dependencyManagement>

</project>
</project>
4 changes: 2 additions & 2 deletions plume-db/src/main/java/com/coreoz/plume/db/crud/CrudDao.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.coreoz.plume.db.crud;

import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import jakarta.annotation.Nonnull;
import jakarta.annotation.Nullable;
import java.util.List;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.coreoz.plume.db.crud;

import javax.annotation.Nullable;
import jakarta.annotation.Nullable;
import java.util.List;
import java.util.Optional;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.coreoz.plume.db.transaction;

import javax.inject.Inject;
import javax.inject.Provider;
import javax.inject.Singleton;
import jakarta.inject.Inject;
import jakarta.inject.Provider;
import jakarta.inject.Singleton;
import javax.sql.DataSource;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
import java.util.function.Consumer;
import java.util.function.Function;

import javax.inject.Inject;
import javax.inject.Singleton;
import jakarta.inject.Inject;
import jakarta.inject.Singleton;
import javax.sql.DataSource;

import com.google.common.base.Throwables;
Expand Down
30 changes: 15 additions & 15 deletions plume-framework-dependencies/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@

<properties>
<wisp.version>2.3.0</wisp.version>
<guice.version>5.1.0</guice.version>
<dagger.version>2.43.2</dagger.version>
<guice.version>7.0.0</guice.version>
<dagger.version>2.52</dagger.version>
<guava.version>32.1.1-jre</guava.version>
<javax-inject.version>1</javax-inject.version>
<jakarta-inject.version>2.0.1</jakarta-inject.version>
<lombok.version>1.18.34</lombok.version>
<logback.version>1.4.0</logback.version>
<slf4j.version>2.0.0</slf4j.version>
Expand All @@ -29,12 +29,12 @@
<sql2o.version>1.6.0</sql2o.version>
<flyway.version>9.3.0</flyway.version>
<h2.version>2.2.220</h2.version>
<jackson.version>2.16.1</jackson.version>
<jersey.version>2.35</jersey.version>
<jackson.version>2.17.2</jackson.version>
<jersey.version>3.1.8</jersey.version>
<swagger.version>2.2.20</swagger.version>
<hk2-guice-bridge.version>2.6.1</hk2-guice-bridge.version>
<hk2-guice-bridge.version>3.1.1</hk2-guice-bridge.version>
<commons-validator.version>1.8.0</commons-validator.version>
<javax-annotation.version>1.3.2</javax-annotation.version>
<jakarta-annotation.version>3.0.0</jakarta-annotation.version>
<dropwizard-metrics.version>4.1.2</dropwizard-metrics.version>
<classgraph.version>4.8.161</classgraph.version>
<maven-model.version>3.9.6</maven-model.version>
Expand Down Expand Up @@ -104,9 +104,9 @@
</dependency>

<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<version>${javax-inject.version}</version>
<groupId>jakarta.inject</groupId>
<artifactId>jakarta.inject</artifactId>
<version>${jakarta-inject.version}</version>
</dependency>

<dependency>
Expand Down Expand Up @@ -201,8 +201,8 @@
</dependency>
<!-- jackson -->
<dependency>
<groupId>com.fasterxml.jackson.jaxrs</groupId>
<artifactId>jackson-jaxrs-json-provider</artifactId>
<groupId>com.fasterxml.jackson.jakarta.rs</groupId>
<artifactId>jackson-jakarta-rs-json-provider</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
Expand Down Expand Up @@ -288,9 +288,9 @@
</dependency>
<!-- XML dependencies that were included in JDK before version 11 -->
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
<version>${javax-annotation.version}</version>
<groupId>jakarta.annotation</groupId>
<artifactId>jakarta.annotation-api</artifactId>
<version>${jakarta-annotation.version}</version>
</dependency>

<!-- metrics -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
import java.nio.charset.StandardCharsets;
import java.util.stream.Collectors;

import javax.inject.Inject;
import javax.inject.Provider;
import javax.inject.Singleton;
import jakarta.inject.Inject;
import jakarta.inject.Provider;
import jakarta.inject.Singleton;

import org.simplejavamail.api.mailer.Mailer;
import org.simplejavamail.config.ConfigLoader;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.coreoz.plume.mail.dagger;

import javax.inject.Singleton;
import jakarta.inject.Singleton;

import org.simplejavamail.api.mailer.Mailer;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.coreoz.plume.scheduler;

import javax.inject.Inject;
import javax.inject.Provider;
import javax.inject.Singleton;
import jakarta.inject.Inject;
import jakarta.inject.Provider;
import jakarta.inject.Singleton;

import com.coreoz.plume.services.time.TimeProvider;
import com.coreoz.wisp.Scheduler;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.coreoz.plume.scheduler.dagger;

import javax.inject.Singleton;
import jakarta.inject.Singleton;

import com.coreoz.plume.dagger.DaggerServicesModule;
import com.coreoz.plume.scheduler.SchedulerProvider;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.coreoz.plume.dagger;

import javax.inject.Singleton;
import jakarta.inject.Singleton;

import com.coreoz.plume.services.time.SystemTimeProvider;
import com.coreoz.plume.services.time.TimeProvider;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import java.time.Clock;

import javax.inject.Inject;
import javax.inject.Singleton;
import jakarta.inject.Inject;
import jakarta.inject.Singleton;

@Singleton
public class SystemTimeProvider implements TimeProvider {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
import com.typesafe.config.Config;
import com.typesafe.config.ConfigFactory;

import javax.inject.Inject;
import javax.inject.Singleton;
import jakarta.inject.Inject;
import jakarta.inject.Singleton;
import java.util.Map;

@Singleton
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
import com.coreoz.plume.jersey.jackson.ObjectMapperProvider;
import com.fasterxml.jackson.databind.ObjectMapper;

import javax.inject.Inject;
import javax.inject.Provider;
import javax.inject.Singleton;
import jakarta.inject.Inject;
import jakarta.inject.Provider;
import jakarta.inject.Singleton;
import java.util.concurrent.TimeUnit;

@Singleton
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import com.codahale.metrics.health.HealthCheckRegistry;
import com.coreoz.plume.jersey.monitoring.utils.health.healthchecks.DatabaseHealthCheck;

import javax.inject.Provider;
import jakarta.inject.Provider;
import java.util.SortedMap;

public class HealthCheckBuilder {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
import org.apache.maven.model.Model;
import org.apache.maven.model.io.xpp3.MavenXpp3Reader;

import javax.inject.Inject;
import javax.inject.Provider;
import javax.inject.Singleton;
import jakarta.inject.Inject;
import jakarta.inject.Provider;
import jakarta.inject.Singleton;
import java.io.File;
import java.io.FileReader;
import java.io.InputStreamReader;
Expand Down
Loading

0 comments on commit b332ecc

Please sign in to comment.