Skip to content

Commit

Permalink
Add required dependencies explicitly in the POM (#120)
Browse files Browse the repository at this point in the history
* Add error_prone_annotations dependency and add CanIgnoreReturnValue to
ValidatingInvoker#validate method.
* Add guava dependency
* Add jakarta.servlet-api dependency
* Add jakarta.validation-api dependency
* Add jakarta.xml.ws-api dependency
* Add slf4j-api dependency
* Move the two provided dependencies to a separate "Provided
dependencies" section in the POM

Closes #118
Closes #119
  • Loading branch information
sleberknight authored Jul 5, 2024
1 parent 206d5eb commit 5135d8c
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 11 deletions.
62 changes: 51 additions & 11 deletions dropwizard-jakarta-xml-ws/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,27 @@
<artifactId>dropwizard-jakarta-xml-ws</artifactId>
<name>Dropwizard Jakarta XML Web Services Bundle</name>

<properties>
<jakarta.xml.ws-api.version>3.0.1</jakarta.xml.ws-api.version>
</properties>

<dependencies>

<!-- Required dependencies -->

<dependency>
<groupId>org.checkerframework</groupId>
<artifactId>checker-qual</artifactId>
</dependency>

<dependency>
<groupId>io.dropwizard</groupId>
<artifactId>dropwizard-core</artifactId>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>io.dropwizard</groupId>
<artifactId>dropwizard-auth</artifactId>
<scope>provided</scope>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_annotations</artifactId>
</dependency>

<dependency>
<groupId>io.dropwizard</groupId>
<artifactId>dropwizard-hibernate</artifactId>
<scope>provided</scope>
<artifactId>dropwizard-core</artifactId>
</dependency>

<dependency>
Expand All @@ -48,6 +46,48 @@
<version>${cxf.version}</version>
</dependency>

<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</dependency>

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

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

<dependency>
<groupId>jakarta.xml.ws</groupId>
<artifactId>jakarta.xml.ws-api</artifactId>
<version>${jakarta.xml.ws-api.version}</version>
</dependency>

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>

<!-- Provided dependencies -->

<dependency>
<groupId>io.dropwizard</groupId>
<artifactId>dropwizard-auth</artifactId>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>io.dropwizard</groupId>
<artifactId>dropwizard-hibernate</artifactId>
<scope>provided</scope>
</dependency>

<!-- Test dependencies -->

<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-testutils</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import static java.util.Objects.isNull;
import static java.util.Objects.nonNull;

import com.google.errorprone.annotations.CanIgnoreReturnValue;
import io.dropwizard.validation.ConstraintViolations;
import io.dropwizard.validation.Validated;
import jakarta.validation.Valid;
Expand Down Expand Up @@ -79,6 +80,7 @@ public Object invoke(Exchange exchange, Object o) {
* for null parameter values:
* java.lang.IllegalArgumentException: HV000116: The object to be validated must not be null.
*/
@CanIgnoreReturnValue
private Object validate(Annotation[] annotations, Object value) {
var classes = findValidationGroups(annotations);

Expand Down

0 comments on commit 5135d8c

Please sign in to comment.