Skip to content

Commit

Permalink
dependency: migrate to version v4.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
lpandath authored and rekt-hard committed Oct 16, 2024
1 parent 8e82a7f commit a9b9a75
Show file tree
Hide file tree
Showing 6 changed files with 118 additions and 85 deletions.
65 changes: 47 additions & 18 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<groupId>at.medunigraz</groupId>
<artifactId>damap-be</artifactId>
<version>0.3.0-beta.1</version>
<version>0.3.1-beta.1</version>

<name>${project.groupId}:${project.artifactId}</name>
<description>A tool for machine actionable DMPs.</description>
Expand Down Expand Up @@ -51,7 +51,7 @@
<dependency>
<groupId>org.damap</groupId>
<artifactId>base</artifactId>
<version>4.1.0</version>
<version>4.2.0</version>
</dependency>
<!-- Test -->
<dependency>
Expand All @@ -64,6 +64,11 @@
<artifactId>quarkus-junit5</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-junit5-component</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-junit5-mockito</artifactId>
Expand Down Expand Up @@ -96,36 +101,32 @@
<!-- Rest -->
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-resteasy-multipart</artifactId>
<artifactId>quarkus-rest</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-resteasy</artifactId>
<artifactId>quarkus-rest-jackson</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-resteasy-client</artifactId>
<artifactId>quarkus-rest-client</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-resteasy-client-jaxb</artifactId>
<artifactId>quarkus-rest-client-jaxb</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-resteasy-jaxb</artifactId>
<artifactId>quarkus-rest-client-jackson</artifactId>
</dependency>
<!-- Authentication -->
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-resteasy-jackson</artifactId>
<artifactId>quarkus-oidc</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-jaxb</artifactId>
</dependency>
<!-- Authentication -->
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-oidc</artifactId>
<artifactId>quarkus-smallrye-jwt</artifactId>
</dependency>
<!-- Database -->
<dependency>
Expand Down Expand Up @@ -210,7 +211,29 @@
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>${compiler-plugin.version}</version>
<configuration>
<parameters>${maven.compiler.parameters}</parameters>
</configuration>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>${surefire-plugin.version}</version>
<configuration>
<systemProperties>
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
<maven.home>${maven.home}</maven.home>
</systemProperties>
</configuration>
</plugin>
<plugin>
<!--
These are plugins which we do not nessesary need it:
maven-compiler-plugin: org.codehaus.mojo: generates java classes which we use from base (xsd)
maven-deploy-plugin: we do not call deploy in any pipelin jsonschema2pojo-maven-plugin: generates java classes which we use from base (json)
-->
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>${spotless.version}</version>
Expand All @@ -221,9 +244,10 @@
<include>src/main/java/**/*.java</include>
<include>src/test/java/**/*.java</include>
</includes>

<!-- Cleanthat will refactor your code, but it may break your style: apply it before
your formatter -->
<!--
Cleanthat will refactor your code, but it may break your style: apply it before
your formatter
-->
<cleanthat />
<googleJavaFormat></googleJavaFormat>
<importOrder /> <!-- standard import order -->
Expand All @@ -246,6 +270,7 @@
<version>4.28.0</version>
</plugin>
</plugins>
<!-- jandex-maven-plugin: generates indexes of exported classes of the base-->
</build>
<profiles>
<profile>
Expand Down Expand Up @@ -285,5 +310,9 @@
<quarkus.package.jar.enabled>false</quarkus.package.jar.enabled>
</properties>
</profile>
<!--
sonar: usecase: if you call maven with this profile, sonarsource we be used:
deploy-mvn-repository: is used only for dep of the base
-->
</profiles>
</project>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
package at.medunigraz.api.rest.base.services;

import at.medunigraz.api.rest.base.models.MUGSearchResult;
import at.medunigraz.damap.rest.dmp.domain.MUGPerson;
import jakarta.ws.rs.Consumes;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.PathParam;
import jakarta.ws.rs.Produces;
import jakarta.ws.rs.QueryParam;
import jakarta.ws.rs.core.MediaType;
import java.util.List;
import org.eclipse.microprofile.rest.client.annotation.RegisterClientHeaders;

