From e63364219ed3e6e0a28e1070ad46c9401c088713 Mon Sep 17 00:00:00 2001 From: Olivier Maury <Olivier.Maury@inrae.fr> Date: Mon, 2 Dec 2024 18:17:24 +0100 Subject: [PATCH] =?UTF-8?q?build(deps):=20=E2=AC=86=20Mettre=20=C3=A0=20jo?= =?UTF-8?q?ur=20les=20d=C3=A9pendances?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Passer à GWT-2.12.1, JDK-17 pour GWT --- pom.xml | 61 ++++++++----------- src/site/site.xml | 4 +- www-client/pom.xml | 10 +-- www-server/pom.xml | 10 +-- .../www/server/rs/ApplicationResource.java | 10 +-- .../www/server/rs/GeometryResource.java | 6 +- .../www/server/rs/IndicatorResource.java | 22 +++---- .../www/server/rs/SurveyFormResource.java | 16 ++--- www-shared/pom.xml | 10 +-- 9 files changed, 70 insertions(+), 79 deletions(-) diff --git a/pom.xml b/pom.xml index 16f32c2..1e075c4 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ <modelVersion>4.0.0</modelVersion> <groupId>fr.agrometinfo</groupId> <artifactId>www</artifactId> - <version>2.0.2</version> + <version>2.0.3-SNAPSHOT</version> <packaging>pom</packaging> <name>AgroMetInfo web app</name> <description>Web application for AgroMetInfo.</description> @@ -62,17 +62,17 @@ </ciManagement> <properties> <!-- Dependencies versions --> - <domino.rest.version>2.0.0-RC1</domino.rest.version> + <domino.rest.version>2.0.0-RC2</domino.rest.version> <domino.ui.version>1.0.7</domino.ui.version> - <domino.jackson.version>1.0.4</domino.jackson.version> + <domino.jackson.version>1.0.5</domino.jackson.version> <domino.mvp.version>1.0.1</domino.mvp.version> - <gwt.version>2.11.0</gwt.version> - <hibernate.version>6.2.22.Final</hibernate.version> + <gwt.version>2.12.1</gwt.version> + <hibernate.version>6.6.3.Final</hibernate.version> <jax.rs.version>3.1.0</jax.rs.version> - <jersey.version>3.1.8</jersey.version> - <junit.version>5.10.3</junit.version> - <log4j.version>2.24.1</log4j.version> - <lombok.version>1.18.30</lombok.version> + <jersey.version>3.1.9</jersey.version> + <junit.version>5.11.3</junit.version> + <log4j.version>2.24.2</log4j.version> + <lombok.version>1.18.36</lombok.version> <weld.version>4.0.3.Final</weld.version> <!-- Maven environment values --> <build.date>${maven.build.timestamp}</build.date> @@ -88,14 +88,14 @@ <checkstyle.includeResources>false</checkstyle.includeResources> <checkstyle.includeTestResources>false</checkstyle.includeTestResources> <checkstyle.includeTestSourceDirectory>true</checkstyle.includeTestSourceDirectory> - <checkstyle.version>3.3.1</checkstyle.version> + <checkstyle.version>3.6.0</checkstyle.version> <compiler-plugin.version>3.13.0</compiler-plugin.version> - <jacoco.version>0.8.11</jacoco.version> - <javadoc.version>3.6.2</javadoc.version> + <jacoco.version>0.8.12</jacoco.version> + <javadoc.version>3.11.1</javadoc.version> <javase.api.link>https://docs.oracle.com/en/java/javase/17/docs/api/</javase.api.link> - <pmd.version>3.25.0</pmd.version> + <pmd.version>3.26.0</pmd.version> <sloccount.path>bin/sloccount.sh</sloccount.path> - <spotbugs.version>4.8.2.0</spotbugs.version> + <spotbugs.version>4.8.6.6</spotbugs.version> <!-- Text format --> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> @@ -233,7 +233,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-enforcer-plugin</artifactId> - <version>3.4.1</version> + <version>3.5.0</version> <executions> <execution> <id>enforce-versions</id> @@ -263,21 +263,21 @@ <configuration> <failOnError>true</failOnError> <launcherDir>${project.build.directory}/gwt/launcherDir</launcherDir> - <sourceLevel>1.11</sourceLevel> + <sourceLevel>auto</sourceLevel> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> - <version>3.2.5</version> + <version>3.5.2</version> </plugin> <!-- Compute buildNumber --> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>buildnumber-maven-plugin</artifactId> - <version>3.2.0</version> + <version>3.2.1</version> <executions> <execution> <phase>validate</phase> @@ -299,9 +299,9 @@ <!-- Count lines of code. --> <plugin> - <artifactId>exec-maven-plugin</artifactId> <groupId>org.codehaus.mojo</groupId> - <version>3.2.0</version> + <artifactId>exec-maven-plugin</artifactId> + <version>3.5.0</version> <executions> <execution> <phase>package</phase> @@ -405,19 +405,8 @@ </execution> </executions> </plugin> - - <!-- mvn pdf:pdf --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-pdf-plugin</artifactId> - <version>1.6.1</version> - <configuration> - <includeReports>false</includeReports> - <locales>en,fr</locales> - </configuration> - </plugin> - </plugins> + <pluginManagement> <plugins> <plugin> @@ -431,7 +420,7 @@ <version>1.1.0</version> <extensions>true</extensions> <configuration> - <sourceLevel>1.11</sourceLevel> + <sourceLevel>auto</sourceLevel> <failOnError>true</failOnError> </configuration> </plugin> @@ -519,12 +508,12 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-project-info-reports-plugin</artifactId> - <version>3.7.0</version> + <version>3.8.0</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-site-plugin</artifactId> - <version>3.20.0</version> + <version>3.21.0</version> </plugin> <plugin> <groupId>com.github.spotbugs</groupId> @@ -566,7 +555,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jxr-plugin</artifactId> - <version>3.5.0</version> + <version>3.6.0</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> diff --git a/src/site/site.xml b/src/site/site.xml index 9a24083..bbc1ae5 100644 --- a/src/site/site.xml +++ b/src/site/site.xml @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE xml> -<project xmlns="http://maven.apache.org/DECORATION/1.6.0" +<project xmlns="http://maven.apache.org/DECORATION/1.7.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/DECORATION/1.6.0 http://maven.apache.org/xsd/decoration-1.6.0.xsd" + xsi:schemaLocation="http://maven.apache.org/DECORATION/1.7.0 http://maven.apache.org/xsd/decoration-1.7.0.xsd" name="${project.name}"> <skin> <groupId>org.apache.maven.skins</groupId> diff --git a/www-client/pom.xml b/www-client/pom.xml index 5e86f87..bfff8b0 100644 --- a/www-client/pom.xml +++ b/www-client/pom.xml @@ -7,7 +7,7 @@ <parent> <groupId>fr.agrometinfo</groupId> <artifactId>www</artifactId> - <version>2.0.2</version> + <version>2.0.3-SNAPSHOT</version> </parent> <artifactId>www-client</artifactId> @@ -16,10 +16,10 @@ <properties> <!-- Maven environment values --> - <maven.compiler.source>11</maven.compiler.source> - <maven.compiler.target>11</maven.compiler.target> - <maven.compiler.testSource>11</maven.compiler.testSource> - <maven.compiler.testTarget>11</maven.compiler.testTarget> + <maven.compiler.source>17</maven.compiler.source> + <maven.compiler.target>17</maven.compiler.target> + <maven.compiler.testSource>17</maven.compiler.testSource> + <maven.compiler.testTarget>17</maven.compiler.testTarget> <!-- Tools --> <checkstyle.config.location>file://${basedir}/../config/sun_checks.xml</checkstyle.config.location> </properties> diff --git a/www-server/pom.xml b/www-server/pom.xml index 5e88e67..62b7a88 100644 --- a/www-server/pom.xml +++ b/www-server/pom.xml @@ -7,7 +7,7 @@ <parent> <groupId>fr.agrometinfo</groupId> <artifactId>www</artifactId> - <version>2.0.2</version> + <version>2.0.3-SNAPSHOT</version> </parent> <artifactId>www-server</artifactId> @@ -15,9 +15,9 @@ <name>AgroMetInfo web app - server</name> <properties> - <mockito-core.version>5.12.0</mockito-core.version> + <mockito-core.version>5.14.2</mockito-core.version> <sava.version>1.0.0</sava.version> - <swagger.version>2.2.20</swagger.version> + <swagger.version>2.2.26</swagger.version> <checkstyle.config.location>file://${basedir}/../config/sun_checks.xml</checkstyle.config.location> </properties> @@ -153,13 +153,13 @@ <dependency> <groupId>org.postgresql</groupId> <artifactId>postgresql</artifactId> - <version>42.7.3</version> + <version>42.7.4</version> </dependency> <!-- JSTL --> <dependency> <groupId>jakarta.servlet.jsp.jstl</groupId> <artifactId>jakarta.servlet.jsp.jstl-api</artifactId> - <version>3.0.0</version> + <version>3.0.2</version> </dependency> <dependency> <groupId>org.glassfish.web</groupId> diff --git a/www-server/src/main/java/fr/agrometinfo/www/server/rs/ApplicationResource.java b/www-server/src/main/java/fr/agrometinfo/www/server/rs/ApplicationResource.java index c843f96..91ba0c7 100644 --- a/www-server/src/main/java/fr/agrometinfo/www/server/rs/ApplicationResource.java +++ b/www-server/src/main/java/fr/agrometinfo/www/server/rs/ApplicationResource.java @@ -1,9 +1,9 @@ package fr.agrometinfo.www.server.rs; -import fr.agroclim.sava.core.SavaUtils; import java.util.Date; import java.util.List; +import fr.agroclim.sava.core.SavaUtils; import fr.agrometinfo.www.server.AgroMetInfoConfiguration; import fr.agrometinfo.www.server.AgroMetInfoConfiguration.ConfigurationKey; import fr.agrometinfo.www.server.dao.DailyVisitDao; @@ -77,19 +77,19 @@ public class ApplicationResource implements ApplicationService { private CacheService cacheService; @GET - @Path(ApplicationService.PATH_EMPTY_CACHE) + @Path(PATH_EMPTY_CACHE) @Override public void emptyCache() { cacheService.emptyCacheDirectory(); } @GET - @Path(ApplicationService.PATH_APPLICATION_DATE) + @Path(PATH_APPLICATION_DATE) @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) @Override public Date getApplicationDate() { // this is the first call, so register the visit. - var environment = configuration.get(ConfigurationKey.ENVIRONMENT); + final var environment = configuration.get(ConfigurationKey.ENVIRONMENT); dailyVisitDao.increment(environment); SavaUtils.incrementCounter("visits", null); return applicationDate; @@ -104,7 +104,7 @@ public class ApplicationResource implements ApplicationService { } @POST - @Path(ApplicationService.PATH_SEND_EMAIL) + @Path(PATH_SEND_EMAIL) @Override public String sendMessage(final MessageDTO message) { LOGGER.traceEntry(); diff --git a/www-server/src/main/java/fr/agrometinfo/www/server/rs/GeometryResource.java b/www-server/src/main/java/fr/agrometinfo/www/server/rs/GeometryResource.java index 8332567..c3210f2 100644 --- a/www-server/src/main/java/fr/agrometinfo/www/server/rs/GeometryResource.java +++ b/www-server/src/main/java/fr/agrometinfo/www/server/rs/GeometryResource.java @@ -66,7 +66,7 @@ public class GeometryResource implements GeometryService { * @return Geometry of PRA with name and code */ @GET - @Path(GeometryService.PATH_PRA) + @Path(PATH_PRA) @Produces("application/geo+json") public FeatureCollection getPraAsGeoJSON() { final List<Pra> values = praDao.findAll(); @@ -83,11 +83,11 @@ public class GeometryResource implements GeometryService { @SuppressWarnings("unchecked") @Override @GET - @Path(GeometryService.PATH_PRA_NAMES) + @Path(PATH_PRA_NAMES) @Produces(MediaType.APPLICATION_JSON) public Map<String, String> getPraAsJSON() { // HTTP cache headers - cacheService.setCacheKey(GeometryService.PATH, GeometryService.PATH_PRA); + cacheService.setCacheKey(PATH, PATH_PRA); cacheService.setHeaders(httpHeaders); if (!cacheService.needsResponse(request)) { return Map.of(); diff --git a/www-server/src/main/java/fr/agrometinfo/www/server/rs/IndicatorResource.java b/www-server/src/main/java/fr/agrometinfo/www/server/rs/IndicatorResource.java index 14a3f8c..8601289 100644 --- a/www-server/src/main/java/fr/agrometinfo/www/server/rs/IndicatorResource.java +++ b/www-server/src/main/java/fr/agrometinfo/www/server/rs/IndicatorResource.java @@ -224,7 +224,7 @@ public class IndicatorResource implements IndicatorService { } @GET - @Path(IndicatorService.PATH_LAST_MODIFICATION) + @Path(PATH_LAST_MODIFICATION) @Override public Date getLastModification() { return DateUtils.toDate(cacheService.getLastModification().toLocalDate()); @@ -232,14 +232,14 @@ public class IndicatorResource implements IndicatorService { @SuppressWarnings("unchecked") @GET - @Path(IndicatorService.PATH_LIST) + @Path(PATH_LIST) @Produces(MediaType.APPLICATION_JSON) @Override public List<PeriodDTO> getPeriods(@QueryParam(value = "year") @NonNull final Integer year) { LOGGER.traceEntry(); final var locale = LocaleUtils.getLocale(httpServletRequest); // HTTP cache headers - cacheService.setCacheKey(IndicatorService.PATH, IndicatorService.PATH_LIST, year, locale); + cacheService.setCacheKey(PATH, PATH_LIST, year, locale); cacheService.setHeaders(httpHeaders); if (!cacheService.needsResponse(request)) { return List.of(); @@ -276,12 +276,12 @@ public class IndicatorResource implements IndicatorService { @SuppressWarnings("unchecked") @GET - @Path(IndicatorService.PATH_REGIONS) + @Path(PATH_REGIONS) @Produces(MediaType.APPLICATION_JSON) @Override public Map<String, String> getRegions(@QueryParam(value = "year") @NonNull final Integer year) { // HTTP cache headers - cacheService.setCacheKey(IndicatorService.PATH, IndicatorService.PATH_REGIONS, year); + cacheService.setCacheKey(PATH, PATH_REGIONS, year); cacheService.setHeaders(httpHeaders); if (!cacheService.needsResponse(request)) { return Map.of(); @@ -300,7 +300,7 @@ public class IndicatorResource implements IndicatorService { } @GET - @Path(IndicatorService.PATH_SUMMARY) + @Path(PATH_SUMMARY) @Produces(MediaType.APPLICATION_JSON) @Override public SummaryDTO getSummary(@QueryParam(value = "indicator") final String indicatorUid, @@ -313,7 +313,7 @@ public class IndicatorResource implements IndicatorService { checkRequired(year, "year"); final var locale = LocaleUtils.getLocale(httpServletRequest); // HTTP cache headers - cacheService.setCacheKey(IndicatorService.PATH, IndicatorService.PATH_SUMMARY, locale, indicatorUid, periodCode, + cacheService.setCacheKey(PATH, PATH_SUMMARY, locale, indicatorUid, periodCode, level, id, year); cacheService.setHeaders(httpHeaders); if (!cacheService.needsResponse(request)) { @@ -416,7 +416,7 @@ public class IndicatorResource implements IndicatorService { } @GET - @Path(IndicatorService.PATH_VALUES) + @Path(PATH_VALUES) @Produces("application/geo+json") @Override public FeatureCollection getValues(@QueryParam(value = "indicator") final String indicatorUid, @@ -427,7 +427,7 @@ public class IndicatorResource implements IndicatorService { checkRequired(periodCode, "period"); checkRequired(year, "year"); final var locale = LocaleUtils.getLocale(httpServletRequest); - cacheService.setCacheKey(IndicatorService.PATH, IndicatorService.PATH_VALUES, indicatorUid, periodCode, + cacheService.setCacheKey(PATH, PATH_VALUES, indicatorUid, periodCode, regionId, year, comparison, locale); // HTTP cache headers cacheService.setHeaders(httpHeaders); @@ -478,12 +478,12 @@ public class IndicatorResource implements IndicatorService { @SuppressWarnings("unchecked") @GET - @Path(IndicatorService.PATH_YEARS) + @Path(PATH_YEARS) @Produces(MediaType.APPLICATION_JSON) @Override public List<Integer> getYears() { // HTTP cache headers - cacheService.setCacheKey(IndicatorService.PATH, IndicatorService.PATH_YEARS); + cacheService.setCacheKey(PATH, PATH_YEARS); cacheService.setHeaders(httpHeaders); if (!cacheService.needsResponse(request)) { return List.of(); diff --git a/www-server/src/main/java/fr/agrometinfo/www/server/rs/SurveyFormResource.java b/www-server/src/main/java/fr/agrometinfo/www/server/rs/SurveyFormResource.java index 0f03095..6be1db7 100644 --- a/www-server/src/main/java/fr/agrometinfo/www/server/rs/SurveyFormResource.java +++ b/www-server/src/main/java/fr/agrometinfo/www/server/rs/SurveyFormResource.java @@ -1,25 +1,25 @@ package fr.agrometinfo.www.server.rs; -import fr.agrometinfo.www.server.AgroMetInfoConfiguration; import java.time.LocalDateTime; import java.util.List; import java.util.stream.Collectors; -import fr.agrometinfo.www.server.dao.SurveyQuestionDao; +import fr.agrometinfo.www.server.AgroMetInfoConfiguration; import fr.agrometinfo.www.server.dao.SurveyOptionDao; +import fr.agrometinfo.www.server.dao.SurveyQuestionDao; import fr.agrometinfo.www.server.dao.UserEmailDao; import fr.agrometinfo.www.server.dao.UserResponsesDao; import fr.agrometinfo.www.server.exception.AgroMetInfoException; -import fr.agrometinfo.www.server.model.SurveyQuestion; import fr.agrometinfo.www.server.model.SurveyOption; +import fr.agrometinfo.www.server.model.SurveyQuestion; import fr.agrometinfo.www.server.service.MailService; import fr.agrometinfo.www.server.service.MailService.Mail; import fr.agrometinfo.www.server.service.MailServiceImpl; import fr.agrometinfo.www.server.util.EmailUtils; import fr.agrometinfo.www.shared.dto.ErrorResponseDTO; -import fr.agrometinfo.www.shared.dto.SurveyResponseDTO; -import fr.agrometinfo.www.shared.dto.SurveyQuestionDTO; import fr.agrometinfo.www.shared.dto.SurveyOptionDTO; +import fr.agrometinfo.www.shared.dto.SurveyQuestionDTO; +import fr.agrometinfo.www.shared.dto.SurveyResponseDTO; import fr.agrometinfo.www.shared.service.SurveyFormService; import jakarta.enterprise.context.RequestScoped; import jakarta.inject.Inject; @@ -134,16 +134,18 @@ public class SurveyFormResource implements SurveyFormService { ).build()); } } + @GET - @Path(SurveyFormService.PATH_RESPONSES_LIST) + @Path(PATH_RESPONSES_LIST) @Produces(MediaType.APPLICATION_JSON) @Override public List<SurveyOptionDTO> getResponses() { return responsesDao.findAll().stream() .map(SurveyFormResource::toDto).collect(Collectors.toList()); } + @POST - @Path(SurveyFormService.PATH_INSERT_RESPONSE) + @Path(PATH_INSERT_RESPONSE) @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) @Override diff --git a/www-shared/pom.xml b/www-shared/pom.xml index 95edcf8..e8fbb20 100644 --- a/www-shared/pom.xml +++ b/www-shared/pom.xml @@ -7,7 +7,7 @@ <parent> <groupId>fr.agrometinfo</groupId> <artifactId>www</artifactId> - <version>2.0.2</version> + <version>2.0.3-SNAPSHOT</version> </parent> <artifactId>www-shared</artifactId> @@ -15,10 +15,10 @@ <properties> <!-- Maven environment values --> - <maven.compiler.source>11</maven.compiler.source> - <maven.compiler.target>11</maven.compiler.target> - <maven.compiler.testSource>11</maven.compiler.testSource> - <maven.compiler.testTarget>11</maven.compiler.testTarget> + <maven.compiler.source>17</maven.compiler.source> + <maven.compiler.target>17</maven.compiler.target> + <maven.compiler.testSource>17</maven.compiler.testSource> + <maven.compiler.testTarget>17</maven.compiler.testTarget> <!-- Tools --> <checkstyle.config.location>file://${basedir}/../config/sun_checks.xml</checkstyle.config.location> </properties> -- GitLab