Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrading to Dropwizard 2 #131

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
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
12 changes: 8 additions & 4 deletions legend-shared-opentracing-jersey/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,21 @@
<!-- LEGEND -->

<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
</dependency>
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>javax.ws.rs-api</artifactId>
<groupId>jakarta.ws.rs</groupId>
<artifactId>jakarta.ws.rs-api</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-client</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.inject</groupId>
<artifactId>jersey-hk2</artifactId>
</dependency>

<!-- TEST -->
<dependency>
Expand Down
8 changes: 4 additions & 4 deletions legend-shared-opentracing-servlet-filter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@
<!-- LEGEND -->

<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
</dependency>
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>javax.ws.rs-api</artifactId>
<groupId>jakarta.ws.rs</groupId>
<artifactId>jakarta.ws.rs-api</artifactId>
</dependency>
<dependency>
<groupId>io.opentracing.contrib</groupId>
Expand Down
4 changes: 2 additions & 2 deletions legend-shared-pac4j-kerberos/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
<artifactId>pac4j-kerberos</artifactId>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
Expand Down
8 changes: 6 additions & 2 deletions legend-shared-pac4j/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@
<groupId>org.pac4j</groupId>
<artifactId>dropwizard-pac4j</artifactId>
</dependency>
<dependency>
<groupId>org.pac4j</groupId>
<artifactId>jersey-pac4j</artifactId>
</dependency>
<dependency>
<groupId>org.commonjava.mimeparse</groupId>
<artifactId>mimeparse</artifactId>
Expand All @@ -56,8 +60,8 @@
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>javax.ws.rs-api</artifactId>
<groupId>jakarta.ws.rs</groupId>
<artifactId>jakarta.ws.rs-api</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
import org.pac4j.dropwizard.Pac4jFactory;
import org.pac4j.j2e.filter.SecurityFilter;

import javax.validation.Validation;

import static org.junit.Assert.*;

public class LegendPac4JBundleTest
Expand Down Expand Up @@ -57,7 +59,7 @@ public void testPac4jFactoryWithMultipleClients() throws Exception
LegendPac4jBundle<Configuration> bundle = new LegendPac4jBundle<>(c -> config);
Pac4jFactory factory = bundle.getPac4jFactory(new Configuration());
Config builtConfig = factory.build();
Environment e = new Environment("serverEnv", null, null, new MetricRegistry(), null, new HealthCheckRegistry());
Environment e = new Environment("serverEnv", null, Validation.buildDefaultValidatorFactory(), new MetricRegistry(), null, new HealthCheckRegistry(), new Configuration());
bundle.run(new Configuration(),e);
assertEquals("/test/callback", factory.getCallbackUrl());
assertEquals(config.getClients(), factory.getClients());
Expand Down
16 changes: 4 additions & 12 deletions legend-shared-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,6 @@
</dependency>
<!-- LEGEND -->

<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
</dependency>
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
Expand All @@ -116,20 +112,16 @@

<!-- JAXB - needed in java 11 -->
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-core</artifactId>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
</dependency>
<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
<groupId>jakarta.activation</groupId>
<artifactId>jakarta.activation-api</artifactId>
</dependency>
<!-- JAXB -->

Expand Down
97 changes: 57 additions & 40 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,18 @@