@Produces(MediaType.APPLICATION_JSON)
@RegisterClientHeaders(value = AuthorizationClientHeadersFactory.class)
public interface MUGAPIPersonServiceBase {

// The API currently applies an AND operation for each filter (i.e.
// first_name__contains AND last_name__contains). Currenly, we only search
// for one field, as we do not know how people will search.
@GET
@Path("")
MUGSearchResult<MUGPerson> search(
@QueryParam("last_name__icontains") String firstName,
@QueryParam("offset") int offset,
@QueryParam("limit") int limit,
@QueryParam("expand") List<String> expand);

@GET
@Path("/{id}")
@Consumes(value = "application/json")
MUGPerson read(@PathParam("id") String id, @QueryParam("expand") List<String> expand);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package at.medunigraz.api.rest.base.services;

import at.medunigraz.api.rest.base.models.MUGSearchResult;
import at.medunigraz.damap.rest.dmp.domain.MUGProject;
import jakarta.ws.rs.Consumes;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.PathParam;
import jakarta.ws.rs.Produces;
import jakarta.ws.rs.QueryParam;
import jakarta.ws.rs.core.MediaType;
import java.time.Instant;
import java.util.List;
import org.eclipse.microprofile.rest.client.annotation.ClientHeaderParam;
import org.eclipse.microprofile.rest.client.annotation.RegisterClientHeaders;

@Produces(MediaType.APPLICATION_JSON)
@RegisterClientHeaders(value = AuthorizationClientHeadersFactory.class)
public interface MUGAPIProjectServiceBase {
@GET
@Path("")
@ClientHeaderParam(name = "accept", value = "application/json")
MUGSearchResult<MUGProject> search(
@QueryParam("title") String title,
@QueryParam("end_effective__gte") Instant endEffective,
@QueryParam("offset") int offset,
@QueryParam("limit") int limit);

@GET
@Path("/{id}")
@Consumes(value = "application/json")
MUGProject read(@PathParam("id") String id, @QueryParam("expand") List<String> expand);
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,30 +1,12 @@
package at.medunigraz.damap.rest.persons;

import at.medunigraz.api.rest.base.models.MUGSearchResult;
import at.medunigraz.api.rest.base.services.AuthorizationClientHeadersFactory;
import at.medunigraz.api.rest.base.services.MUGAPIServiceBase;
import at.medunigraz.damap.rest.dmp.domain.MUGPerson;
import at.medunigraz.api.rest.base.services.MUGAPIPersonServiceBase;
import jakarta.enterprise.context.ApplicationScoped;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.QueryParam;
import java.util.List;
import org.eclipse.microprofile.rest.client.annotation.RegisterClientHeaders;
import org.eclipse.microprofile.rest.client.inject.RegisterRestClient;

@ApplicationScoped
@RegisterRestClient(configKey = "rest.persons")
@RegisterClientHeaders(value = AuthorizationClientHeadersFactory.class)
public interface MUGPersonRestService extends MUGAPIServiceBase<MUGPerson> {

// The API currently applies an AND operation for each filter (i.e.
// first_name__contains AND last_name__contains). Currenly, we only search
// for one field, as we do not know how people will search.
@GET
@Path("")
MUGSearchResult<MUGPerson> search(
@QueryParam("last_name__icontains") String firstName,
@QueryParam("offset") int offset,
@QueryParam("limit") int limit,
@QueryParam("expand") List<String> expand);
}
public interface MUGPersonRestService extends MUGAPIPersonServiceBase {}
Original file line number Diff line number Diff line change
@@ -1,23 +1,7 @@
package at.medunigraz.damap.rest.projects;

import at.medunigraz.api.rest.base.models.MUGSearchResult;
import at.medunigraz.api.rest.base.services.MUGAPIServiceBase;
import at.medunigraz.damap.rest.dmp.domain.MUGProject;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.QueryParam;
import java.time.Instant;
import org.eclipse.microprofile.rest.client.annotation.ClientHeaderParam;
import at.medunigraz.api.rest.base.services.MUGAPIProjectServiceBase;
import org.eclipse.microprofile.rest.client.inject.RegisterRestClient;

@RegisterRestClient(configKey = "rest.projects")
public interface MUGProjectRestService extends MUGAPIServiceBase<MUGProject> {
@GET
@Path("")
@ClientHeaderParam(name = "accept", value = "application/json")
MUGSearchResult<MUGProject> search(
@QueryParam("title") String title,
@QueryParam("end_effective__gte") Instant endEffective,
@QueryParam("offset") int offset,
@QueryParam("limit") int limit);
}
public interface MUGProjectRestService extends MUGAPIProjectServiceBase {}

0 comments on commit a9b9a75

Please sign in to comment.