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

Story #12306 build: update to java 21 #1950

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
- uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: "17"
java-version: "21"
- name: Restore maven cache # We're not using cache feature from actions/setup-java as it's not allowing to fine-tune it (in particular, we can't use restore-keys to load a previous cache if cache name mismatches)
uses: actions/cache@v4
with:
Expand Down
4 changes: 2 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ def IMPORTANT_BRANCH_OR_TAG = (env.BRANCH_NAME =~ /(develop|master_.*)/).matches

pipeline {
agent {
label 'java11'
label 'java21'
}

environment {
Expand All @@ -18,7 +18,7 @@ pipeline {

PUPPETEER_DOWNLOAD_HOST="${SERVICE_NEXUS_URL}repository/puppeteer-chrome"

JAVA_HOME="/usr/lib/jvm/java-17-openjdk-amd64"
JAVA_HOME="/usr/lib/jvm/java-21-openjdk-amd64"
}

options {
Expand Down
2 changes: 1 addition & 1 deletion Jenkinsfile.containers
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* groovylint-disable LineLength */
pipeline {
agent {
label 'java11'
label 'java21'
}

environment {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<EntityDescriptor xmlns="urn:oasis:names:tc:SAML:2.0:metadata" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:shibmd="urn:mace:shibboleth:metadata:1.0" xmlns:xml="http://www.w3.org/XML/1998/namespace" xmlns:mdui="urn:oasis:names:tc:SAML:metadata:ui" entityID="http://localhost:8071/idp">
<EntityDescriptor xmlns="urn:oasis:names:tc:SAML:2.0:metadata" xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
xmlns:shibmd="urn:mace:shibboleth:metadata:1.0"
entityID="http://localhost:8071/idp">
<IDPSSODescriptor protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol urn:oasis:names:tc:SAML:1.1:protocol urn:mace:shibboleth:1.0">
<Extensions>
<shibmd:Scope regexp="false">localhost</shibmd:Scope>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<EntityDescriptor xmlns="urn:oasis:names:tc:SAML:2.0:metadata" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:shibmd="urn:mace:shibboleth:metadata:1.0" xmlns:xml="http://www.w3.org/XML/1998/namespace" xmlns:mdui="urn:oasis:names:tc:SAML:metadata:ui" entityID="http://localhost:8071/idp">
<EntityDescriptor xmlns="urn:oasis:names:tc:SAML:2.0:metadata" xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
xmlns:shibmd="urn:mace:shibboleth:metadata:1.0"
entityID="http://localhost:8071/idp">
<IDPSSODescriptor protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol urn:oasis:names:tc:SAML:1.1:protocol urn:mace:shibboleth:1.0">
<Extensions>
<shibmd:Scope regexp="false">localhost</shibmd:Scope>
Expand Down
16 changes: 10 additions & 6 deletions cas/cas-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,13 @@
<properties>
<assertj-core.version>3.11.1</assertj-core.version>
<jackson.version>2.17.0</jackson.version>
<lombok.version>1.18.24</lombok.version>
<micrometer.version>1.9.3</micrometer.version>
<lombok.version>1.18.30</lombok.version>
<mockito.version>3.12.1</mockito.version>
<spring.boot.version>2.7.3</spring.boot.version>
<spring.cloud.consul.version>3.1.1</spring.cloud.consul.version>
<spring.boot.version>2.7.18</spring.boot.version>
<spring.cloud.consul.version>3.1.5</spring.cloud.consul.version>
<spring.security.version>5.7.3</spring.security.version>
<spring.test.version>5.3.22</spring.test.version>
<spring.version>5.3.22</spring.version>
<spring.test.version>5.3.37</spring.test.version>
<spring.version>5.3.37</spring.version>
<swagger.version>2.2.2</swagger.version>
<mongo.version>4.7.1</mongo.version>
<spring-webmvc-pac4j.version>6.0.3</spring-webmvc-pac4j.version>
Expand All @@ -31,6 +30,11 @@
</properties>

<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>

<!-- VITAMUI -->
<dependency>
<groupId>fr.gouv.vitamui</groupId>
Expand Down
6 changes: 3 additions & 3 deletions commons/commons-vitam/src/main/config/seda/seda-2.1-main.xsd
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema targetNamespace="fr:gouv:culture:archivesdefrance:seda:v2.1"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns="fr:gouv:culture:archivesdefrance:seda:v2.1" elementFormDefault="qualified"
attributeFormDefault="unqualified" version="1.0">
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="fr:gouv:culture:archivesdefrance:seda:v2.1" elementFormDefault="qualified"
attributeFormDefault="unqualified" version="1.0">

<xsd:import namespace="http://www.w3.org/XML/1998/namespace"
schemaLocation="http://www.w3.org/2001/xml.xsd"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="fr:gouv:culture:archivesdefrance:seda:v2.1"
xmlns:pr="info:lc/xmlns/premis-v2" xmlns="fr:gouv:culture:archivesdefrance:seda:v2.1" elementFormDefault="qualified"
attributeFormDefault="unqualified" version="1.0">
xmlns="fr:gouv:culture:archivesdefrance:seda:v2.1" elementFormDefault="qualified"
attributeFormDefault="unqualified" version="1.0">
<xsd:include schemaLocation="seda-2.1-types.xsd"/>

<xsd:group name="ObjectGroup">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema targetNamespace="fr:gouv:culture:archivesdefrance:seda:v2.1"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns="fr:gouv:culture:archivesdefrance:seda:v2.1" elementFormDefault="qualified"
attributeFormDefault="unqualified" version="1.0">
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="fr:gouv:culture:archivesdefrance:seda:v2.1" elementFormDefault="qualified"
attributeFormDefault="unqualified" version="1.0">
<xsd:include schemaLocation="seda-2.1-types.xsd"/>
<xsd:include schemaLocation="seda-2.1-ontology.xsd"/>
<!--
Expand Down
6 changes: 4 additions & 2 deletions deployment/roles/normalize/tasks/check_java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
name:
- openjdk-8-jdk-headless
- openjdk-11-jdk-headless
- openjdk-17-jre-headless
state: absent
register: result
retries: "{{ packages_install_retries_number | default(2) }}"
Expand All @@ -15,7 +16,7 @@

- name: Install OpenJDK on Debian
apt:
name: openjdk-17-jre-headless
name: openjdk-21-jre-headless
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

N'existe pas sur debian 12... Il faut trouver un autre moyen d'installer java 21...

state: latest
register: result
retries: "{{ packages_install_retries_number }}"
Expand All @@ -34,6 +35,7 @@
- java-1.8.0-openjdk
- java-1.8.0-openjdk-headless
- java-11-openjdk-headless
- java-17-openjdk-headless
state: absent
register: result
retries: "{{ packages_install_retries_number | default(2) }}"
Expand All @@ -42,7 +44,7 @@

- name: Install OpenJDK on RedHat
package:
name: java-17-openjdk-headless
name: java-21-openjdk-headless
state: latest
register: result
retries: "{{ packages_install_retries_number | default(2) }}"
Expand Down
28 changes: 14 additions & 14 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@
<maven.build.timestamp.format>yyyyMMdd_HHmm</maven.build.timestamp.format>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>17</java.version>
<java.release>17</java.release>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<maven.compiler.release>17</maven.compiler.release>
<java.version>21</java.version>
<java.release>21</java.release>
<maven.compiler.source>21</maven.compiler.source>
<maven.compiler.target>21</maven.compiler.target>
<maven.compiler.release>21</maven.compiler.release>

<!-- Dependencies version -->
<apache.commons.codec.version>1.16.1</apache.commons.codec.version>
Expand Down Expand Up @@ -118,11 +118,11 @@
<jruby.complete.version>9.2.13.0</jruby.complete.version>
<jsonassert.version>1.5.0</jsonassert.version>
<logback.version>1.2.13</logback.version>
<lombok.version>1.18.20</lombok.version>
<lombok.version>1.18.30</lombok.version>
<jakarta.mail.version>1.6.5</jakarta.mail.version>
<juli.to.slf4j.version>1.1.1</juli.to.slf4j.version>
<jquery.ui.version>1.13.2</jquery.ui.version>
<micrometer.version>1.7.3</micrometer.version>
<micrometer.version>1.9.17</micrometer.version>
<mapstruct.version>1.3.0.Final</mapstruct.version>
<mockito.version>4.11.0</mockito.version>
<nio.multipart.parser.version>1.1.0</nio.multipart.parser.version>
Expand All @@ -137,13 +137,13 @@
<serenity.spring.version>3.3.10</serenity.spring.version>
<serenity.version>3.3.10</serenity.version>
<slf4j.version>1.7.30</slf4j.version>
<spring.boot.version>2.5.15</spring.boot.version>
<spring.boot.version>2.7.18</spring.boot.version>
<reactor.version>3.4.18</reactor.version>
<spring.version>5.3.20</spring.version>
<spring.cloud.consul.version>3.0.3</spring.cloud.consul.version>
<spring-cloud.version>2020.0.6</spring-cloud.version>
<spring.version>5.3.37</spring.version>
<spring.cloud.consul.version>3.1.5</spring.cloud.consul.version>
<spring-cloud.version>2021.0.9</spring-cloud.version>
<spring.security.version>5.5.3</spring.security.version>
<spring.test.version>5.3.18</spring.test.version>
<spring.test.version>5.3.37</spring.test.version>
<spring-webmvc-pac4j.version>5.1.0</spring-webmvc-pac4j.version>
<swagger.version>3.0.0</swagger.version>
<vitam.version>8.0.0-SNAPSHOT</vitam.version>
Expand Down Expand Up @@ -1624,7 +1624,7 @@
<configuration>
<from>
<!--<image>gcr.io/distroless/java11-debian11</image>-->
<image>gcr.io/distroless/java17</image>
<image>gcr.io/distroless/java21</image>
</from>
<allowInsecureRegistries>true</allowInsecureRegistries>
<container>
Expand Down Expand Up @@ -2065,7 +2065,7 @@
<!-- If you want to changes default dependencies (only
systemd),
define them as a comma separated list of packages -->
<argument>DEPENDENCIES=systemd,java-17-openjdk</argument>
<argument>DEPENDENCIES=systemd,java-21-openjdk</argument>
</arguments>
</configuration>
</execution>
Expand Down
2 changes: 1 addition & 1 deletion tools/docker/vitamui-base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ RUN (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == system
################################ Install build tools (rpm / maven / java) ###############################

RUN yum install -y \
java-17-openjdk-devel \
java-21-openjdk-devel \
rpm-build \
rpmdevtools \
initscripts.x86_64 \
Expand Down