From 0fcdb36ee331c997e4a229b6b7796598a8d8450f Mon Sep 17 00:00:00 2001 From: davdarras Date: Mon, 23 Sep 2024 19:24:35 +0200 Subject: [PATCH 1/3] fix: upgrade lib versions --- pom.xml | 194 ++++-------------- .../batch/config/ApplicationContext.java | 39 +--- .../impl/ContextReferentialServiceImpl.java | 9 +- .../service/impl/HabilitationServiceImpl.java | 11 +- .../batch/template/CreatedInterviewers.java | 10 +- .../CreatedInterviewersAffectations.java | 10 +- .../template/CreatedOrganizationUnits.java | 10 +- .../CreatedOrganizationUnitsAffectations.java | 10 +- .../template/InterviewerAffectation.java | 10 +- ...viewerAffectationSynchronizationError.java | 10 +- ...ewerAffectationsSynchronizationErrors.java | 10 +- .../InterviewerSynchronizationError.java | 10 +- .../InterviewerSynchronizationErrors.java | 10 +- ...wersAffectationsSynchronizationResult.java | 10 +- .../template/InterviewersReaffectations.java | 10 +- .../InterviewersSynchronizationResult.java | 10 +- .../template/OrganizationUnitAffectation.java | 10 +- ...onUnitAffectationSynchronizationError.java | 10 +- ...UnitAffectationsSynchronizationErrors.java | 10 +- .../OrganizationUnitSynchronizationError.java | 10 +- ...OrganizationUnitSynchronizationErrors.java | 10 +- ...nitsAffectationsSynchronizationResult.java | 10 +- .../OrganizationUnitsReaffectations.java | 10 +- ...rganizationUnitsSynchronizationResult.java | 10 +- .../batch/template/UpdatedInterviewers.java | 10 +- .../insee/pearljam/batch/utils/XmlUtils.java | 9 +- src/main/jaxb/jaxb.properties | 2 +- src/main/resources/jaxb/jaxb.properties | 2 +- 28 files changed, 162 insertions(+), 314 deletions(-) diff --git a/pom.xml b/pom.xml index 9149d1ec..92e1900e 100644 --- a/pom.xml +++ b/pom.xml @@ -5,109 +5,47 @@ 4.0.0 fr.insee.pearljam pearljam-batch - 3.0.6 + 3.0.7 jar pearljam-batch PearlJam Batch - 11.0.2 - 11 - 5.2.1.RELEASE - 1.15.2 - 2.17.1 + 21 + 21 + 21 UTF-8 UTF-8 - 9.7.0-8 - 4.1.15 + 6.1.13 + 4.3.0 + 1.20.1 + 2.17.2 + 5.13.0 - - - - - org.apache.logging.log4j - log4j-bom - ${log4j.version} - pom - import - - - - - - - - - org.springframework - spring-jdbc - ${spring.version} - - - - - org.springframework - spring-oxm - ${spring.version} - - - org.springframework.data - spring-data-jpa - 2.2.3.RELEASE - - - org.jdom - jdom2 - 2.0.6 - - - - - org.liquibase - liquibase-core - 4.20.0 - - - org.postgresql - postgresql - 42.5.5 - - org.springframework spring-web ${spring.version} - - javax.servlet - servlet-api - 2.5 - provided - com.fasterxml.jackson.core jackson-core - 2.12.3 + ${jackson.version} com.fasterxml.jackson.core jackson-databind - 2.12.3 + ${jackson.version} org.springframework spring-test - 5.2.3.RELEASE - test - - - org.junit.vintage - junit-vintage-engine - 5.8.1 + ${spring.version} test @@ -124,86 +62,49 @@ org.mockito - mockito-all - 1.8.4 + mockito-core + ${mockito.version} test - - - - org.apache.logging.log4j - log4j-core - ${log4j.version} - - org.apache.logging.log4j - log4j-api - ${log4j.version} - - - - - commons-io - commons-io - 2.6 - - - org.apache.commons - commons-lang3 - 3.10 + fr.insee.queen + queen-batch + ${queenbatch.version} + + + org.eclipse.persistence + org.eclipse.persistence.moxy + + + org.eclipse.persistence + eclipselink + + + jakarta.xml.bind + jaxb-api + + - org.eclipse.persistence - org.eclipse.persistence.moxy - 2.5.0 - - - org.eclipse.persistence - eclipselink - 2.6.0 - - - javax.xml.bind - jaxb-api - 2.3.1 + jakarta.xml.bind + jakarta.xml.bind-api + 4.0.2 com.sun.xml.bind jaxb-impl - 2.2.11 - - - - com.sun.xml.bind - jaxb-core - 2.2.11 + 4.0.5 + runtime - - net.sf.saxon - Saxon-HE - ${saxon.version} - - - - fr.insee.queen - queen-batch - ${queenbatch.version} - - - - javax.annotation - javax.annotation-api - 1.3.2 - org.apache.maven maven-model - 3.8.1 + 3.9.8 @@ -213,7 +114,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.0.0-M4 + 3.5.0 PearlJamBatchApplicationTests.java @@ -227,27 +128,18 @@ - - org.apache.maven.plugins - maven-eclipse-plugin - 2.9 - - true - false - - org.apache.maven.plugins maven-compiler-plugin 3.8.0 - 11 + 21 org.apache.maven.plugins maven-jar-plugin - 2.4 + 3.4.2 @@ -264,7 +156,7 @@ org.codehaus.mojo jaxb2-maven-plugin - 2.5.0 + 3.2.0 xjc-schema-context @@ -315,7 +207,7 @@ maven-resources-plugin - 2.7 + 3.3.1 UTF-8 @@ -386,7 +278,7 @@ org.codehaus.mojo build-helper-maven-plugin - 1.7 + 3.6.0 add-source diff --git a/src/main/java/fr/insee/pearljam/batch/config/ApplicationContext.java b/src/main/java/fr/insee/pearljam/batch/config/ApplicationContext.java index 21162fa2..cab11cf5 100644 --- a/src/main/java/fr/insee/pearljam/batch/config/ApplicationContext.java +++ b/src/main/java/fr/insee/pearljam/batch/config/ApplicationContext.java @@ -3,20 +3,17 @@ import java.sql.Connection; import java.sql.SQLException; -import javax.annotation.PostConstruct; -import javax.sql.DataSource; +import jakarta.annotation.PostConstruct; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; -import org.springframework.context.annotation.Conditional; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.FilterType; import org.springframework.context.annotation.PropertySource; import org.springframework.core.env.ConfigurableEnvironment; -import org.springframework.data.mongodb.core.MongoTemplate; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.jdbc.datasource.DataSourceTransactionManager; import org.springframework.jdbc.datasource.DataSourceUtils; @@ -25,15 +22,10 @@ import org.springframework.transaction.PlatformTransactionManager; import org.springframework.web.client.RestTemplate; -import com.mongodb.ConnectionString; -import com.mongodb.MongoClientSettings; -import com.mongodb.client.MongoClient; -import com.mongodb.client.MongoClients; - -import fr.insee.queen.batch.config.ConditonJpa; -import fr.insee.queen.batch.config.ConditonMongo; import fr.insee.queen.batch.service.FolderService; +import javax.sql.DataSource; + @Configuration @ComponentScan(basePackages = {"fr.insee.pearljam.*", "fr.insee.queen.batch.*"}, excludeFilters={ @ComponentScan.Filter(type=FilterType.ASSIGNABLE_TYPE, value= FolderService.class),@ComponentScan.Filter(type= FilterType.ASSIGNABLE_TYPE, value= fr.insee.queen.batch.config.ApplicationContext.class)}) @@ -197,7 +189,6 @@ public JdbcTemplate pilotageJdbcTemplate(@Autowired @Qualifier("pilotageDataSour * @return new Datasource */ @Bean - @Conditional(value= ConditonJpa.class) public DataSource dataSource() { DriverManagerDataSource dataSource = new DriverManagerDataSource(); dataSource.setDriverClassName(ApplicationConfig.dbDriver); @@ -214,7 +205,6 @@ public DataSource dataSource() { * @throws SQLException */ @Bean("connection") - @Conditional(value= ConditonJpa.class) public Connection connection(@Autowired @Qualifier("dataSource") DataSource dataSource) throws SQLException { return DataSourceUtils.getConnection(dataSource); } @@ -225,7 +215,6 @@ public Connection connection(@Autowired @Qualifier("dataSource") DataSource data * @return JdbcTemplate */ @Bean("jdbcTemplate") - @Conditional(value= ConditonJpa.class) public JdbcTemplate jdbcTemplate(@Autowired @Qualifier("dataSource") DataSource dataSource) throws SQLException { JdbcTemplate jdbcTemplate = null; try { @@ -237,28 +226,6 @@ public JdbcTemplate jdbcTemplate(@Autowired @Qualifier("dataSource") DataSource jdbcTemplate.setResultsMapCaseInsensitive(true); return jdbcTemplate; } - - - @Bean - @Conditional(value= ConditonMongo.class) - public MongoClient mongo() { - ConnectionString connectionString = new ConnectionString(String.format("mongodb://%s:%s/%s", ApplicationConfig.pilotageDbHost, ApplicationConfig.pilotageDbPort, ApplicationConfig.pilotageDbSchema)); - MongoClientSettings mongoClientSettings = MongoClientSettings.builder() - .applyConnectionString(connectionString) - .build(); - return MongoClients.create(mongoClientSettings); - } - - /** - * Method used to create the mongoTemplate - * @return - * @throws Exception - */ - @Conditional(value= ConditonMongo.class) - @Bean - public MongoTemplate mongoTemplate() throws Exception { - return new MongoTemplate(mongo(), "queen_api"); - } @Bean public String getKeyParadataIdSu() { diff --git a/src/main/java/fr/insee/pearljam/batch/service/impl/ContextReferentialServiceImpl.java b/src/main/java/fr/insee/pearljam/batch/service/impl/ContextReferentialServiceImpl.java index 471dd79d..ce1f66fb 100644 --- a/src/main/java/fr/insee/pearljam/batch/service/impl/ContextReferentialServiceImpl.java +++ b/src/main/java/fr/insee/pearljam/batch/service/impl/ContextReferentialServiceImpl.java @@ -7,12 +7,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.http.HttpEntity; -import org.springframework.http.HttpHeaders; -import org.springframework.http.HttpMethod; -import org.springframework.http.HttpStatus; -import org.springframework.http.MediaType; -import org.springframework.http.ResponseEntity; +import org.springframework.http.*; import org.springframework.stereotype.Service; import org.springframework.web.client.RestTemplate; @@ -187,7 +182,7 @@ public void contextReferentialServiceIsAvailable() throws SynchronizationExcepti ResponseEntity response = restTemplate.exchange(uri, HttpMethod.GET, entity, String.class); printResponse(response.getStatusCode().toString()); - HttpStatus returnedCode = response.getStatusCode(); + HttpStatusCode returnedCode = response.getStatusCode(); if (!returnedCode.is2xxSuccessful()) { throw new SynchronizationException(NO_RESPONSE_MSG); } diff --git a/src/main/java/fr/insee/pearljam/batch/service/impl/HabilitationServiceImpl.java b/src/main/java/fr/insee/pearljam/batch/service/impl/HabilitationServiceImpl.java index 429f1ee6..62a2d265 100644 --- a/src/main/java/fr/insee/pearljam/batch/service/impl/HabilitationServiceImpl.java +++ b/src/main/java/fr/insee/pearljam/batch/service/impl/HabilitationServiceImpl.java @@ -10,12 +10,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.beans.factory.annotation.Value; -import org.springframework.http.HttpEntity; -import org.springframework.http.HttpHeaders; -import org.springframework.http.HttpMethod; -import org.springframework.http.HttpStatus; -import org.springframework.http.MediaType; -import org.springframework.http.ResponseEntity; +import org.springframework.http.*; import org.springframework.stereotype.Service; import org.springframework.web.client.RestTemplate; @@ -34,7 +29,7 @@ private static final void logUri(String uriToLog) { LOGGER.info("Calling {}", uriToLog); } - private static final void logResponse(HttpStatus statusCode) { + private static final void logResponse(HttpStatusCode statusCode) { LOGGER.info("Response {}", statusCode); } @@ -112,7 +107,7 @@ public void isAvailable() throws SynchronizationException { HttpEntity entity = new HttpEntity<>(headers); ResponseEntity response = restTemplate.exchange(uri, HttpMethod.GET, entity, String.class); - HttpStatus returnedCode = response.getStatusCode(); + HttpStatusCode returnedCode = response.getStatusCode(); logUri(uri); logResponse(response.getStatusCode()); diff --git a/src/main/java/fr/insee/pearljam/batch/template/CreatedInterviewers.java b/src/main/java/fr/insee/pearljam/batch/template/CreatedInterviewers.java index b48115b0..ec376917 100644 --- a/src/main/java/fr/insee/pearljam/batch/template/CreatedInterviewers.java +++ b/src/main/java/fr/insee/pearljam/batch/template/CreatedInterviewers.java @@ -2,11 +2,11 @@ import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; +import jakarta.xml.bind.annotation.XmlAccessType; +import jakarta.xml.bind.annotation.XmlAccessorType; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlRootElement; +import jakarta.xml.bind.annotation.XmlType; @XmlAccessorType(XmlAccessType.FIELD) diff --git a/src/main/java/fr/insee/pearljam/batch/template/CreatedInterviewersAffectations.java b/src/main/java/fr/insee/pearljam/batch/template/CreatedInterviewersAffectations.java index c686c0c1..1e4de9a4 100644 --- a/src/main/java/fr/insee/pearljam/batch/template/CreatedInterviewersAffectations.java +++ b/src/main/java/fr/insee/pearljam/batch/template/CreatedInterviewersAffectations.java @@ -2,11 +2,11 @@ import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; +import jakarta.xml.bind.annotation.XmlAccessType; +import jakarta.xml.bind.annotation.XmlAccessorType; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlRootElement; +import jakarta.xml.bind.annotation.XmlType; @XmlAccessorType(XmlAccessType.FIELD) diff --git a/src/main/java/fr/insee/pearljam/batch/template/CreatedOrganizationUnits.java b/src/main/java/fr/insee/pearljam/batch/template/CreatedOrganizationUnits.java index 432f4710..970d7ce0 100644 --- a/src/main/java/fr/insee/pearljam/batch/template/CreatedOrganizationUnits.java +++ b/src/main/java/fr/insee/pearljam/batch/template/CreatedOrganizationUnits.java @@ -2,11 +2,11 @@ import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; +import jakarta.xml.bind.annotation.XmlAccessType; +import jakarta.xml.bind.annotation.XmlAccessorType; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlRootElement; +import jakarta.xml.bind.annotation.XmlType; @XmlAccessorType(XmlAccessType.FIELD) diff --git a/src/main/java/fr/insee/pearljam/batch/template/CreatedOrganizationUnitsAffectations.java b/src/main/java/fr/insee/pearljam/batch/template/CreatedOrganizationUnitsAffectations.java index 2caddd3e..a7163ae1 100644 --- a/src/main/java/fr/insee/pearljam/batch/template/CreatedOrganizationUnitsAffectations.java +++ b/src/main/java/fr/insee/pearljam/batch/template/CreatedOrganizationUnitsAffectations.java @@ -2,11 +2,11 @@ import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; +import jakarta.xml.bind.annotation.XmlAccessType; +import jakarta.xml.bind.annotation.XmlAccessorType; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlRootElement; +import jakarta.xml.bind.annotation.XmlType; @XmlAccessorType(XmlAccessType.FIELD) diff --git a/src/main/java/fr/insee/pearljam/batch/template/InterviewerAffectation.java b/src/main/java/fr/insee/pearljam/batch/template/InterviewerAffectation.java index 281535a4..9015f57a 100644 --- a/src/main/java/fr/insee/pearljam/batch/template/InterviewerAffectation.java +++ b/src/main/java/fr/insee/pearljam/batch/template/InterviewerAffectation.java @@ -1,10 +1,10 @@ package fr.insee.pearljam.batch.template; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; +import jakarta.xml.bind.annotation.XmlAccessType; +import jakarta.xml.bind.annotation.XmlAccessorType; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlRootElement; +import jakarta.xml.bind.annotation.XmlType; @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { diff --git a/src/main/java/fr/insee/pearljam/batch/template/InterviewerAffectationSynchronizationError.java b/src/main/java/fr/insee/pearljam/batch/template/InterviewerAffectationSynchronizationError.java index de0d171f..f4ed5112 100644 --- a/src/main/java/fr/insee/pearljam/batch/template/InterviewerAffectationSynchronizationError.java +++ b/src/main/java/fr/insee/pearljam/batch/template/InterviewerAffectationSynchronizationError.java @@ -1,10 +1,10 @@ package fr.insee.pearljam.batch.template; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; +import jakarta.xml.bind.annotation.XmlAccessType; +import jakarta.xml.bind.annotation.XmlAccessorType; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlRootElement; +import jakarta.xml.bind.annotation.XmlType; @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { diff --git a/src/main/java/fr/insee/pearljam/batch/template/InterviewerAffectationsSynchronizationErrors.java b/src/main/java/fr/insee/pearljam/batch/template/InterviewerAffectationsSynchronizationErrors.java index 912dca84..736a4274 100644 --- a/src/main/java/fr/insee/pearljam/batch/template/InterviewerAffectationsSynchronizationErrors.java +++ b/src/main/java/fr/insee/pearljam/batch/template/InterviewerAffectationsSynchronizationErrors.java @@ -2,11 +2,11 @@ import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; +import jakarta.xml.bind.annotation.XmlAccessType; +import jakarta.xml.bind.annotation.XmlAccessorType; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlRootElement; +import jakarta.xml.bind.annotation.XmlType; @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { diff --git a/src/main/java/fr/insee/pearljam/batch/template/InterviewerSynchronizationError.java b/src/main/java/fr/insee/pearljam/batch/template/InterviewerSynchronizationError.java index 1c8e81b7..988a3b1e 100644 --- a/src/main/java/fr/insee/pearljam/batch/template/InterviewerSynchronizationError.java +++ b/src/main/java/fr/insee/pearljam/batch/template/InterviewerSynchronizationError.java @@ -1,10 +1,10 @@ package fr.insee.pearljam.batch.template; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; +import jakarta.xml.bind.annotation.XmlAccessType; +import jakarta.xml.bind.annotation.XmlAccessorType; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlRootElement; +import jakarta.xml.bind.annotation.XmlType; @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { diff --git a/src/main/java/fr/insee/pearljam/batch/template/InterviewerSynchronizationErrors.java b/src/main/java/fr/insee/pearljam/batch/template/InterviewerSynchronizationErrors.java index 6b919666..326324d7 100644 --- a/src/main/java/fr/insee/pearljam/batch/template/InterviewerSynchronizationErrors.java +++ b/src/main/java/fr/insee/pearljam/batch/template/InterviewerSynchronizationErrors.java @@ -2,11 +2,11 @@ import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; +import jakarta.xml.bind.annotation.XmlAccessType; +import jakarta.xml.bind.annotation.XmlAccessorType; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlRootElement; +import jakarta.xml.bind.annotation.XmlType; @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { diff --git a/src/main/java/fr/insee/pearljam/batch/template/InterviewersAffectationsSynchronizationResult.java b/src/main/java/fr/insee/pearljam/batch/template/InterviewersAffectationsSynchronizationResult.java index 451815d9..5cda82d0 100644 --- a/src/main/java/fr/insee/pearljam/batch/template/InterviewersAffectationsSynchronizationResult.java +++ b/src/main/java/fr/insee/pearljam/batch/template/InterviewersAffectationsSynchronizationResult.java @@ -1,10 +1,10 @@ package fr.insee.pearljam.batch.template; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; +import jakarta.xml.bind.annotation.XmlAccessType; +import jakarta.xml.bind.annotation.XmlAccessorType; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlRootElement; +import jakarta.xml.bind.annotation.XmlType; @XmlAccessorType(XmlAccessType.FIELD) diff --git a/src/main/java/fr/insee/pearljam/batch/template/InterviewersReaffectations.java b/src/main/java/fr/insee/pearljam/batch/template/InterviewersReaffectations.java index 90e78663..3a1b7b82 100644 --- a/src/main/java/fr/insee/pearljam/batch/template/InterviewersReaffectations.java +++ b/src/main/java/fr/insee/pearljam/batch/template/InterviewersReaffectations.java @@ -2,11 +2,11 @@ import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; +import jakarta.xml.bind.annotation.XmlAccessType; +import jakarta.xml.bind.annotation.XmlAccessorType; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlRootElement; +import jakarta.xml.bind.annotation.XmlType; @XmlAccessorType(XmlAccessType.FIELD) diff --git a/src/main/java/fr/insee/pearljam/batch/template/InterviewersSynchronizationResult.java b/src/main/java/fr/insee/pearljam/batch/template/InterviewersSynchronizationResult.java index e5d76982..959c0e62 100644 --- a/src/main/java/fr/insee/pearljam/batch/template/InterviewersSynchronizationResult.java +++ b/src/main/java/fr/insee/pearljam/batch/template/InterviewersSynchronizationResult.java @@ -1,10 +1,10 @@ package fr.insee.pearljam.batch.template; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; +import jakarta.xml.bind.annotation.XmlAccessType; +import jakarta.xml.bind.annotation.XmlAccessorType; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlRootElement; +import jakarta.xml.bind.annotation.XmlType; @XmlAccessorType(XmlAccessType.FIELD) diff --git a/src/main/java/fr/insee/pearljam/batch/template/OrganizationUnitAffectation.java b/src/main/java/fr/insee/pearljam/batch/template/OrganizationUnitAffectation.java index e67d1bb9..3609a188 100644 --- a/src/main/java/fr/insee/pearljam/batch/template/OrganizationUnitAffectation.java +++ b/src/main/java/fr/insee/pearljam/batch/template/OrganizationUnitAffectation.java @@ -1,10 +1,10 @@ package fr.insee.pearljam.batch.template; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; +import jakarta.xml.bind.annotation.XmlAccessType; +import jakarta.xml.bind.annotation.XmlAccessorType; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlRootElement; +import jakarta.xml.bind.annotation.XmlType; @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { diff --git a/src/main/java/fr/insee/pearljam/batch/template/OrganizationUnitAffectationSynchronizationError.java b/src/main/java/fr/insee/pearljam/batch/template/OrganizationUnitAffectationSynchronizationError.java index 9340619b..685881f2 100644 --- a/src/main/java/fr/insee/pearljam/batch/template/OrganizationUnitAffectationSynchronizationError.java +++ b/src/main/java/fr/insee/pearljam/batch/template/OrganizationUnitAffectationSynchronizationError.java @@ -1,10 +1,10 @@ package fr.insee.pearljam.batch.template; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; +import jakarta.xml.bind.annotation.XmlAccessType; +import jakarta.xml.bind.annotation.XmlAccessorType; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlRootElement; +import jakarta.xml.bind.annotation.XmlType; @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { diff --git a/src/main/java/fr/insee/pearljam/batch/template/OrganizationUnitAffectationsSynchronizationErrors.java b/src/main/java/fr/insee/pearljam/batch/template/OrganizationUnitAffectationsSynchronizationErrors.java index ceaf3762..82b28666 100644 --- a/src/main/java/fr/insee/pearljam/batch/template/OrganizationUnitAffectationsSynchronizationErrors.java +++ b/src/main/java/fr/insee/pearljam/batch/template/OrganizationUnitAffectationsSynchronizationErrors.java @@ -2,11 +2,11 @@ import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; +import jakarta.xml.bind.annotation.XmlAccessType; +import jakarta.xml.bind.annotation.XmlAccessorType; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlRootElement; +import jakarta.xml.bind.annotation.XmlType; @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { diff --git a/src/main/java/fr/insee/pearljam/batch/template/OrganizationUnitSynchronizationError.java b/src/main/java/fr/insee/pearljam/batch/template/OrganizationUnitSynchronizationError.java index 0534f779..a208d2dd 100644 --- a/src/main/java/fr/insee/pearljam/batch/template/OrganizationUnitSynchronizationError.java +++ b/src/main/java/fr/insee/pearljam/batch/template/OrganizationUnitSynchronizationError.java @@ -1,10 +1,10 @@ package fr.insee.pearljam.batch.template; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; +import jakarta.xml.bind.annotation.XmlAccessType; +import jakarta.xml.bind.annotation.XmlAccessorType; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlRootElement; +import jakarta.xml.bind.annotation.XmlType; @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { diff --git a/src/main/java/fr/insee/pearljam/batch/template/OrganizationUnitSynchronizationErrors.java b/src/main/java/fr/insee/pearljam/batch/template/OrganizationUnitSynchronizationErrors.java index 38bbb0cd..e52fd306 100644 --- a/src/main/java/fr/insee/pearljam/batch/template/OrganizationUnitSynchronizationErrors.java +++ b/src/main/java/fr/insee/pearljam/batch/template/OrganizationUnitSynchronizationErrors.java @@ -2,11 +2,11 @@ import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; +import jakarta.xml.bind.annotation.XmlAccessType; +import jakarta.xml.bind.annotation.XmlAccessorType; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlRootElement; +import jakarta.xml.bind.annotation.XmlType; @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { diff --git a/src/main/java/fr/insee/pearljam/batch/template/OrganizationUnitsAffectationsSynchronizationResult.java b/src/main/java/fr/insee/pearljam/batch/template/OrganizationUnitsAffectationsSynchronizationResult.java index 19c0bc97..1abae210 100644 --- a/src/main/java/fr/insee/pearljam/batch/template/OrganizationUnitsAffectationsSynchronizationResult.java +++ b/src/main/java/fr/insee/pearljam/batch/template/OrganizationUnitsAffectationsSynchronizationResult.java @@ -1,10 +1,10 @@ package fr.insee.pearljam.batch.template; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; +import jakarta.xml.bind.annotation.XmlAccessType; +import jakarta.xml.bind.annotation.XmlAccessorType; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlRootElement; +import jakarta.xml.bind.annotation.XmlType; @XmlAccessorType(XmlAccessType.FIELD) diff --git a/src/main/java/fr/insee/pearljam/batch/template/OrganizationUnitsReaffectations.java b/src/main/java/fr/insee/pearljam/batch/template/OrganizationUnitsReaffectations.java index 54cc4dae..f27c48fd 100644 --- a/src/main/java/fr/insee/pearljam/batch/template/OrganizationUnitsReaffectations.java +++ b/src/main/java/fr/insee/pearljam/batch/template/OrganizationUnitsReaffectations.java @@ -2,11 +2,11 @@ import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; +import jakarta.xml.bind.annotation.XmlAccessType; +import jakarta.xml.bind.annotation.XmlAccessorType; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlRootElement; +import jakarta.xml.bind.annotation.XmlType; @XmlAccessorType(XmlAccessType.FIELD) diff --git a/src/main/java/fr/insee/pearljam/batch/template/OrganizationUnitsSynchronizationResult.java b/src/main/java/fr/insee/pearljam/batch/template/OrganizationUnitsSynchronizationResult.java index 7be1fcda..b978c269 100644 --- a/src/main/java/fr/insee/pearljam/batch/template/OrganizationUnitsSynchronizationResult.java +++ b/src/main/java/fr/insee/pearljam/batch/template/OrganizationUnitsSynchronizationResult.java @@ -1,10 +1,10 @@ package fr.insee.pearljam.batch.template; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; +import jakarta.xml.bind.annotation.XmlAccessType; +import jakarta.xml.bind.annotation.XmlAccessorType; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlRootElement; +import jakarta.xml.bind.annotation.XmlType; @XmlAccessorType(XmlAccessType.FIELD) diff --git a/src/main/java/fr/insee/pearljam/batch/template/UpdatedInterviewers.java b/src/main/java/fr/insee/pearljam/batch/template/UpdatedInterviewers.java index f03a5955..c286085a 100644 --- a/src/main/java/fr/insee/pearljam/batch/template/UpdatedInterviewers.java +++ b/src/main/java/fr/insee/pearljam/batch/template/UpdatedInterviewers.java @@ -2,11 +2,11 @@ import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlRootElement; -import javax.xml.bind.annotation.XmlType; +import jakarta.xml.bind.annotation.XmlAccessType; +import jakarta.xml.bind.annotation.XmlAccessorType; +import jakarta.xml.bind.annotation.XmlElement; +import jakarta.xml.bind.annotation.XmlRootElement; +import jakarta.xml.bind.annotation.XmlType; @XmlAccessorType(XmlAccessType.FIELD) diff --git a/src/main/java/fr/insee/pearljam/batch/utils/XmlUtils.java b/src/main/java/fr/insee/pearljam/batch/utils/XmlUtils.java index 50a921d7..76ff7f7b 100644 --- a/src/main/java/fr/insee/pearljam/batch/utils/XmlUtils.java +++ b/src/main/java/fr/insee/pearljam/batch/utils/XmlUtils.java @@ -11,10 +11,10 @@ import java.nio.charset.StandardCharsets; import javax.xml.XMLConstants; -import javax.xml.bind.JAXBContext; -import javax.xml.bind.JAXBException; -import javax.xml.bind.Marshaller; -import javax.xml.bind.Unmarshaller; +import jakarta.xml.bind.JAXBContext; +import jakarta.xml.bind.JAXBException; +import jakarta.xml.bind.Marshaller; +import jakarta.xml.bind.Unmarshaller; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; @@ -94,7 +94,6 @@ public static NodeList getXmlNodeFile(String filename, String nodeName) { /** * Validate an XML file by XSD validator * - * @param xsdPath xsd path * @param xmlPath xml path * @return true if XML is valid * @throws IOException diff --git a/src/main/jaxb/jaxb.properties b/src/main/jaxb/jaxb.properties index 5837a4c2..b48bb869 100644 --- a/src/main/jaxb/jaxb.properties +++ b/src/main/jaxb/jaxb.properties @@ -1 +1 @@ -javax.xml.bind.context.factory=org.eclipse.persistence.jaxb.JAXBContextFactory \ No newline at end of file +jakarta.xml.bind.context.factory=org.eclipse.persistence.jaxb.JAXBContextFactory \ No newline at end of file diff --git a/src/main/resources/jaxb/jaxb.properties b/src/main/resources/jaxb/jaxb.properties index 5837a4c2..b48bb869 100644 --- a/src/main/resources/jaxb/jaxb.properties +++ b/src/main/resources/jaxb/jaxb.properties @@ -1 +1 @@ -javax.xml.bind.context.factory=org.eclipse.persistence.jaxb.JAXBContextFactory \ No newline at end of file +jakarta.xml.bind.context.factory=org.eclipse.persistence.jaxb.JAXBContextFactory \ No newline at end of file From 739a509dd72629c24e8f9b260c8c9388a3d73414 Mon Sep 17 00:00:00 2001 From: davdarras Date: Tue, 24 Sep 2024 09:49:43 +0200 Subject: [PATCH 2/3] ci: remove lunatic build --- .github/workflows/build.yml | 17 ++++------------- .github/workflows/develop-release.yml | 16 +++------------- .github/workflows/release.yml | 14 +------------- 3 files changed, 8 insertions(+), 39 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3aa637c4..b0a6b674 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,24 +17,15 @@ jobs: - name: Get queen-batch version id: queenbatch run: echo "::set-output name=prop::$(mvn -f pom.xml help:evaluate -Dexpression=queenbatch.version -q -DforceStdout)" + - name: Clone queen-batch - run: git clone https://github.com/InseeFr/Queen-Batch.git --depth 1 --branch ${{steps.queenbatch.outputs.prop}}-rc - - name: Get lunatic-model version - id: lunaticmodel - run: | - cd Queen-Batch - echo "::set-output name=prop::$(mvn -f pom.xml help:evaluate -Dexpression=lunatic.model.version -q -DforceStdout)" - - name: Clone lunatic-model - run: | - git clone https://github.com/InseeFr/Lunatic-Model.git --depth 1 --branch ${{steps.lunaticmodel.outputs.prop}}-rc - - name: Install lunatic-model - run: | - cd Lunatic-Model - mvn clean install -DskipTests --batch-mode --no-transfer-progress + run: git clone https://github.com/InseeFr/Queen-Batch.git --depth 1 --branch ${{steps.queenbatch.outputs.prop}} + - name: Install queen-batch run: | cd Queen-Batch mvn clean install -DskipTests --batch-mode --no-transfer-progress + - name: Build with Maven timeout-minutes: 15 run: mvn clean install --batch-mode --no-transfer-progress diff --git a/.github/workflows/develop-release.yml b/.github/workflows/develop-release.yml index dc77bf75..56bcbf36 100644 --- a/.github/workflows/develop-release.yml +++ b/.github/workflows/develop-release.yml @@ -19,20 +19,10 @@ jobs: - name: Get queen-batch version id: queenbatch run: echo "::set-output name=prop::$(mvn -f pom.xml help:evaluate -Dexpression=queenbatch.version -q -DforceStdout)" + - name: Clone queen-batch - run: git clone https://github.com/InseeFr/Queen-Batch.git --depth 1 --branch ${{steps.queenbatch.outputs.prop}}-rc - - name: Get lunatic-model version - id: lunaticmodel - run: | - cd Queen-Batch - echo "::set-output name=prop::$(mvn -f pom.xml help:evaluate -Dexpression=lunatic.model.version -q -DforceStdout)" - - name: Clone lunatic-model - run: | - git clone https://github.com/InseeFr/Lunatic-Model.git --depth 1 --branch ${{steps.lunaticmodel.outputs.prop}}-rc - - name: Install lunatic-model - run: | - cd Lunatic-Model - mvn clean install -DskipTests --batch-mode --no-transfer-progress + run: git clone https://github.com/InseeFr/Queen-Batch.git --depth 1 --branch ${{steps.queenbatch.outputs.prop}} + - name: Install queen-batch run: | cd Queen-Batch diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e86ebd6b..df55559b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,19 +20,7 @@ jobs: id: queenbatch run: echo "::set-output name=prop::$(mvn -f pom.xml help:evaluate -Dexpression=queenbatch.version -q -DforceStdout)" - name: Clone queen-batch - run: git clone https://github.com/InseeFr/Queen-Batch.git --depth 1 --branch ${{steps.queenbatch.outputs.prop}}-rc - - name: Get lunatic-model version - id: lunaticmodel - run: | - cd Queen-Batch - echo "::set-output name=prop::$(mvn -f pom.xml help:evaluate -Dexpression=lunatic.model.version -q -DforceStdout)" - - name: Clone lunatic-model - run: | - git clone https://github.com/InseeFr/Lunatic-Model.git --depth 1 --branch ${{steps.lunaticmodel.outputs.prop}}-rc - - name: Install lunatic-model - run: | - cd Lunatic-Model - mvn clean install -DskipTests --batch-mode --no-transfer-progress + run: git clone https://github.com/InseeFr/Queen-Batch.git --depth 1 --branch ${{steps.queenbatch.outputs.prop}} - name: Install queen-batch run: | cd Queen-Batch From 00592d0f7e0496a946aa11c628c48100fa8ac24e Mon Sep 17 00:00:00 2001 From: davdarras Date: Tue, 24 Sep 2024 09:56:22 +0200 Subject: [PATCH 3/3] ci: build with java 21 --- .github/workflows/build.yml | 9 +++++---- .github/workflows/develop-release.yml | 9 +++++---- .github/workflows/release.yml | 9 +++++---- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b0a6b674..292069af 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,11 +9,12 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Set up JDK 11 - uses: actions/setup-java@v1 + - uses: actions/checkout@v4 + - name: Set up JDK 21 + uses: actions/setup-java@v4 with: - java-version: 11 + java-version: 21 + distribution: 'temurin' - name: Get queen-batch version id: queenbatch run: echo "::set-output name=prop::$(mvn -f pom.xml help:evaluate -Dexpression=queenbatch.version -q -DforceStdout)" diff --git a/.github/workflows/develop-release.yml b/.github/workflows/develop-release.yml index 56bcbf36..9a3dc607 100644 --- a/.github/workflows/develop-release.yml +++ b/.github/workflows/develop-release.yml @@ -11,11 +11,12 @@ jobs: build-release: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Set up JDK 11 - uses: actions/setup-java@v1 + - uses: actions/checkout@v4 + - name: Set up JDK 21 + uses: actions/setup-java@v4 with: - java-version: 11 + java-version: 21 + distribution: 'temurin' - name: Get queen-batch version id: queenbatch run: echo "::set-output name=prop::$(mvn -f pom.xml help:evaluate -Dexpression=queenbatch.version -q -DforceStdout)" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index df55559b..678d04d4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,11 +11,12 @@ jobs: build-release: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Set up JDK 11 - uses: actions/setup-java@v1 + - uses: actions/checkout@v4 + - name: Set up JDK 21 + uses: actions/setup-java@v4 with: - java-version: 11 + java-version: 21 + distribution: 'temurin' - name: Get queen-batch version id: queenbatch run: echo "::set-output name=prop::$(mvn -f pom.xml help:evaluate -Dexpression=queenbatch.version -q -DforceStdout)"