<!-- Dependencies -->
<commons.lang.version>2.6</commons.lang.version>
<dropwizard.version>1.3.29</dropwizard.version>
<dropwizard.version>2.0.28</dropwizard.version>
<dropwizard.pac4j.version>3.0.0</dropwizard.pac4j.version>
<jersay.pac4j.version>3.0.3</jersay.pac4j.version>
<guava.version>30.0-jre</guava.version>
<jackson.annotations.version>2.10.1</jackson.annotations.version>
<jackson.dataformat.yaml.version>2.11.2</jackson.dataformat.yaml.version>
<jakarta.xml.bind.version>2.3.2</jakarta.xml.bind.version>
<javax.jax-rs.version>2.1.1</javax.jax-rs.version>
<javax.activation.version>1.1.1</javax.activation.version>
<javax.servlet.api.version>3.1.0</javax.servlet.api.version>
<jaxb.version>2.3.0</jaxb.version>
<jaxb.runtime.version>2.3.2</jaxb.runtime.version>
<jersey.client.version>2.23.2</jersey.client.version>
<jersey.test.framework.version>2.23.1</jersey.test.framework.version>
<jackson.dataformat.yaml.version>2.12.6</jackson.dataformat.yaml.version>
<jakarta.ws.rs.version>2.1.6</jakarta.ws.rs.version>
<jakarta.activation.version>1.2.2</jakarta.activation.version>
<jakarta.servlet.api.version>4.0.4</jakarta.servlet.api.version>
<jaxb.version>2.3.3</jaxb.version>
<jaxb.runtime.version>2.3.5</jaxb.runtime.version>
<jersey.version>2.35</jersey.version>
<jetty.version>9.4.44.v20210927</jetty.version>
<joda.time.version>2.10.1</joda.time.version>
<junit.version>4.13.1</junit.version>
Expand All @@ -71,11 +70,11 @@
<opentracing.jaxrs2.version>0.5.0</opentracing.jaxrs2.version>
<opentracing.brave.version>0.37.2</opentracing.brave.version>
<opentracing.api.version>0.32.0</opentracing.api.version>
<pac4j.version>3.8.3</pac4j.version>
<pac4j.version>3.9.0</pac4j.version>
<prometheus.version>0.8.1</prometheus.version>
<spring.test.version>4.3.24.RELEASE</spring.test.version>
<spring.boot.autoconfigure.version>2.3.3.RELEASE</spring.boot.autoconfigure.version>
<json-smart.version>2.4.2</json-smart.version>
<json-smart.version>2.4.7</json-smart.version>

<!-- Plugins -->
<maven.javadoc.plugin.version>3.3.1</maven.javadoc.plugin.version>
Expand Down Expand Up @@ -486,8 +485,17 @@
<groupId>org.pac4j</groupId>
<artifactId>pac4j-core</artifactId>
</exclusion>
<exclusion>
<groupId>org.pac4j</groupId>
<artifactId>jersey225-pac4j</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.pac4j</groupId>
<artifactId>jersey-pac4j</artifactId>
<version>${jersay.pac4j.version}</version>
</dependency>
<!-- Pac4j -->

<!-- Jackson -->
Expand All @@ -504,6 +512,13 @@
<!-- Jackson -->

<!-- Dropwizard -->
<dependency>
<groupId>io.dropwizard</groupId>
<artifactId>dropwizard-dependencies</artifactId>
<version>${dropwizard.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>io.dropwizard</groupId>
<artifactId>dropwizard-assets</artifactId>
Expand Down Expand Up @@ -557,12 +572,27 @@
<dependency>
<groupId>org.glassfish.jersey.test-framework.providers</groupId>
<artifactId>jersey-test-framework-provider-grizzly2</artifactId>
<version>${jersey.test.framework.version}</version>
<version>${jersey.version}</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-client</artifactId>
<version>${jersey.client.version}</version>
<version>${jersey.version}</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-common</artifactId>
<version>${jersey.version}</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-server</artifactId>
<version>${jersey.version}</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.inject</groupId>
<artifactId>jersey-hk2</artifactId>
<version>${jersey.version}</version>
</dependency>
<!-- Jersey -->

Expand Down Expand Up @@ -599,13 +629,8 @@

<!-- JAXB - needed in java 11 -->
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>${jaxb.version}</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-core</artifactId>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
<version>${jaxb.version}</version>
</dependency>
<dependency>
Expand All @@ -622,31 +647,23 @@
<version>${jaxb.runtime.version}</version>
</dependency>

<!-- Javax -->
<!-- Jakarta -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>${javax.servlet.api.version}</version>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<version>${jakarta.servlet.api.version}</version>
</dependency>
<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
<version>${javax.activation.version}</version>
<groupId>jakarta.activation</groupId>
<artifactId>jakarta.activation-api</artifactId>
<version>${jakarta.activation.version}</version>
</dependency>
<dependency>
<!-- JAX RS -->
<groupId>javax.ws.rs</groupId>
<artifactId>javax.ws.rs-api</artifactId>
<version>${javax.jax-rs.version}</version>
</dependency>
<!-- Javax -->

<!-- API, java.xml.bind module -->
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
<version>${jakarta.xml.bind.version}</version>
<groupId>jakarta.ws.rs</groupId>
<artifactId>jakarta.ws.rs-api</artifactId>
<version>${jakarta.ws.rs.version}</version>
</dependency>
<!-- Jakarta -->

<!-- Commons -->
<dependency>
Expand Down