From b2ab586d43d1fb870bd2091b58279a3333a50788 Mon Sep 17 00:00:00 2001 From: Olivier Maury <Olivier.Maury@inrae.fr> Date: Tue, 17 Dec 2024 16:37:24 +0100 Subject: [PATCH 01/19] =?UTF-8?q?Modification=20suite=20=C3=A0=20migration?= =?UTF-8?q?=20sur=20Git/GitLab,=20ouverture=20SWH?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 9 ++ README.md | 89 +++++++------ codemeta.json | 13 +- config/cpd-suppressions.properties | 1 + pom.xml | 126 +++++++++--------- query/migration.sql | 12 +- sido-cli/src/test/resources/log4j2.xml | 2 +- sido-gwt/.gitignore | 1 + .../production/META-INF/persistence.xml | 2 +- .../sido/gwt/server/SIDO-administration-fr.md | 2 + verification/src/test/resources/log4j2.xml | 2 +- 11 files changed, 139 insertions(+), 120 deletions(-) create mode 100644 .gitignore create mode 100644 sido-gwt/.gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..de13b4b6 --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +.checkstyle +.classpath +logs +.pmd +.pmdruleset.xml +pom.xml.versionsBackup +.project +.settings +target \ No newline at end of file diff --git a/README.md b/README.md index a3496b10..8a417178 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ Système d'Information pour les Données Orphelines +[](https://archive.softwareheritage.org/browse/origin/?origin_url=https://forgemia.inra.fr/tempo/sido) + ## Goals - Provide an information system for data that doesn't have one @@ -13,51 +15,57 @@ Système d'Information pour les Données Orphelines ## Features SIDO takes advantage of Maven's modular architecture, and consists of 6 modules: -* sido-gwt contains the web application -* sido-rs contains model classes for data export webservice -* sido-verification contains the methods for validating inserted files -* sido-cli contains a client that checks the conformity of parameter files -* sido-createSchemaTables creates SQL tables for parameter files -* sido-eml contains a utility for generating metadata files in EML format + +- sido-gwt contains the web application +- sido-rs contains model classes for data export webservice +- sido-verification contains the methods for validating inserted files +- sido-cli contains a client that checks the conformity of parameter files +- sido-createSchemaTables creates SQL tables for parameter files +- sido-eml contains a utility for generating metadata files in EML format ## Development **1. Database** -To create the application database : +To create the application database: + - create a user for the application: + ``` $ sudo su postgres $ psql postgres=# CREATE USER sido WITH PASSWORD 'sido'; ``` - + - create the application database : + ``` postgres=# CREATE DATABASE sido WITH OWNER = sido ENCODING = 'UTF8' LC_COLLATE = 'fr_FR.UTF-8' LC_CTYPE = 'fr_FR.UTF-8'; ``` + - quit psql with `\q` -- give login rights to user *sido*: +- give login rights to user _sido_: + ``` $ sudo vi /etc/postgresql/<postgresql version>/main/pg_hba.conf $ sudo /etc/init.d/postgresql reload ``` - + - create the schema by executing the SQL scripts in the `query/` folder, using the `sido` user, in the following order: - 0. `$ psql -U sido -h localhost` (login as command-line user *sido*) + 1. `$ psql -U sido -h localhost` (login as command-line user _sido_) 1. `create_table_app.sql` for application schema - 2. `create_functions_triggers_workbook_history.sql` to create triggers for inserting and deleting workbooks - 3. Optional: `ScriptCreateSchema_ore_diapfc.sql` for a functional dataset + 1. `create_functions_triggers_workbook_history.sql` to create triggers for inserting and deleting workbooks + 1. Optional: `ScriptCreateSchema_ore_diapfc.sql` for a functional dataset -> NB: To execute a SQL script in the *psql* prompt: `\i nom\du_script.sql`. +> NB: To execute a SQL script in the _psql_ prompt: `\i nom\du_script.sql`. **2. Adding the project to an IDE** -Currently, Eclipse (refers to *Eclipse IDE for JavaEE Developers*) is the mainly (only) IDE used to develop SIDO. +Currently, Eclipse (refers to _Eclipse IDE for JavaEE Developers_) is the mainly (only) IDE used to develop SIDO. -* Import the project. -* Define the Maven profile to be executed by clicking on the `tempogwt` project menu: `Maven > Select Maven Profiles... (Ctrl+Alt+P)`. -This choice of profile will allow to use one of the configurations defined in `sido/sido-gwt/src/main/config/`. To create a new one, add it in `pom.xml` and copy and paste an existing development profile, then modify it with the new values. +- Import the project. +- Define the Maven profile to be executed by clicking on the `tempogwt` project menu: `Maven > Select Maven Profiles... (Ctrl+Alt+P)`. + This choice of profile will allow to use one of the configurations defined in `sido/sido-gwt/src/main/config/`. To create a new one, add it in `pom.xml` and copy and paste an existing development profile, then modify it with the new values. Necessary or useful extensions @@ -65,8 +73,6 @@ Necessary or useful extensions - GWT Plugin or a GWT SDK - Lombok (installed from https://projectlombok.org/) - Eclipse m2e -- Subversive SVN Connectors -- Subversive SVN Integration for the M2E Project **3. Code quality** @@ -78,44 +84,47 @@ All classes, class methods and class properties must be documented as soon as th **1. Configuration** -Refer to [SIDO administration documentation](/sido-gwt/src/main/resources/fr/soeretempo/sido/gwt/server/SIDO-administration-fr.md) (in french). +Refer to [SIDO administration documentation](/sido-gwt/src/main/resources/fr/soeretempo/sido/gwt/server/SIDO-administration-fr.md) (in French). **2. OpenID Connect** SIDO interacts with any identity provider that respects the specifications of OpenID Connect to return a given name, family name, an uid and optionally an email address. To register a new OpenID Connect Identity Provider (OIDCIDP), SIDO must be registered on the website of the IDP. Then, add in oidcidp table the following : -a name and a logo to display, an ID that will define the order in which the IDPs are displayed, -an url, an [issuer url](https://auth0.com/docs/authenticate/identity-providers/enterprise-identity-providers/oidc) (without the /.well-known/openid-configuration following), +a name and a logo to display, an ID that will define the order in which the IDPs are displayed, +an url, an [issuer url](https://auth0.com/docs/authenticate/identity-providers/enterprise-identity-providers/oidc) (without the /.well-known/openid-configuration following), a client ID and client secret as filled when registered. **3. Set as administrator** To use SIDO you must configure at least one administrator account. - 1. Open the application in your browser (example: http://localhost:8080/sido-gwt/) - 2. Log in (user account registers in database) - 3. In the **app_user** table, set the *app_user_admin* field, in the row corresponding to the user, to true (to change the user account to administrator). + +1. Open the application in your browser (example: <http://localhost:8080/sido-gwt/>) +2. Log in (user account registers in database) +3. In the **app_user** table, set the _app_user_admin_ field, in the row corresponding to the user, to true (to change the user account to administrator). **4. Add a Datasource** After model and parameter files were created : - 1. Create the database source schema. Example: See point 3. above with *ORE DIAPFC*. This .sql script was created using sido-cli and the parameter file. - 2. In the *app_datasource* table, enter : - - Data source name - - The schema corresponding to the SQL script executed previously - - Names of Excel model and XML files for parameterization (insertion, verification) - 3. Admin account can upgrade any other account to be this datasource's moderator - + +1. Create the database source schema. Example: See point 3. above with _ORE DIAPFC_. This SQL script was created using sido-cli and the parameter file. +2. In the _app_datasource_ table, enter: + - Data source name + - The schema corresponding to the SQL script executed previously + - Names of Excel model and XML files for parameterization (insertion, verification) +3. Admin account can upgrade any other account to be this datasource's moderator + ## Further documentation Documentation files are available in the `sido-gwt/src/main/resources/fr/soeretempo/sido/gwt/server/` folder in Markdown format and directly in the online application. -This documentation covers : -* [SIDO installation, configuration and administration](/sido-gwt/src/main/resources/fr/soeretempo/sido/gwt/server/SIDO-administration-fr.md) (only in french), -* [Developper oriented documentation](/DEV_FR.md) (only in french), -* [JSON parameterization] (/sido-gwt/src/main/resources/fr/soeretempo/sido/gwt/server/JSON-setting-fr.md) (only in french), -* [REST Web Services User Guide](/sido-gwt/src/main/resources/fr/soeretempo/sido/gwt/server/SIDO-webservices-fr.md) (only in french), -* [XML parameterization (french)](/sido-gwt/src/main/resources/fr/soeretempo/sido/gwt/server/xml-setting-fr.md) also in [english](/sido-gwt/src/main/resources/fr/soeretempo/sido/gwt/server/xml-setting-en.md), -* [SIDO application user guide (french)](/sido-gwt/src/main/resources/fr/soeretempo/sido/gwt/server/manual-fr.md) also in [english](/sido-gwt/src/main/resources/fr/soeretempo/sido/gwt/server/manual-en.md) +This documentation covers: + +- [SIDO installation, configuration and administration](/sido-gwt/src/main/resources/fr/soeretempo/sido/gwt/server/SIDO-administration-fr.md) (only in French), +- [Developer oriented documentation](/DEV_FR.md) (only in French), +- [JSON parameterization](/sido-gwt/src/main/resources/fr/soeretempo/sido/gwt/server/JSON-setting-fr.md) (only in French), +- [REST Web Services User Guide](/sido-gwt/src/main/resources/fr/soeretempo/sido/gwt/server/SIDO-webservices-fr.md) (only in French), +- [XML parameterization (French)](/sido-gwt/src/main/resources/fr/soeretempo/sido/gwt/server/xml-setting-fr.md) also in [English](/sido-gwt/src/main/resources/fr/soeretempo/sido/gwt/server/xml-setting-en.md), +- [SIDO application user guide (French)](/sido-gwt/src/main/resources/fr/soeretempo/sido/gwt/server/manual-fr.md) also in [English](/sido-gwt/src/main/resources/fr/soeretempo/sido/gwt/server/manual-en.md) ## Authors diff --git a/codemeta.json b/codemeta.json index 8737bc27..4609b83a 100644 --- a/codemeta.json +++ b/codemeta.json @@ -19,6 +19,9 @@ }, { "@type": "Person", + "affiliation": { + "@id": "https://agroclim.inrae.fr" + }, "familyName": "El Hasnaoui", "givenName": "Mohamed" }, @@ -32,12 +35,16 @@ "givenName": "Louis" } ], - "codeRepository": "https://w3.avignon.inra.fr/svn/sioo/sido", - "contIntegration": "http://agroclimvm45:8080/job/sido/", + "codeRepository": "https://forgemia.inra.fr/tempo/sido", + "contIntegration": "https://agroclim.inrae.fr/jenkins/job/sido/", + "dateCreated": "2018-07-16", + "dateModified": "2024-12-17", + "datePublished": "2020-09-08", "description": "SIDO is a phenological data submission and verification tool.", + "developmentStatus": "active", "identifier": "fr.soeretempo.sido", "issueTracker": "https://w3.avignon.inrae.fr/forge/projects/sioo", - "license": "https://www.gnu.org/licenses/gpl-3.0.txt", + "license": "http://spdx.org/licenses/GPL-3.0-only", "name": "SIDO", "producer": { "@id": "https://agroclim.inrae.fr", diff --git a/config/cpd-suppressions.properties b/config/cpd-suppressions.properties index e984f574..47f5b126 100644 --- a/config/cpd-suppressions.properties +++ b/config/cpd-suppressions.properties @@ -17,3 +17,4 @@ # # See https://maven.apache.org/plugins/maven-pmd-plugin/examples/violation-exclusions.html +fr.soeretempo.sido.gwt.client.managedatasource.datasetadmin.DatasetAdminModal,fr.soeretempo.sido.gwt.client.managedatasource.datasourceadmin.DatasourceAdminModal diff --git a/pom.xml b/pom.xml index 55f5fe96..a4620d74 100644 --- a/pom.xml +++ b/pom.xml @@ -31,8 +31,8 @@ <packaging>pom</packaging> <inceptionYear>2018</inceptionYear> <scm> - <connection>scm:svn:https://w3.avignon.inra.fr/svn/sioo/sido</connection> - <url>https://w3.avignon.inra.fr/svn/sioo/sido</url> + <connection>scm:git:https://forgemia.inra.fr/tempo/sido</connection> + <url>https://forgemia.inra.fr/tempo/sido</url> </scm> <url>https://sido.pheno.fr/</url> <ciManagement> @@ -142,9 +142,9 @@ <version>1.7.25</version> </dependency> <dependency> - <groupId>org.apache.logging.log4j</groupId> - <artifactId>log4j-slf4j-impl</artifactId> - <version>${log4j.version}</version> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-slf4j-impl</artifactId> + <version>${log4j.version}</version> </dependency> <!-- Lombok --> @@ -163,31 +163,31 @@ </dependency> <!-- POI --> <dependency> - <groupId>org.apache.poi</groupId> - <artifactId>poi</artifactId> - <version>${apache.poi.version}</version> - </dependency> - <dependency> - <groupId>org.apache.poi</groupId> - <artifactId>poi-ooxml</artifactId> - <version>${apache.poi.version}</version> - </dependency> - <dependency> - <groupId>org.apache.poi</groupId> - <artifactId>poi-ooxml-schemas</artifactId> - <version>4.1.2</version> - </dependency> - <dependency> - <groupId>org.apache.commons</groupId> - <artifactId>commons-collections4</artifactId> - <version>4.4</version> - </dependency> + <groupId>org.apache.poi</groupId> + <artifactId>poi</artifactId> + <version>${apache.poi.version}</version> + </dependency> + <dependency> + <groupId>org.apache.poi</groupId> + <artifactId>poi-ooxml</artifactId> + <version>${apache.poi.version}</version> + </dependency> + <dependency> + <groupId>org.apache.poi</groupId> + <artifactId>poi-ooxml-schemas</artifactId> + <version>4.1.2</version> + </dependency> + <dependency> + <groupId>org.apache.commons</groupId> + <artifactId>commons-collections4</artifactId> + <version>4.4</version> + </dependency> <!-- Dependency for POI, will be missing in sido-verification if not present --> - <dependency> - <groupId>commons-io</groupId> - <artifactId>commons-io</artifactId> - <version>2.15.1</version> - </dependency> + <dependency> + <groupId>commons-io</groupId> + <artifactId>commons-io</artifactId> + <version>2.15.1</version> + </dependency> </dependencies> </dependencyManagement> @@ -278,7 +278,7 @@ <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>buildnumber-maven-plugin</artifactId> - <version>1.4</version> + <version>3.2.0</version> <executions> <execution> <phase>validate</phase> @@ -288,13 +288,13 @@ </execution> </executions> <configuration> - <revisionOnScmFailure>no.scm.config.in.pom</revisionOnScmFailure> <doCheck>false</doCheck> <doUpdate>false</doUpdate> <format>{0}</format> <items> <item>scmVersion</item> </items> + <shortRevisionLength>8</shortRevisionLength> </configuration> </plugin> @@ -353,7 +353,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-pmd-plugin</artifactId> - <version>3.13.0</version> + <version>3.25.0</version> <configuration> <excludes> <exclude>target/generated-sources/*.java</exclude> @@ -389,26 +389,26 @@ <groupId>com.mycila</groupId> <artifactId>license-maven-plugin</artifactId> <version>4.0.rc1</version> - <configuration> - <licenseSets> - <licenseSet> - <header>com/mycila/maven/plugin/license/templates/GPL-3.txt</header> - <excludes> - <exclude>README.md</exclude> - <exclude>**/lombok.config</exclude> - <exclude>**/*.csv</exclude> - <exclude>**/*.key</exclude> - <exclude>**/*.min.css</exclude> - <exclude>**/*.min.js</exclude> - <exclude>**/*.txt</exclude> - <exclude>fichier_parametres_xml/*</exclude> - <exclude>bin/tokei</exclude> - <exclude>config/sun_checks.xml</exclude> - <exclude>src/main/webapp/sitemap.xml</exclude> - <exclude>sido-gwt/src/main/webapp/swagger-ui*</exclude> - </excludes> - </licenseSet> - </licenseSets> + <configuration> + <licenseSets> + <licenseSet> + <header>com/mycila/maven/plugin/license/templates/GPL-3.txt</header> + <excludes> + <exclude>README.md</exclude> + <exclude>**/lombok.config</exclude> + <exclude>**/*.csv</exclude> + <exclude>**/*.key</exclude> + <exclude>**/*.min.css</exclude> + <exclude>**/*.min.js</exclude> + <exclude>**/*.txt</exclude> + <exclude>fichier_parametres_xml/*</exclude> + <exclude>bin/tokei</exclude> + <exclude>config/sun_checks.xml</exclude> + <exclude>src/main/webapp/sitemap.xml</exclude> + <exclude>sido-gwt/src/main/webapp/swagger-ui*</exclude> + </excludes> + </licenseSet> + </licenseSets> <properties> <owner>TEMPO</owner> <email>contact-tempo@inrae.fr</email> @@ -416,16 +416,16 @@ </configuration> </plugin> </plugins> - <pluginManagement> - <plugins> - <!-- To ensure deployment properties are loaded from settings.xml, maven-deploy-plugin >= 2.8 is needed --> - <!-- maven-deploy-plugin-3.0.0-M1 is broken with classifiers and needs changes in .m2/settings.xml --> - <plugin> - <artifactId>maven-deploy-plugin</artifactId> - <version>2.8.2</version> - </plugin> - </plugins> - </pluginManagement> + <pluginManagement> + <plugins> + <!-- To ensure deployment properties are loaded from settings.xml, maven-deploy-plugin >= 2.8 is needed --> + <!-- maven-deploy-plugin-3.0.0-M1 is broken with classifiers and needs changes in .m2/settings.xml --> + <plugin> + <artifactId>maven-deploy-plugin</artifactId> + <version>2.8.2</version> + </plugin> + </plugins> + </pluginManagement> </build> <reporting> @@ -498,7 +498,7 @@ </reportSets> </plugin> - <!-- mvn pdf:pdf -DincludeReports=false --> + <!-- mvn pdf:pdf -DincludeReports=false --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-pdf-plugin</artifactId> diff --git a/query/migration.sql b/query/migration.sql index f9a90006..006df4cf 100644 --- a/query/migration.sql +++ b/query/migration.sql @@ -195,6 +195,7 @@ language plpgsql; -- -- Suppression eppn, ajout emailnotconfirmed +-- #9540 − Ajout de last_connection à User. -- CREATE OR REPLACE FUNCTION upgrade20241025() RETURNS boolean AS $BODY$ @@ -206,17 +207,6 @@ BEGIN ALTER TABLE public.app_user ALTER COLUMN app_user_email DROP NOT NULL; UPDATE public.app_user SET app_user_email = NULL WHERE app_user_email = ''; ALTER TABLE public.app_user ADD app_user_emailnotconfirmed text; - RETURN true; -END -$BODY$ -language plpgsql; - --- --- Ajout de last_connection à User. --- -CREATE OR REPLACE FUNCTION upgrade20241125() RETURNS boolean AS -$BODY$ -BEGIN ALTER TABLE public.app_user ADD app_user_last_connection timestamp; RETURN true; END diff --git a/sido-cli/src/test/resources/log4j2.xml b/sido-cli/src/test/resources/log4j2.xml index 68517310..e720858d 100644 --- a/sido-cli/src/test/resources/log4j2.xml +++ b/sido-cli/src/test/resources/log4j2.xml @@ -39,7 +39,7 @@ </Appenders> <Loggers> <Root level="TRACE"> - <AppenderRef ref="console" level="all"/> + <AppenderRef ref="console" level="info"/> <AppenderRef ref="file" level ="trace"/> </Root> <Logger name="org.jboss" level="warn" /> diff --git a/sido-gwt/.gitignore b/sido-gwt/.gitignore new file mode 100644 index 00000000..4c47ac00 --- /dev/null +++ b/sido-gwt/.gitignore @@ -0,0 +1 @@ +test_eml.xml \ No newline at end of file diff --git a/sido-gwt/src/main/config/production/META-INF/persistence.xml b/sido-gwt/src/main/config/production/META-INF/persistence.xml index f26cae9f..52a47e09 100644 --- a/sido-gwt/src/main/config/production/META-INF/persistence.xml +++ b/sido-gwt/src/main/config/production/META-INF/persistence.xml @@ -38,7 +38,7 @@ <property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect" /> <!-- create / create-drop / update --> - <property name="hibernate.hbm2ddl.auto" value="update" /> + <property name="hibernate.hbm2ddl.auto" value="none" /> <!-- Show SQL in console --> <property name="hibernate.show_sql" value="false" /> diff --git a/sido-gwt/src/main/resources/fr/soeretempo/sido/gwt/server/SIDO-administration-fr.md b/sido-gwt/src/main/resources/fr/soeretempo/sido/gwt/server/SIDO-administration-fr.md index 3e1f5f19..0c7130fe 100644 --- a/sido-gwt/src/main/resources/fr/soeretempo/sido/gwt/server/SIDO-administration-fr.md +++ b/sido-gwt/src/main/resources/fr/soeretempo/sido/gwt/server/SIDO-administration-fr.md @@ -150,6 +150,8 @@ Le fichier `context.xml` de Tomcat doit contenir les paramètres suivants : <Parameter name="sido.dataverse.token" value="aaeeaaff-aabb-aabb-aabb-aaffddbbaadd" override="false" /> <!-- nom du profil, ajouté dans les entêtes de courriels --> <Parameter name="sido.environment" value="DEV" override="false" /> + <!-- mot de passe pour la connexion JDBC --> + <Parameter name="sido.jdbc.password" value="xxxxxxx" /> <!-- destinataire des courriels de log et autres envois d'administration --> <Parameter name="sido.smtp.to" value="support-XXXX@inrae.fr" override="false" /> <Parameter name="sido.smtp.host" value="smtp.inrae.fr" override="false" /> diff --git a/verification/src/test/resources/log4j2.xml b/verification/src/test/resources/log4j2.xml index e1e4d38f..8f244255 100644 --- a/verification/src/test/resources/log4j2.xml +++ b/verification/src/test/resources/log4j2.xml @@ -32,7 +32,7 @@ </Console> </Appenders> <Loggers> - <Root level="trace"> + <Root level="info"> <AppenderRef ref="console" /> </Root> <Logger name="org.apache" level="warn" /> -- GitLab From d274c469e66b853e408f0d9cdbdffe9cbcc13c60 Mon Sep 17 00:00:00 2001 From: Olivier Maury <Olivier.Maury@inrae.fr> Date: Tue, 17 Dec 2024 16:42:11 +0100 Subject: [PATCH 02/19] Supprimer parentOrganization pour SWH --- codemeta.json | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/codemeta.json b/codemeta.json index 4609b83a..987787e8 100644 --- a/codemeta.json +++ b/codemeta.json @@ -50,13 +50,7 @@ "@id": "https://agroclim.inrae.fr", "@type": "Organization", "name": "INRAE AgroClim", - "url": "https://agroclim.inrae.fr/", - "parentOrganization": { - "@id": "https://www.inrae.fr", - "@type": "Organization", - "name": "INRAE", - "url": "https://www.inrae.fr/" - } + "url": "https://agroclim.inrae.fr/" }, "programmingLanguage": "Java", "runtimePlatform": "Java", -- GitLab From f6e9a0b506224dc4befb1670bf6141f7c8c8725f Mon Sep 17 00:00:00 2001 From: Olivier Maury <Olivier.Maury@inrae.fr> Date: Tue, 17 Dec 2024 17:25:15 +0100 Subject: [PATCH 03/19] Modification de codemeta pour SWH --- codemeta.json | 736 ++++++++++++++++++++++++++++---------------------- 1 file changed, 408 insertions(+), 328 deletions(-) diff --git a/codemeta.json b/codemeta.json index 987787e8..63593893 100644 --- a/codemeta.json +++ b/codemeta.json @@ -1,329 +1,409 @@ { - "@context": [ - "https://doi.org/10.5063/schema/codemeta-2.0", - "https://w3id.org/software-iodata", - "https://raw.githubusercontent.com/jantman/repostatus.org/master/badges/latest/ontology.jsonld", - "https://schema.org", - "https://w3id.org/software-types" - ], - "@type": "SoftwareSourceCode", - "author": [ - { - "@id": "https://orcid.org/0000-0001-9016-9720", - "@type": "Person", - "affiliation": { - "@id": "https://agroclim.inrae.fr" - }, - "familyName": "Maury", - "givenName": "Olivier" - }, - { - "@type": "Person", - "affiliation": { - "@id": "https://agroclim.inrae.fr" - }, - "familyName": "El Hasnaoui", - "givenName": "Mohamed" - }, - { - "@id": "https://orcid.org/0000-0002-8915-8386", - "@type": "Person", - "affiliation": { - "@id": "https://agroclim.inrae.fr" - }, - "familyName": "Tromel", - "givenName": "Louis" - } - ], - "codeRepository": "https://forgemia.inra.fr/tempo/sido", - "contIntegration": "https://agroclim.inrae.fr/jenkins/job/sido/", - "dateCreated": "2018-07-16", - "dateModified": "2024-12-17", - "datePublished": "2020-09-08", - "description": "SIDO is a phenological data submission and verification tool.", - "developmentStatus": "active", - "identifier": "fr.soeretempo.sido", - "issueTracker": "https://w3.avignon.inrae.fr/forge/projects/sioo", - "license": "http://spdx.org/licenses/GPL-3.0-only", - "name": "SIDO", - "producer": { - "@id": "https://agroclim.inrae.fr", - "@type": "Organization", - "name": "INRAE AgroClim", - "url": "https://agroclim.inrae.fr/" - }, - "programmingLanguage": "Java", - "runtimePlatform": "Java", - "softwareRequirements": [ - { - "@type": "SoftwareApplication", - "identifier": "javax.enterprise.cdi-api", - "name": "cdi-api", - "version": "1.2" - }, - { - "@type": "SoftwareApplication", - "identifier": "commons-fileupload.commons-fileupload", - "name": "commons-fileupload", - "version": "1.3.3" - }, - { - "@type": "SoftwareApplication", - "identifier": "com.researchspace.dataverse-client-java", - "name": "dataverse-client-java", - "version": "1.0.2" - }, - { - "@type": "SoftwareApplication", - "identifier": "com.vladsch.flexmark.flexmark-all", - "name": "flexmark-all", - "version": "0.36.8" - }, - { - "@type": "SoftwareApplication", - "identifier": "org.gwtproject.gwt-dev", - "name": "gwt-dev" - }, - { - "@type": "SoftwareApplication", - "identifier": "org.gwtproject.gwt-servlet", - "name": "gwt-servlet" - }, - { - "@type": "SoftwareApplication", - "identifier": "org.gwtproject.gwt-user", - "name": "gwt-user" - }, - { - "@type": "SoftwareApplication", - "identifier": "org.gwtbootstrap3.gwtbootstrap3", - "name": "gwtbootstrap3", - "version": "0.9.4" - }, - { - "@type": "SoftwareApplication", - "identifier": "org.gwtbootstrap3.gwtbootstrap3-extras", - "name": "gwtbootstrap3-extras", - "version": "0.9.4" - }, - { - "@type": "SoftwareApplication", - "identifier": "com.h2database.h2", - "name": "h2", - "version": "2.2.224" - }, - { - "@type": "SoftwareApplication", - "identifier": "org.hibernate.hibernate-c3p0", - "name": "hibernate-c3p0" - }, - { - "@type": "SoftwareApplication", - "identifier": "org.hibernate.hibernate-core", - "name": "hibernate-core" - }, - { - "@type": "SoftwareApplication", - "identifier": "com.fasterxml.jackson.core.jackson-annotations", - "name": "jackson-annotations" - }, - { - "@type": "SoftwareApplication", - "identifier": "com.fasterxml.jackson.core.jackson-core", - "name": "jackson-core" - }, - { - "@type": "SoftwareApplication", - "identifier": "com.fasterxml.jackson.core.jackson-databind", - "name": "jackson-databind" - }, - { - "@type": "SoftwareApplication", - "identifier": "com.auth0.java-jwt", - "name": "java-jwt", - "version": "3.3.0" - }, - { - "@type": "SoftwareApplication", - "identifier": "javax.javaee-web-api", - "name": "javaee-web-api", - "version": "7.0" - }, - { - "@type": "SoftwareApplication", - "identifier": "javax.inject.javax.inject", - "name": "javax.inject", - "version": "1" - }, - { - "@type": "SoftwareApplication", - "identifier": "com.sun.mail.javax.mail", - "name": "javax.mail", - "version": "1.6.2" - }, - { - "@type": "SoftwareApplication", - "identifier": "javax.mail.javax.mail-api", - "name": "javax.mail-api", - "version": "1.6.2" - }, - { - "@type": "SoftwareApplication", - "identifier": "javax.ws.rs.javax.ws.rs-api", - "name": "javax.ws.rs-api", - "version": "2.1" - }, - { - "@type": "SoftwareApplication", - "identifier": "org.glassfish.jersey.ext.cdi.jersey-cdi1x", - "name": "jersey-cdi1x" - }, - { - "@type": "SoftwareApplication", - "identifier": "org.glassfish.jersey.ext.cdi.jersey-cdi1x-servlet", - "name": "jersey-cdi1x-servlet" - }, - { - "@type": "SoftwareApplication", - "identifier": "org.glassfish.jersey.containers.jersey-container-servlet", - "name": "jersey-container-servlet" - }, - { - "@type": "SoftwareApplication", - "identifier": "org.glassfish.jersey.ext.jersey-entity-filtering", - "name": "jersey-entity-filtering" - }, - { - "@type": "SoftwareApplication", - "identifier": "org.glassfish.jersey.inject.jersey-hk2", - "name": "jersey-hk2" - }, - { - "@type": "SoftwareApplication", - "identifier": "org.glassfish.jersey.media.jersey-media-json-jackson", - "name": "jersey-media-json-jackson" - }, - { - "@type": "SoftwareApplication", - "identifier": "org.glassfish.jersey.test-framework.jersey-test-framework-core", - "name": "jersey-test-framework-core" - }, - { - "@type": "SoftwareApplication", - "identifier": "org.glassfish.jersey.test-framework.providers.jersey-test-framework-provider-grizzly2", - "name": "jersey-test-framework-provider-grizzly2" - }, - { - "@type": "SoftwareApplication", - "identifier": "junit.junit", - "name": "junit" - }, - { - "@type": "SoftwareApplication", - "identifier": "org.apache.logging.log4j.log4j-api", - "name": "log4j-api" - }, - { - "@type": "SoftwareApplication", - "identifier": "org.apache.logging.log4j.log4j-core", - "name": "log4j-core" - }, - { - "@type": "SoftwareApplication", - "identifier": "org.apache.logging.log4j.log4j-slf4j-impl", - "name": "log4j-slf4j-impl" - }, - { - "@type": "SoftwareApplication", - "identifier": "org.apache.logging.log4j.log4j-web", - "name": "log4j-web" - }, - { - "@type": "SoftwareApplication", - "identifier": "com.nimbusds.oauth2-oidc-sdk", - "name": "oauth2-oidc-sdk", - "version": "11.9.1" - }, - { - "@type": "SoftwareApplication", - "identifier": "org.postgresql.postgresql", - "name": "postgresql", - "version": "42.7.1" - }, - { - "@type": "SoftwareApplication", - "identifier": "fr.inrae.agroclim.sava-core", - "name": "sava-core", - "version": "1.0.0" - }, - { - "@type": "SoftwareApplication", - "identifier": "fr.soeretempo.sido-eml", - "name": "sido-eml" - }, - { - "@type": "SoftwareApplication", - "identifier": "fr.soeretempo.sido-rs", - "name": "sido-rs" - }, - { - "@type": "SoftwareApplication", - "identifier": "fr.soeretempo.sido-verification", - "name": "sido-verification" - }, - { - "@type": "SoftwareApplication", - "identifier": "io.swagger.core.v3.swagger-jaxrs2", - "name": "swagger-jaxrs2" - }, - { - "@type": "SoftwareApplication", - "identifier": "io.swagger.core.v3.swagger-jaxrs2-servlet-initializer", - "name": "swagger-jaxrs2-servlet-initializer" - }, - { - "@type": "SoftwareApplication", - "identifier": "org.jboss.weld.servlet.weld-servlet-shaded", - "name": "weld-servlet-shaded", - "version": "3.0.4.Final" - }, - { - "@type": "SoftwareApplication", - "identifier": "org.projectlombok.lombok", - "name": "lombok" - }, - { - "@type": "SoftwareApplication", - "identifier": "javax.xml.bind.jaxb-api", - "name": "jaxb-api", - "version": "2.3.1" - }, - { - "@type": "SoftwareApplication", - "identifier": "org.apache.commons.commons-collections4", - "name": "commons-collections4" - }, - { - "@type": "SoftwareApplication", - "identifier": "org.glassfish.jaxb.jaxb-runtime", - "name": "jaxb-runtime", - "version": "2.3.6" - }, - { - "@type": "SoftwareApplication", - "identifier": "org.apache.poi.poi", - "name": "poi" - }, - { - "@type": "SoftwareApplication", - "identifier": "org.apache.poi.poi-ooxml", - "name": "poi-ooxml" - }, - { - "@type": "SoftwareApplication", - "identifier": "org.apache.poi.poi-ooxml-schemas", - "name": "poi-ooxml-schemas" - } - ], - "version": "1.1.8" -} \ No newline at end of file + "@context": [ + "https://doi.org/10.5063/schema/codemeta-2.0", + "https://w3id.org/software-iodata", + "https://raw.githubusercontent.com/jantman/repostatus.org/master/badges/latest/ontology.jsonld", + "https://schema.org", + "https://w3id.org/software-types" + ], + "@type": "SoftwareSourceCode", + "author": [ + { + "@id": "https://orcid.org/0000-0001-9016-9720", + "@type": "Person", + "affiliation": { + "@id": "https://agroclim.inrae.fr" + }, + "familyName": "Maury", + "givenName": "Olivier" + }, + { + "type": "schema:Role", + "schema:author": "https://orcid.org/0000-0001-9016-9720", + "schema:roleName": "Architect" + }, + { + "type": "schema:Role", + "schema:author": "https://orcid.org/0000-0001-9016-9720", + "schema:roleName": "Developer" + }, + { + "@id": "https://orcid.org/0000-0002-8915-8386", + "@type": "Person", + "affiliation": { + "@id": "https://agroclim.inrae.fr" + }, + "familyName": "Tromel", + "givenName": "Louis" + }, + { + "type": "schema:Role", + "schema:author": "https://orcid.org/0000-0002-8915-8386", + "schema:endDate": "2024-12-31", + "schema:roleName": "Developer", + "schema:startDate": "2020-07-01" + }, + { + "@id": "_:author_2", + "@type": "Person", + "affiliation": { + "@id": "https://agroclim.inrae.fr" + }, + "familyName": "El Hasnaoui", + "givenName": "Mohamed" + }, + { + "type": "schema:Role", + "schema:author": "_:author_2", + "schema:endDate": "2019-12-31", + "schema:roleName": "Developer", + "schema:startDate": "2018-07-01" + } + ], + "codeRepository": "https://forgemia.inra.fr/tempo/sido", + "contIntegration": "https://agroclim.inrae.fr/jenkins/job/sido/", + "contributor": [ + { + "@id": "https://orcid.org/0000-0003-2666-2558", + "@type": "Person", + "affiliation": { + "type": "Organization", + "name": "CEFE, CNRS" + }, + "familyName": "Quidoz", + "givenName": "Marie-Claude" + }, + { + "@type": "schema:Role", + "contributor": "https://orcid.org/0000-0003-2666-2558", + "schema:endDate": "2022-12-31", + "schema:roleName": "reviewer", + "schema:startDate": "2018-07-16" + }, + { + "id": "https://orcid.org/0000-0001-6941-9844", + "type": "Person", + "affiliation": { + "id": "https://agroclim.inrae.fr", + "type": "Organization" + }, + "familyName": "GarcÃa de Cortázar-Atauri", + "givenName": "Iñaki" + }, + { + "type": "schema:Role", + "contributor": "https://orcid.org/0000-0001-6941-9844", + "schema:roleName": "Product Owner" + }, + { + "id": "https://orcid.org/0000-0003-3308-8785", + "type": "Person", + "affiliation": { + "type": "Organization", + "name": "CEFE, CNRS" + }, + "familyName": "Chuine", + "givenName": "Isabelle" + }, + { + "type": "schema:Role", + "contributor": "https://orcid.org/0000-0003-3308-8785", + "schema:roleName": "Product Owner" + } + ], + "dateCreated": "2018-07-16", + "dateModified": "2024-12-17", + "datePublished": "2020-09-08", + "description": "SIDO is a phenological data submission and verification tool.", + "developmentStatus": "active", + "funder": { + "@type": "Organization", + "name": "TEMPO" + }, + "identifier": "fr.soeretempo.sido", + "isPartOf": "https://tempo.pheno.fr", + "issueTracker": "https://w3.avignon.inrae.fr/forge/projects/sioo", + "license": "http://spdx.org/licenses/GPL-3.0-only", + "name": "SIDO", + "producer": { + "@id": "https://agroclim.inrae.fr", + "@type": "Organization", + "name": "INRAE AgroClim", + "url": "https://agroclim.inrae.fr/" + }, + "programmingLanguage": "Java", + "readme": "https://forgemia.inra.fr/tempo/sido/-/blob/v1.1.8/README.md", + "runtimePlatform": "Java", + "softwareRequirements": [ + { + "@type": "SoftwareApplication", + "identifier": "javax.enterprise.cdi-api", + "name": "cdi-api", + "version": "1.2" + }, + { + "@type": "SoftwareApplication", + "identifier": "commons-fileupload.commons-fileupload", + "name": "commons-fileupload", + "version": "1.3.3" + }, + { + "@type": "SoftwareApplication", + "identifier": "com.researchspace.dataverse-client-java", + "name": "dataverse-client-java", + "version": "1.0.2" + }, + { + "@type": "SoftwareApplication", + "identifier": "com.vladsch.flexmark.flexmark-all", + "name": "flexmark-all", + "version": "0.36.8" + }, + { + "@type": "SoftwareApplication", + "identifier": "org.gwtproject.gwt-dev", + "name": "gwt-dev" + }, + { + "@type": "SoftwareApplication", + "identifier": "org.gwtproject.gwt-servlet", + "name": "gwt-servlet" + }, + { + "@type": "SoftwareApplication", + "identifier": "org.gwtproject.gwt-user", + "name": "gwt-user" + }, + { + "@type": "SoftwareApplication", + "identifier": "org.gwtbootstrap3.gwtbootstrap3", + "name": "gwtbootstrap3", + "version": "0.9.4" + }, + { + "@type": "SoftwareApplication", + "identifier": "org.gwtbootstrap3.gwtbootstrap3-extras", + "name": "gwtbootstrap3-extras", + "version": "0.9.4" + }, + { + "@type": "SoftwareApplication", + "identifier": "com.h2database.h2", + "name": "h2", + "version": "2.2.224" + }, + { + "@type": "SoftwareApplication", + "identifier": "org.hibernate.hibernate-c3p0", + "name": "hibernate-c3p0" + }, + { + "@type": "SoftwareApplication", + "identifier": "org.hibernate.hibernate-core", + "name": "hibernate-core" + }, + { + "@type": "SoftwareApplication", + "identifier": "com.fasterxml.jackson.core.jackson-annotations", + "name": "jackson-annotations" + }, + { + "@type": "SoftwareApplication", + "identifier": "com.fasterxml.jackson.core.jackson-core", + "name": "jackson-core" + }, + { + "@type": "SoftwareApplication", + "identifier": "com.fasterxml.jackson.core.jackson-databind", + "name": "jackson-databind" + }, + { + "@type": "SoftwareApplication", + "identifier": "com.auth0.java-jwt", + "name": "java-jwt", + "version": "3.3.0" + }, + { + "@type": "SoftwareApplication", + "identifier": "javax.javaee-web-api", + "name": "javaee-web-api", + "version": "7.0" + }, + { + "@type": "SoftwareApplication", + "identifier": "javax.inject.javax.inject", + "name": "javax.inject", + "version": "1" + }, + { + "@type": "SoftwareApplication", + "identifier": "com.sun.mail.javax.mail", + "name": "javax.mail", + "version": "1.6.2" + }, + { + "@type": "SoftwareApplication", + "identifier": "javax.mail.javax.mail-api", + "name": "javax.mail-api", + "version": "1.6.2" + }, + { + "@type": "SoftwareApplication", + "identifier": "javax.ws.rs.javax.ws.rs-api", + "name": "javax.ws.rs-api", + "version": "2.1" + }, + { + "@type": "SoftwareApplication", + "identifier": "org.glassfish.jersey.ext.cdi.jersey-cdi1x", + "name": "jersey-cdi1x" + }, + { + "@type": "SoftwareApplication", + "identifier": "org.glassfish.jersey.ext.cdi.jersey-cdi1x-servlet", + "name": "jersey-cdi1x-servlet" + }, + { + "@type": "SoftwareApplication", + "identifier": "org.glassfish.jersey.containers.jersey-container-servlet", + "name": "jersey-container-servlet" + }, + { + "@type": "SoftwareApplication", + "identifier": "org.glassfish.jersey.ext.jersey-entity-filtering", + "name": "jersey-entity-filtering" + }, + { + "@type": "SoftwareApplication", + "identifier": "org.glassfish.jersey.inject.jersey-hk2", + "name": "jersey-hk2" + }, + { + "@type": "SoftwareApplication", + "identifier": "org.glassfish.jersey.media.jersey-media-json-jackson", + "name": "jersey-media-json-jackson" + }, + { + "@type": "SoftwareApplication", + "identifier": "org.glassfish.jersey.test-framework.jersey-test-framework-core", + "name": "jersey-test-framework-core" + }, + { + "@type": "SoftwareApplication", + "identifier": "org.glassfish.jersey.test-framework.providers.jersey-test-framework-provider-grizzly2", + "name": "jersey-test-framework-provider-grizzly2" + }, + { + "@type": "SoftwareApplication", + "identifier": "junit.junit", + "name": "junit" + }, + { + "@type": "SoftwareApplication", + "identifier": "org.apache.logging.log4j.log4j-api", + "name": "log4j-api" + }, + { + "@type": "SoftwareApplication", + "identifier": "org.apache.logging.log4j.log4j-core", + "name": "log4j-core" + }, + { + "@type": "SoftwareApplication", + "identifier": "org.apache.logging.log4j.log4j-slf4j-impl", + "name": "log4j-slf4j-impl" + }, + { + "@type": "SoftwareApplication", + "identifier": "org.apache.logging.log4j.log4j-web", + "name": "log4j-web" + }, + { + "@type": "SoftwareApplication", + "identifier": "com.nimbusds.oauth2-oidc-sdk", + "name": "oauth2-oidc-sdk", + "version": "11.9.1" + }, + { + "@type": "SoftwareApplication", + "identifier": "org.postgresql.postgresql", + "name": "postgresql", + "version": "42.7.1" + }, + { + "@type": "SoftwareApplication", + "identifier": "fr.inrae.agroclim.sava-core", + "name": "sava-core", + "version": "1.0.0" + }, + { + "@type": "SoftwareApplication", + "identifier": "fr.soeretempo.sido-eml", + "name": "sido-eml" + }, + { + "@type": "SoftwareApplication", + "identifier": "fr.soeretempo.sido-rs", + "name": "sido-rs" + }, + { + "@type": "SoftwareApplication", + "identifier": "fr.soeretempo.sido-verification", + "name": "sido-verification" + }, + { + "@type": "SoftwareApplication", + "identifier": "io.swagger.core.v3.swagger-jaxrs2", + "name": "swagger-jaxrs2" + }, + { + "@type": "SoftwareApplication", + "identifier": "io.swagger.core.v3.swagger-jaxrs2-servlet-initializer", + "name": "swagger-jaxrs2-servlet-initializer" + }, + { + "@type": "SoftwareApplication", + "identifier": "org.jboss.weld.servlet.weld-servlet-shaded", + "name": "weld-servlet-shaded", + "version": "3.0.4.Final" + }, + { + "@type": "SoftwareApplication", + "identifier": "org.projectlombok.lombok", + "name": "lombok" + }, + { + "@type": "SoftwareApplication", + "identifier": "javax.xml.bind.jaxb-api", + "name": "jaxb-api", + "version": "2.3.1" + }, + { + "@type": "SoftwareApplication", + "identifier": "org.apache.commons.commons-collections4", + "name": "commons-collections4" + }, + { + "@type": "SoftwareApplication", + "identifier": "org.glassfish.jaxb.jaxb-runtime", + "name": "jaxb-runtime", + "version": "2.3.6" + }, + { + "@type": "SoftwareApplication", + "identifier": "org.apache.poi.poi", + "name": "poi" + }, + { + "@type": "SoftwareApplication", + "identifier": "org.apache.poi.poi-ooxml", + "name": "poi-ooxml" + }, + { + "@type": "SoftwareApplication", + "identifier": "org.apache.poi.poi-ooxml-schemas", + "name": "poi-ooxml-schemas" + } + ], + "version": "1.1.8" +} -- GitLab From 0f31176a371a9096ed6001f621c2a13a3fa5a955 Mon Sep 17 00:00:00 2001 From: Olivier Maury <Olivier.Maury@inrae.fr> Date: Tue, 7 Jan 2025 16:36:59 +0100 Subject: [PATCH 04/19] =?UTF-8?q?Modification=20suite=20=C3=A0=20migration?= =?UTF-8?q?=20sur=20Git/GitLab?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + DEV_FR.md | 3 --- codemeta.json | 2 +- pom.xml | 2 +- sido-gwt/config/cpd-suppressions.properties | 1 + sido-gwt/src/main/config/dev-om/log4j2.xml | 5 +---- .../src/main/config/preprod/META-INF/persistence.xml | 2 +- sido-gwt/src/main/config/preprod/log4j2.xml | 4 ---- sido-gwt/src/main/config/production/log4j2.xml | 4 ---- .../sido/gwt/client/resources/SidoConstants.java | 6 ++---- .../fr/soeretempo/sido/gwt/client/ui/UiUtils.java | 7 ++----- .../soeretempo/sido/gwt/server/SessionAttribute.java | 5 +---- .../soeretempo/sido/gwt/server/SidoConfiguration.java | 6 ++---- .../fr/soeretempo/sido/gwt/server/dao/ClientDao.java | 5 +---- .../sido/gwt/server/dao/ClientDaoHibernate.java | 5 +---- .../gwt/server/dataverseclient/DataverseHandler.java | 7 ++++++- .../sido/gwt/server/filter/AntiFlocFilter.java | 5 +---- .../soeretempo/sido/gwt/server/filter/CorsFilter.java | 5 +---- .../soeretempo/sido/gwt/server/mail/MailService.java | 11 ++++++----- .../sido/gwt/server/model/oauth2/Client.java | 5 +---- .../sido/gwt/server/model/oauth2/Scope.java | 5 +---- .../sido/gwt/server/servlet/ChangeLocaleServlet.java | 5 +---- .../sido/gwt/server/servlet/CookiesServlet.java | 5 +---- .../sido/gwt/server/servlet/LegalServlet.java | 5 +---- .../sido/gwt/server/ws/ApplicationConfig.java | 5 +---- .../soeretempo/sido/gwt/server/ws/DataResource.java | 6 ++---- .../sido/gwt/server/ws/JsonWebTokenService.java | 5 +---- .../soeretempo/sido/gwt/server/ws/OauthResource.java | 6 ++---- .../soeretempo/sido/gwt/server/ws/QueryService.java | 7 +++---- .../sido/gwt/server/ws/QueryServiceImpl.java | 7 +++---- .../fr/soeretempo/sido/gwt/shared/RPCException.java | 7 +++---- .../sido/gwt/shared/SessionExpiredException.java | 6 ++---- .../sido/gwt/server/resources/messages_fr.properties | 7 ++++--- .../soeretempo/sido/gwt/server/servlet/credits-en.md | 4 ---- .../soeretempo/sido/gwt/server/servlet/credits-fr.md | 4 ---- .../sido/gwt/server/servlet/legal-notice-en.md | 4 ---- .../sido/gwt/server/servlet/legal-notice-fr.md | 3 --- .../sido/gwt/server/servlet/release-notes-en.md | 3 --- .../sido/gwt/server/servlet/release-notes-fr.md | 4 ---- .../sido/gwt/server/ws/DataResourceTest.java | 7 +++---- .../sido/gwt/server/ws/DatasourceResourceTest.java | 5 +---- .../sido/gwt/server/ws/QueryServiceImplTest.java | 5 +---- .../main/java/fr/soeretempo/sido/rs/GrantType.java | 5 +---- .../fr/soeretempo/sido/rs/JsonDateTimeAdapter.java | 5 +---- .../fr/soeretempo/sido/rs/JsonHttpStatusAdapter.java | 5 +---- .../src/main/java/fr/soeretempo/sido/rs/WsData.java | 5 +---- .../java/fr/soeretempo/sido/rs/WsDatasourceInfo.java | 5 +---- .../fr/soeretempo/sido/rs/WsOauthAccessToken.java | 5 +---- .../main/java/fr/soeretempo/sido/rs/WsProperty.java | 6 ++---- .../src/main/java/fr/soeretempo/sido/rs/WsQuery.java | 5 +---- .../main/java/fr/soeretempo/sido/rs/WsResponse.java | 5 +---- .../verification/resources/messages_fr.properties | 1 - .../sido/verification/VerificationCheckDataTest.java | 6 +----- verification/src/test/resources/log4j2.xml | 3 --- 54 files changed, 71 insertions(+), 191 deletions(-) diff --git a/.gitignore b/.gitignore index de13b4b6..058c7850 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ .checkstyle .classpath +.factorypath logs .pmd .pmdruleset.xml diff --git a/DEV_FR.md b/DEV_FR.md index b13366d3..33bcfbd0 100644 --- a/DEV_FR.md +++ b/DEV_FR.md @@ -164,6 +164,3 @@ Ces documentations concernent : * le guide d'utilisation de l'application SIDO (*manual-fr.md*), * le guide d’utilisation des Web Services REST (*SIDO-webservices-fr.md*). ---- - -$Id$ diff --git a/codemeta.json b/codemeta.json index 63593893..6a75a4c1 100644 --- a/codemeta.json +++ b/codemeta.json @@ -60,7 +60,7 @@ "schema:startDate": "2018-07-01" } ], - "codeRepository": "https://forgemia.inra.fr/tempo/sido", + "codeRepository": "https://forgemia.inra.fr/tempo/sido.git", "contIntegration": "https://agroclim.inrae.fr/jenkins/job/sido/", "contributor": [ { diff --git a/pom.xml b/pom.xml index a4620d74..32c14f80 100644 --- a/pom.xml +++ b/pom.xml @@ -497,7 +497,7 @@ </reportSet> </reportSets> </plugin> - + <!-- mvn pdf:pdf -DincludeReports=false --> <plugin> <groupId>org.apache.maven.plugins</groupId> diff --git a/sido-gwt/config/cpd-suppressions.properties b/sido-gwt/config/cpd-suppressions.properties index abc97ae4..2b0e2cd1 100644 --- a/sido-gwt/config/cpd-suppressions.properties +++ b/sido-gwt/config/cpd-suppressions.properties @@ -17,3 +17,4 @@ # # See https://maven.apache.org/plugins/maven-pmd-plugin/examples/violation-exclusions.html +fr.soeretempo.sido.gwt.client.managedatasource.datasetadmin.DatasetAdminModal,fr.soeretempo.sido.gwt.client.managedatasource.datasourceadmin.DatasourceAdminModal diff --git a/sido-gwt/src/main/config/dev-om/log4j2.xml b/sido-gwt/src/main/config/dev-om/log4j2.xml index 1b17a41a..4588c074 100644 --- a/sido-gwt/src/main/config/dev-om/log4j2.xml +++ b/sido-gwt/src/main/config/dev-om/log4j2.xml @@ -20,9 +20,6 @@ --> <!DOCTYPE Configuration> <!-- SIDO dev-om --> -<!-- Last changed : $Date$ --> -<!-- @author $Author$ --> -<!-- @version $Revision$ --> <Configuration status="info"> <Properties> <Property name="LOG_PATTERN">[%d] %-5p | %c#%M() | %L - %m%n</Property> @@ -61,7 +58,7 @@ <AppenderRef ref="file" /> <AppenderRef ref="SmtpAppender" /> </Root> - + <Logger name="com.mchange.v2" level="info" /> <Logger name="fr.soeretempo.sido" level="trace" /> <Logger name="org.hibernate" level="warn" /> diff --git a/sido-gwt/src/main/config/preprod/META-INF/persistence.xml b/sido-gwt/src/main/config/preprod/META-INF/persistence.xml index f4a9b44f..0038fd32 100644 --- a/sido-gwt/src/main/config/preprod/META-INF/persistence.xml +++ b/sido-gwt/src/main/config/preprod/META-INF/persistence.xml @@ -38,7 +38,7 @@ <property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect" /> <!-- create / create-drop / update --> - <property name="hibernate.hbm2ddl.auto" value="update" /> + <property name="hibernate.hbm2ddl.auto" value="none" /> <!-- Show SQL in console --> <property name="hibernate.show_sql" value="false" /> diff --git a/sido-gwt/src/main/config/preprod/log4j2.xml b/sido-gwt/src/main/config/preprod/log4j2.xml index dbc03901..a17a0922 100644 --- a/sido-gwt/src/main/config/preprod/log4j2.xml +++ b/sido-gwt/src/main/config/preprod/log4j2.xml @@ -20,10 +20,6 @@ --> <!DOCTYPE Configuration> <!-- SIDO preproduction --> -<!-- Last changed : $Date: 2017-08-29 10:14:58 +0200 (mar., 29 août 2017) - $ --> -<!-- @author $Author$ --> -<!-- @version $Revision$ --> <Configuration status="info"> <Appenders> <Console name="console" target="SYSTEM_OUT"> diff --git a/sido-gwt/src/main/config/production/log4j2.xml b/sido-gwt/src/main/config/production/log4j2.xml index dbb9b3cd..4ea5220d 100644 --- a/sido-gwt/src/main/config/production/log4j2.xml +++ b/sido-gwt/src/main/config/production/log4j2.xml @@ -20,10 +20,6 @@ --> <!DOCTYPE Configuration> <!-- SIDO Production --> -<!-- Last changed : $Date: 2017-08-29 10:14:58 +0200 (mar., 29 août 2017) - $ --> -<!-- @author $Author$ --> -<!-- @version $Revision$ --> <Configuration status="info"> <Appenders> <Console name="console" target="SYSTEM_OUT"> diff --git a/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/client/resources/SidoConstants.java b/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/client/resources/SidoConstants.java index 58fde370..fdabdcd7 100644 --- a/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/client/resources/SidoConstants.java +++ b/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/client/resources/SidoConstants.java @@ -22,10 +22,8 @@ import com.google.gwt.i18n.client.Constants; /** * Messages constants to handle localization. * - * Last changed : $Date$ - * - * @author $Author$ - * @version $Revision$ + * @author Olivier Maury + * @author Louis Tromel */ public interface SidoConstants extends Constants { diff --git a/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/client/ui/UiUtils.java b/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/client/ui/UiUtils.java index 5e95ea1e..f64d3f13 100644 --- a/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/client/ui/UiUtils.java +++ b/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/client/ui/UiUtils.java @@ -35,11 +35,8 @@ import fr.soeretempo.sido.gwt.shared.SessionExpiredException; /** * Common utils methods for User Interface. * - * Last changed : $Date$ - * - * @author omaury - * @author $Author$ - * @version $Revision$ + * @author Olivier Maury + * @author Louis Tromel */ public final class UiUtils { diff --git a/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/SessionAttribute.java b/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/SessionAttribute.java index 4fb3df22..330c5020 100644 --- a/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/SessionAttribute.java +++ b/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/SessionAttribute.java @@ -20,10 +20,7 @@ package fr.soeretempo.sido.gwt.server; /** * The key to store data in user session. * - * Last changed : $Date$ - * - * @author $Author$ - * @version $Revision$ + * @author Olivier Maury */ public enum SessionAttribute { /** diff --git a/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/SidoConfiguration.java b/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/SidoConfiguration.java index d64ee8a6..118b72e2 100644 --- a/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/SidoConfiguration.java +++ b/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/SidoConfiguration.java @@ -36,10 +36,8 @@ import lombok.extern.log4j.Log4j2; /** * Load config.properties. * - * Last changed : $Date$ - * - * @author $Author$ - * @version $Revision$ + * @author Olivier Maury + * @author Louis Tromel */ @ApplicationScoped @Log4j2 diff --git a/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/dao/ClientDao.java b/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/dao/ClientDao.java index 815d713f..654cd9ee 100644 --- a/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/dao/ClientDao.java +++ b/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/dao/ClientDao.java @@ -22,10 +22,7 @@ import fr.soeretempo.sido.gwt.server.model.oauth2.Client; /** * DAO for OAuth2 client. * - * Last change $Date$ - * - * @author $Author$ - * @version $Rev $ + * @author Olivier Maury */ public interface ClientDao { diff --git a/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/dao/ClientDaoHibernate.java b/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/dao/ClientDaoHibernate.java index b3b5a6f9..76e495a8 100644 --- a/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/dao/ClientDaoHibernate.java +++ b/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/dao/ClientDaoHibernate.java @@ -26,10 +26,7 @@ import lombok.extern.log4j.Log4j2; /** * DAO for OAuth2 client with Hibernate. * - * Last change $Date$ - * - * @author $Author$ - * @version $Rev $ + * @author Olivier Maury */ @Log4j2 @ApplicationScoped diff --git a/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/dataverseclient/DataverseHandler.java b/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/dataverseclient/DataverseHandler.java index 04ace3e8..d973da0f 100644 --- a/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/dataverseclient/DataverseHandler.java +++ b/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/dataverseclient/DataverseHandler.java @@ -55,6 +55,11 @@ import fr.soeretempo.sido.verification.resources.I18n; import fr.soeretempo.sido.verification.verificationexception.ModelParamIncoherenceException; import lombok.extern.log4j.Log4j2; +/** + * Abstraction for Dataverse handling. + * + * @author Louis Tromel + */ @ApplicationScoped @Log4j2 public class DataverseHandler implements Runnable { @@ -600,7 +605,7 @@ public class DataverseHandler implements Runnable { up = false; if (reminderIfNeeded()) { try { - mailService.dataverseUnreachable(config.get(Key.APP_URL)); + mailService.dataverseUnreachable(config.get(Key.DATAVERSE_URL), config.get(Key.APP_URL)); } catch (final SendMailException e) { LOGGER.catching(e); } diff --git a/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/filter/AntiFlocFilter.java b/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/filter/AntiFlocFilter.java index f4ae4001..c34dfcbb 100644 --- a/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/filter/AntiFlocFilter.java +++ b/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/filter/AntiFlocFilter.java @@ -33,10 +33,7 @@ import javax.servlet.http.HttpServletResponse; * * https://framablog.org/2021/04/20/developpeurs-developpeuses-nettoyez-le-web/ * - * Last change $Date$ - * - * @author $Author$ - * @version $Rev $ + * @author Olivier Maury */ @WebFilter(urlPatterns = { "/*" }) public class AntiFlocFilter implements Filter { diff --git a/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/filter/CorsFilter.java b/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/filter/CorsFilter.java index a606eb45..7273bcc7 100644 --- a/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/filter/CorsFilter.java +++ b/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/filter/CorsFilter.java @@ -31,10 +31,7 @@ import javax.servlet.http.HttpServletResponse; /** * Allow cross-origin (CORS). * - * Last change $Date$ - * - * @author $Author$ - * @version $Rev $ + * @author Olivier Maury */ @WebFilter(urlPatterns = { "/openapi/*", "/ws/*" }) public class CorsFilter implements Filter { diff --git a/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/mail/MailService.java b/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/mail/MailService.java index 5024ce14..1dae6c06 100644 --- a/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/mail/MailService.java +++ b/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/mail/MailService.java @@ -69,9 +69,9 @@ import lombok.extern.log4j.Log4j2; /** * MailService is used to send e-mails. * - * @author ddelannoy - * @author omaury - * @version $Id: MailService.java 192 2017-11-06 10:18:19Z omaury $ + * @author David Delannoy + * @author Olivier Maury + * @author Louis Tromel */ @ApplicationScoped @Log4j2 @@ -359,14 +359,15 @@ public class MailService { /** * Send a mail to admin team when Dataverse is unreachable. + * @param dataverseUrl URL of dataverse * @param applicationUrl current instance url * @throws SendMailException */ - public void dataverseUnreachable(final String applicationUrl) throws SendMailException { + public void dataverseUnreachable(final String dataverseUrl, final String applicationUrl) throws SendMailException { LOGGER.traceEntry(); final I18n i18n = new I18n("fr.soeretempo.sido.gwt.server.resources.messages", Locale.FRENCH); send(new Mail(i18n.format("dataverseUnreachableSubject"), - i18n.format("dataverseUnreachableBody", applicationUrl))); + i18n.format("dataverseUnreachableBody", dataverseUrl, applicationUrl))); LOGGER.traceExit(); } diff --git a/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/model/oauth2/Client.java b/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/model/oauth2/Client.java index 4b4840a1..5c5b242b 100644 --- a/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/model/oauth2/Client.java +++ b/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/model/oauth2/Client.java @@ -31,10 +31,7 @@ import lombok.Data; /** * OAuth2 client to access REST web services. * - * Last changed : $Date$ - * - * @author $Author$ - * @version $Revision$ + * @author Olivier Maury */ @Data @Entity diff --git a/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/model/oauth2/Scope.java b/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/model/oauth2/Scope.java index 8d829b9b..e23f6cb8 100644 --- a/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/model/oauth2/Scope.java +++ b/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/model/oauth2/Scope.java @@ -24,10 +24,7 @@ import lombok.Getter; /** * OAuth2 scopes for SIDO. * - * Last changed : $Date$ - * - * @author $Author$ - * @version $Revision$ + * @author Olivier Maury */ public enum Scope { /** diff --git a/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/servlet/ChangeLocaleServlet.java b/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/servlet/ChangeLocaleServlet.java index 25fd3bb7..82bcdf40 100644 --- a/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/servlet/ChangeLocaleServlet.java +++ b/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/servlet/ChangeLocaleServlet.java @@ -34,10 +34,7 @@ import fr.soeretempo.sido.gwt.server.SidoConfiguration.Key; /** * To store locale choice in session. * - * Last changed : $Date$ - * - * @author $Author$ - * @version $Revision$ + * @author Louis Tromel */ @RequestScoped @WebServlet(urlPatterns = { "/changeLocale" }) diff --git a/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/servlet/CookiesServlet.java b/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/servlet/CookiesServlet.java index 6baeed7a..72a0fcbb 100644 --- a/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/servlet/CookiesServlet.java +++ b/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/servlet/CookiesServlet.java @@ -39,10 +39,7 @@ import lombok.extern.log4j.Log4j2; /** * Cookies accept page. * - * Last changed : $Date$ - * - * @author $Author$ - * @version $Revision$ + * @author Louis Tromel */ @RequestScoped @WebServlet(urlPatterns = "/cookies") diff --git a/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/servlet/LegalServlet.java b/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/servlet/LegalServlet.java index 086936ee..236c2a81 100644 --- a/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/servlet/LegalServlet.java +++ b/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/servlet/LegalServlet.java @@ -51,10 +51,7 @@ import fr.soeretempo.sido.verification.resources.I18n; /** * Data privacy statement for B2Access. * - * Last changed : $Date$ - * - * @author $Author$ - * @version $Revision$ + * @author Louis Tromel */ @WebServlet(urlPatterns = "/legal") public final class LegalServlet extends HttpServlet { diff --git a/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/ws/ApplicationConfig.java b/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/ws/ApplicationConfig.java index 17fe94d7..ef3e60b9 100644 --- a/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/ws/ApplicationConfig.java +++ b/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/ws/ApplicationConfig.java @@ -40,10 +40,7 @@ import io.swagger.v3.oas.annotations.servers.Server; /** * JAX-RS application at "/ws". * - * Last change $Date$ - * - * @author $Author$ - * @version $Rev $ + * @author Olivier Maury */ @OpenAPIDefinition( servers = { diff --git a/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/ws/DataResource.java b/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/ws/DataResource.java index 2d39ae92..92bfff5f 100644 --- a/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/ws/DataResource.java +++ b/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/ws/DataResource.java @@ -44,10 +44,8 @@ import lombok.extern.log4j.Log4j2; /** * Data JAX-RS resource. * - * Last changed : $Date$ - * - * @author $Author$ - * @version $Revision$ + * @author Olivier Maury + * @author Louis Tromel */ @Path("data") @RequestScoped diff --git a/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/ws/JsonWebTokenService.java b/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/ws/JsonWebTokenService.java index 363a0648..f66db7c3 100644 --- a/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/ws/JsonWebTokenService.java +++ b/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/ws/JsonWebTokenService.java @@ -45,10 +45,7 @@ import lombok.extern.log4j.Log4j2; * Service that creates a Json Web Token that will be sent to the client. So * that the client can authenticate to call the different urls. * - * Last change $Date$ - * - * @author $Author$ - * @version $Rev $ + * @author Olivier Maury */ @ApplicationScoped @Log4j2 diff --git a/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/ws/OauthResource.java b/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/ws/OauthResource.java index 40d6f1f4..825e91c3 100644 --- a/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/ws/OauthResource.java +++ b/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/ws/OauthResource.java @@ -46,10 +46,8 @@ import lombok.extern.log4j.Log4j2; /** * Manage OAuth authorization request from a user for an Application client. * - * Last change $Date$ - * - * @author $Author$ - * @version $Rev $ + * @author Olivier Maury + * @author Louis Tromel */ @Log4j2 @Path("oauth") diff --git a/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/ws/QueryService.java b/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/ws/QueryService.java index 68e7cfdd..5be7277a 100644 --- a/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/ws/QueryService.java +++ b/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/ws/QueryService.java @@ -26,10 +26,9 @@ import fr.soeretempo.sido.rs.WsQuery; /** * Query handling for web service. * - * Last changed : $Date$ - * - * @author $Author$ - * @version $Revision$ + * @author Olivier Maury + * @author Mohamed El Hasnaoui + * @author Louis Tromel */ public interface QueryService { /** diff --git a/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/ws/QueryServiceImpl.java b/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/ws/QueryServiceImpl.java index ee731aaf..73619af3 100644 --- a/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/ws/QueryServiceImpl.java +++ b/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/ws/QueryServiceImpl.java @@ -49,10 +49,9 @@ import lombok.extern.log4j.Log4j2; /** * Query handling for web service. * - * Last changed : $Date$ - * - * @author $Author$ - * @version $Revision$ + * @author Olivier Maury + * @author Mohamed El Hasnaoui + * @author Louis Tromel */ @Log4j2 @Named diff --git a/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/shared/RPCException.java b/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/shared/RPCException.java index 5a9a6fe0..48a5f0bf 100644 --- a/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/shared/RPCException.java +++ b/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/shared/RPCException.java @@ -22,10 +22,9 @@ import com.google.gwt.user.client.rpc.IsSerializable; /** * Exception for the client. * - * Last changed : $Date$ - * - * @author $Author$ - * @version $Revision$ + * @author Olivier Maury + * @author Mohamed El Hasnaoui + * @author Louis Tromel */ public class RPCException extends Exception implements IsSerializable { /** diff --git a/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/shared/SessionExpiredException.java b/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/shared/SessionExpiredException.java index af78c6b0..5981d407 100644 --- a/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/shared/SessionExpiredException.java +++ b/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/shared/SessionExpiredException.java @@ -20,10 +20,8 @@ package fr.soeretempo.sido.gwt.shared; /** * Exception for the client. * - * Last changed : $Date$ - * - * @author $Author$ - * @version $Revision$ + * @author Olivier Maury + * @author Mohamed El Hasnaoui */ public class SessionExpiredException extends RPCException { diff --git a/sido-gwt/src/main/resources/fr/soeretempo/sido/gwt/server/resources/messages_fr.properties b/sido-gwt/src/main/resources/fr/soeretempo/sido/gwt/server/resources/messages_fr.properties index fe5db66a..30f3a39e 100644 --- a/sido-gwt/src/main/resources/fr/soeretempo/sido/gwt/server/resources/messages_fr.properties +++ b/sido-gwt/src/main/resources/fr/soeretempo/sido/gwt/server/resources/messages_fr.properties @@ -16,7 +16,6 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # -# $Id$ cookies.accept=J'accepte l'utilisation des cookies pour parcourir SIDO cookies.title=Veuillez lire et accepter notre utilisation des Cookies pour parcourir SIDO @@ -186,9 +185,11 @@ removeDatasetAlreadyPublished=Vous avez d #dataverse handler dataverseUnreachableSubject=SIDO - Impossible de communiquer avec ERDG -dataverseUnreachableBody=SIDO n''arrive pas à joindre l''API d''ERDG. Le token est peut-être périmé, ou le service rencontre un problème.\ +dataverseUnreachableBody=Bonjour,\n\ +SIDO n''arrive pas à joindre l''API d''ERDG ({0}.\n\ +Le token est peut-être périmé, ou le service rencontre un problème.\ \nCordialement, l''équipe SIDO\n\ -URL : {0} +URL : {1} dataverseTokenExpirationCloseSubject=SIDO - Le token de connexion à ERDG est bientôt expiré dataverseTokenExpirationCloseBody=La date d''expiration du token de connexion à ERDG arrive bientôt : {0}\ \nCordialement, l''équipe SIDO\n\ diff --git a/sido-gwt/src/main/resources/fr/soeretempo/sido/gwt/server/servlet/credits-en.md b/sido-gwt/src/main/resources/fr/soeretempo/sido/gwt/server/servlet/credits-en.md index fa20af38..13bd1c70 100644 --- a/sido-gwt/src/main/resources/fr/soeretempo/sido/gwt/server/servlet/credits-en.md +++ b/sido-gwt/src/main/resources/fr/soeretempo/sido/gwt/server/servlet/credits-en.md @@ -15,7 +15,3 @@ The application was developed using the following technologies: - Maven 3 - Tomcat 9 - PostgreSQL 11 - ---- - -$Date$ \ No newline at end of file diff --git a/sido-gwt/src/main/resources/fr/soeretempo/sido/gwt/server/servlet/credits-fr.md b/sido-gwt/src/main/resources/fr/soeretempo/sido/gwt/server/servlet/credits-fr.md index c7097bda..ca666944 100644 --- a/sido-gwt/src/main/resources/fr/soeretempo/sido/gwt/server/servlet/credits-fr.md +++ b/sido-gwt/src/main/resources/fr/soeretempo/sido/gwt/server/servlet/credits-fr.md @@ -15,7 +15,3 @@ L’application a été développée grâce aux technologies suivantes : - Maven 3 - Tomcat 9 - PostgreSQL 11 - ---- - -$Date$ \ No newline at end of file diff --git a/sido-gwt/src/main/resources/fr/soeretempo/sido/gwt/server/servlet/legal-notice-en.md b/sido-gwt/src/main/resources/fr/soeretempo/sido/gwt/server/servlet/legal-notice-en.md index d95d2b31..eb4f3a62 100644 --- a/sido-gwt/src/main/resources/fr/soeretempo/sido/gwt/server/servlet/legal-notice-en.md +++ b/sido-gwt/src/main/resources/fr/soeretempo/sido/gwt/server/servlet/legal-notice-en.md @@ -103,7 +103,3 @@ The site publisher reserves the right to change the terms of use without prior n ### 6. Choice of law Any dispute relating to these Terms of Use will be settled in a French court only. - ---- - -$Date$ \ No newline at end of file diff --git a/sido-gwt/src/main/resources/fr/soeretempo/sido/gwt/server/servlet/legal-notice-fr.md b/sido-gwt/src/main/resources/fr/soeretempo/sido/gwt/server/servlet/legal-notice-fr.md index 097ddb48..a4ba9a24 100644 --- a/sido-gwt/src/main/resources/fr/soeretempo/sido/gwt/server/servlet/legal-notice-fr.md +++ b/sido-gwt/src/main/resources/fr/soeretempo/sido/gwt/server/servlet/legal-notice-fr.md @@ -107,6 +107,3 @@ L’éditeur du site se réserve le droit de modifier, sans préavis, les prése En cas de litige, les tribunaux français seront seuls compétents. ---- - -$Date$ diff --git a/sido-gwt/src/main/resources/fr/soeretempo/sido/gwt/server/servlet/release-notes-en.md b/sido-gwt/src/main/resources/fr/soeretempo/sido/gwt/server/servlet/release-notes-en.md index a3f8df4f..97913862 100644 --- a/sido-gwt/src/main/resources/fr/soeretempo/sido/gwt/server/servlet/release-notes-en.md +++ b/sido-gwt/src/main/resources/fr/soeretempo/sido/gwt/server/servlet/release-notes-en.md @@ -213,6 +213,3 @@ Available features: - Insertion of workbook data into PostgreSQL database - Visualisation of inserted data ---- - -$Date$ diff --git a/sido-gwt/src/main/resources/fr/soeretempo/sido/gwt/server/servlet/release-notes-fr.md b/sido-gwt/src/main/resources/fr/soeretempo/sido/gwt/server/servlet/release-notes-fr.md index b039d981..2dea55ef 100644 --- a/sido-gwt/src/main/resources/fr/soeretempo/sido/gwt/server/servlet/release-notes-fr.md +++ b/sido-gwt/src/main/resources/fr/soeretempo/sido/gwt/server/servlet/release-notes-fr.md @@ -213,7 +213,3 @@ Fonctionnalités présentes : - Vérification des données d'un classeur - Insertion des données d'un classeur dans une base de données PostgreSQL - Visualisation de données insérées - ---- - -$Date$ \ No newline at end of file diff --git a/sido-gwt/src/test/java/fr/soeretempo/sido/gwt/server/ws/DataResourceTest.java b/sido-gwt/src/test/java/fr/soeretempo/sido/gwt/server/ws/DataResourceTest.java index 1f7b416f..54fe12d8 100644 --- a/sido-gwt/src/test/java/fr/soeretempo/sido/gwt/server/ws/DataResourceTest.java +++ b/sido-gwt/src/test/java/fr/soeretempo/sido/gwt/server/ws/DataResourceTest.java @@ -49,10 +49,9 @@ import fr.soeretempo.sido.rs.WsResponse; * * No database is used in these tests. * - * Last changed : $Date$ - * - * @author $Author$ - * @version $Revision$ + * @author Olivier Maury + * @author Mohamed El Hasnaoui + * @author Louis Tromel */ public class DataResourceTest extends JerseyTest { /** diff --git a/sido-gwt/src/test/java/fr/soeretempo/sido/gwt/server/ws/DatasourceResourceTest.java b/sido-gwt/src/test/java/fr/soeretempo/sido/gwt/server/ws/DatasourceResourceTest.java index 021abe90..c6cb5b72 100644 --- a/sido-gwt/src/test/java/fr/soeretempo/sido/gwt/server/ws/DatasourceResourceTest.java +++ b/sido-gwt/src/test/java/fr/soeretempo/sido/gwt/server/ws/DatasourceResourceTest.java @@ -49,10 +49,7 @@ import fr.soeretempo.sido.rs.WsResponse; /** * Test web service in datasource. * - * Last changed : $Date$ - * - * @author $Author$ - * @version $Revision$ + * @author Louis Tromel */ public class DatasourceResourceTest extends JerseyTest { /** diff --git a/sido-gwt/src/test/java/fr/soeretempo/sido/gwt/server/ws/QueryServiceImplTest.java b/sido-gwt/src/test/java/fr/soeretempo/sido/gwt/server/ws/QueryServiceImplTest.java index 54fe4024..3aeca1fd 100644 --- a/sido-gwt/src/test/java/fr/soeretempo/sido/gwt/server/ws/QueryServiceImplTest.java +++ b/sido-gwt/src/test/java/fr/soeretempo/sido/gwt/server/ws/QueryServiceImplTest.java @@ -19,10 +19,7 @@ import fr.soeretempo.sido.rs.WsQuery; * * No database is used in these tests. * - * Last changed : $Date$ - * - * @author $Author$ - * @version $Revision$ + * @author Olivier Maury */ public class QueryServiceImplTest { /** diff --git a/sido-rs/src/main/java/fr/soeretempo/sido/rs/GrantType.java b/sido-rs/src/main/java/fr/soeretempo/sido/rs/GrantType.java index 725a0958..0661162e 100644 --- a/sido-rs/src/main/java/fr/soeretempo/sido/rs/GrantType.java +++ b/sido-rs/src/main/java/fr/soeretempo/sido/rs/GrantType.java @@ -24,10 +24,7 @@ import io.swagger.v3.oas.annotations.media.Schema; /** * OAuth2 grant types implemented in SIDO. * - * Last change $Date$ - * - * @author $Author$ - * @version $Rev $ + * @author Olivier Maury */ @Schema(description = "OAuth2 grant types implemented in SIDO. " + "Case does not matter.") diff --git a/sido-rs/src/main/java/fr/soeretempo/sido/rs/JsonDateTimeAdapter.java b/sido-rs/src/main/java/fr/soeretempo/sido/rs/JsonDateTimeAdapter.java index a68257be..202ff47b 100644 --- a/sido-rs/src/main/java/fr/soeretempo/sido/rs/JsonDateTimeAdapter.java +++ b/sido-rs/src/main/java/fr/soeretempo/sido/rs/JsonDateTimeAdapter.java @@ -28,10 +28,7 @@ import javax.xml.bind.annotation.adapters.XmlAdapter; * The string must represent a valid date-time and is parsed using * DateTimeFormatter.ISO_LOCAL_DATE_TIME. * - * Last changed : $Date$ - * - * @author $Author$ - * @version $Revision$ + * @author Olivier Maury */ public final class JsonDateTimeAdapter extends XmlAdapter<String, LocalDateTime> { diff --git a/sido-rs/src/main/java/fr/soeretempo/sido/rs/JsonHttpStatusAdapter.java b/sido-rs/src/main/java/fr/soeretempo/sido/rs/JsonHttpStatusAdapter.java index 20f5d441..89eea4a0 100644 --- a/sido-rs/src/main/java/fr/soeretempo/sido/rs/JsonHttpStatusAdapter.java +++ b/sido-rs/src/main/java/fr/soeretempo/sido/rs/JsonHttpStatusAdapter.java @@ -22,10 +22,7 @@ import javax.xml.bind.annotation.adapters.XmlAdapter; /** * Json HTTP Status for WsResponse. * - * Last changed : $Date$ - * - * @author $Author$ - * @version $Revision$ + * @author Olivier Maury */ public final class JsonHttpStatusAdapter extends XmlAdapter<Integer, HttpStatus> { diff --git a/sido-rs/src/main/java/fr/soeretempo/sido/rs/WsData.java b/sido-rs/src/main/java/fr/soeretempo/sido/rs/WsData.java index 5ed6af49..4aad3545 100644 --- a/sido-rs/src/main/java/fr/soeretempo/sido/rs/WsData.java +++ b/sido-rs/src/main/java/fr/soeretempo/sido/rs/WsData.java @@ -24,10 +24,7 @@ import lombok.Data; /** * Data for a query. * - * Last changed : $Date$ - * - * @author $Author$ - * @version $Revision$ + * @author Olivier Maury */ @Data public class WsData { diff --git a/sido-rs/src/main/java/fr/soeretempo/sido/rs/WsDatasourceInfo.java b/sido-rs/src/main/java/fr/soeretempo/sido/rs/WsDatasourceInfo.java index fd7f8b8f..044785e4 100644 --- a/sido-rs/src/main/java/fr/soeretempo/sido/rs/WsDatasourceInfo.java +++ b/sido-rs/src/main/java/fr/soeretempo/sido/rs/WsDatasourceInfo.java @@ -26,10 +26,7 @@ import lombok.Data; /** * Date of last update for an datasource. * - * Last changed : $Date$ - * - * @author $Author$ - * @version $Revision$ + * @author Louis Tromel */ @Data public class WsDatasourceInfo { diff --git a/sido-rs/src/main/java/fr/soeretempo/sido/rs/WsOauthAccessToken.java b/sido-rs/src/main/java/fr/soeretempo/sido/rs/WsOauthAccessToken.java index bc244769..40232ec0 100644 --- a/sido-rs/src/main/java/fr/soeretempo/sido/rs/WsOauthAccessToken.java +++ b/sido-rs/src/main/java/fr/soeretempo/sido/rs/WsOauthAccessToken.java @@ -25,10 +25,7 @@ import lombok.Data; /** * OAuth token response. * - * Last change $Date$ - * - * @author $Author$ - * @version $Rev $ + * @author Olivier Maury */ @Data @Schema(name = "OauthAccessToken") diff --git a/sido-rs/src/main/java/fr/soeretempo/sido/rs/WsProperty.java b/sido-rs/src/main/java/fr/soeretempo/sido/rs/WsProperty.java index 9dc8ab16..8fabb431 100644 --- a/sido-rs/src/main/java/fr/soeretempo/sido/rs/WsProperty.java +++ b/sido-rs/src/main/java/fr/soeretempo/sido/rs/WsProperty.java @@ -24,10 +24,8 @@ import lombok.Data; /** * Description of a data property returned by request. * - * Last changed : $Date$ - * - * @author $Author$ - * @version $Revision$ + * @author Olivier Maury + * @author Louis Tromel */ @Data public class WsProperty { diff --git a/sido-rs/src/main/java/fr/soeretempo/sido/rs/WsQuery.java b/sido-rs/src/main/java/fr/soeretempo/sido/rs/WsQuery.java index aa0866a8..82f42897 100644 --- a/sido-rs/src/main/java/fr/soeretempo/sido/rs/WsQuery.java +++ b/sido-rs/src/main/java/fr/soeretempo/sido/rs/WsQuery.java @@ -27,10 +27,7 @@ import lombok.Data; * * Definition is done in a local JSON file and also exposed by web service. * - * Last changed : $Date$ - * - * @author $Author$ - * @version $Revision$ + * @author Olivier Maury */ @Data public class WsQuery { diff --git a/sido-rs/src/main/java/fr/soeretempo/sido/rs/WsResponse.java b/sido-rs/src/main/java/fr/soeretempo/sido/rs/WsResponse.java index 1d6b0a0b..054f7ede 100644 --- a/sido-rs/src/main/java/fr/soeretempo/sido/rs/WsResponse.java +++ b/sido-rs/src/main/java/fr/soeretempo/sido/rs/WsResponse.java @@ -25,10 +25,7 @@ import lombok.Data; /** * All response in SIDO use a generic response. * - * Last changed : $Date$ - * - * @author $Author$ - * @version $Revision$ + * @author Olivier Maury * @param <T> * class of embedded data */ diff --git a/verification/src/main/resources/fr/soeretempo/sido/verification/resources/messages_fr.properties b/verification/src/main/resources/fr/soeretempo/sido/verification/resources/messages_fr.properties index 625e19b7..293ac55e 100644 --- a/verification/src/main/resources/fr/soeretempo/sido/verification/resources/messages_fr.properties +++ b/verification/src/main/resources/fr/soeretempo/sido/verification/resources/messages_fr.properties @@ -16,7 +16,6 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. # -# $Id$ dataInserted=Les données des feuilles suivantes ont été insérées : dataInserted[none]=Les données de la feuille suivante ont été insérées : dataInsertedSheetLine=<b>{0}</b> : {1} lignes. diff --git a/verification/src/test/java/fr/soeretempo/sido/verification/VerificationCheckDataTest.java b/verification/src/test/java/fr/soeretempo/sido/verification/VerificationCheckDataTest.java index 3c1c943c..d9c0a55f 100644 --- a/verification/src/test/java/fr/soeretempo/sido/verification/VerificationCheckDataTest.java +++ b/verification/src/test/java/fr/soeretempo/sido/verification/VerificationCheckDataTest.java @@ -37,12 +37,8 @@ import org.junit.runners.Parameterized; /** * Run Verification on pair XLSX/XML to check returned errors. * - * - * Last changed : $Date$ - * - * @author $Author$ * @author Olivier Maury - * @version $Revision$ + * @author Louis Tromel */ @RunWith(Parameterized.class) public class VerificationCheckDataTest { diff --git a/verification/src/test/resources/log4j2.xml b/verification/src/test/resources/log4j2.xml index 8f244255..cdf9727c 100644 --- a/verification/src/test/resources/log4j2.xml +++ b/verification/src/test/resources/log4j2.xml @@ -20,9 +20,6 @@ --> <!DOCTYPE Configuration> <!-- sido-verification tests --> -<!-- Last changed : $Date$ --> -<!-- @author $Author$ --> -<!-- @version $Revision$ --> <Configuration status="info"> <Appenders> <Console name="console" target="SYSTEM_OUT"> -- GitLab From 48fea1e0c3dc03f1fb41bad0876e87808104b5b0 Mon Sep 17 00:00:00 2001 From: Olivier Maury <Olivier.Maury@inrae.fr> Date: Tue, 7 Jan 2025 16:49:38 +0100 Subject: [PATCH 05/19] Ajouter le fichier CI --- .gitlab-ci.yml | 135 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 135 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 00000000..0404cf24 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,135 @@ +# To use the registry, DOCKER_AUTH_CONFIG must be set +image: registry.forgemia.inra.fr/agroclim/common/docker-projets-java:latest +variables: + MAVEN_OPTS: "-Dmaven.repo.local=$CI_PROJECT_DIR/.m2/repository" + MAVEN_CLI_OPTS: "-s $CI_PROJECT_DIR/ci_settings.xml" +default: + # Cache downloaded dependencies and plugins between builds. + cache: + key: maven-repository + paths: + - $CI_PROJECT_DIR/.m2/repository + tags: + - agroclim +stages: + - build + - test + - install + - code-check + - deploy +.settingsxml: + before_script: + - echo "Maven settings.xml" + - echo "$M2_SETTINGS_XML" > $CI_PROJECT_DIR/ci_settings.xml +dependencies_job: + stage: build + extends: .settingsxml + script: + - echo "Download all dependencies (dependencies, plugins, reports)" + - mvn $MAVEN_CLI_OPTS dependency:go-offline --projects=.,sido-cli,sido-createSchemaTable,sido-eml,sido-gwt,sido-rs,verification + +build_job: + stage: build + extends: .settingsxml + needs: ["dependencies_job"] + script: + - echo "Maven compile started" + - mvn $MAVEN_CLI_OPTS clean compile test-compile + - /usr/bin/tokei --version + artifacts: + expire_in: 1 week + when: always + paths: + - target + - "*/target" +test_job: + stage: test + extends: .settingsxml + needs: ["build_job"] + script: + - echo "Maven test started" + - mvn $MAVEN_CLI_OPTS test org.jacoco:jacoco-maven-plugin:report-aggregate + artifacts: + expire_in: 1 week + when: always + paths: + - target + - "*/target" + reports: + junit: + - "*/target/surefire-reports/TEST-*.xml" + - "*/target/failsafe-reports/TEST-*.xml" + +install_job: + stage: install + extends: .settingsxml + needs: ["test_job"] + script: + - echo "Maven packaging started" + - mvn $MAVEN_CLI_OPTS install -Dcheckstyle.skip=true -Dcpd.skip=true -Dpmd.skip=true -DskipTests + artifacts: + expire_in: 1 week + when: always + paths: + - .m2/repository + - target + - "*/target" +checkstyle_job: + stage: code-check + extends: .settingsxml + needs: ["install_job"] + script: + - mvn $MAVEN_CLI_OPTS checkstyle:checkstyle +pmd_job: + stage: code-check + extends: .settingsxml + needs: ["install_job"] + script: + - mvn $MAVEN_CLI_OPTS pmd:pmd +cpd_job: + stage: code-check + extends: .settingsxml + needs: ["install_job"] + script: + - mvn $MAVEN_CLI_OPTS pmd:cpd +cobertura_job: + stage: deploy + needs: ["test_job"] + script: + # convert report from jacoco to cobertura, using relative project path + - python /opt/cover2cover.py + sido-cli/target/site/jacoco-aggregate/jacoco.xml + sido-createSchemaTable/target/site/jacoco-aggregate/jacoco.xml + sido-eml/target/site/jacoco-aggregate/jacoco.xml + sido-gwt/target/site/jacoco-aggregate/jacoco.xml + sido-rs/target/site/jacoco-aggregate/jacoco.xml + verification/target/site/jacoco-aggregate/jacoco.xml + $CI_PROJECT_DIR/sido-cli/src/main/java/ + $CI_PROJECT_DIR/sido-createSchemaTable/src/main/java/ + $CI_PROJECT_DIR/sido-eml/src/main/java/ + $CI_PROJECT_DIR/sido-gwt/src/main/java/ + $CI_PROJECT_DIR/sido-rs/src/main/java/ + $CI_PROJECT_DIR/verification/src/main/java/ + > target/cobertura.xml +# https://agroclim.pages.mia.inra.fr/Indicators/season +pages: + stage: deploy + extends: .settingsxml + needs: ["checkstyle_job", "pmd_job", "cpd_job"] + script: + - mvn $MAVEN_CLI_OPTS site -DskipTests + - rm -fr target/site/sido-cli target/site/sido-createSchemaTable target/site/sido-eml + - rm -fr target/site/sido-gwt target/site/sido-rs target/site/verification + - mv sido-cli/target/site/ target/site/sido-cli + - mv sido-createSchemaTable/target/site/ target/site/sido-createSchemaTable + - mv sido-eml/target/site/ target/site/sido-eml + - mv sido-gwt/target/site/ target/site/sido-gwt + - mv sido-rs/target/site/ target/site/sido-rs + - mv verification/target/site/ target/site/verification + artifacts: + expire_in: 1 week + when: always + paths: + - target + - "*/target" + publish: target/site -- GitLab From 3b72148a73da08910df9b5520a36e674d766428e Mon Sep 17 00:00:00 2001 From: Olivier Maury <Olivier.Maury@inrae.fr> Date: Tue, 7 Jan 2025 17:12:34 +0100 Subject: [PATCH 06/19] =?UTF-8?q?Ajout=20d'un=20message=20pour=20test=20d'?= =?UTF-8?q?=C3=A9galit=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sido/verification/resources/I18nTest.java | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/verification/src/test/java/fr/soeretempo/sido/verification/resources/I18nTest.java b/verification/src/test/java/fr/soeretempo/sido/verification/resources/I18nTest.java index 3522568c..bcd8ce72 100644 --- a/verification/src/test/java/fr/soeretempo/sido/verification/resources/I18nTest.java +++ b/verification/src/test/java/fr/soeretempo/sido/verification/resources/I18nTest.java @@ -27,10 +27,8 @@ import org.junit.Test; /** * Test plural form handling with I18n. * - * Last changed : $Date$ - * - * @author $Author$ - * @version $Revision$ + * @author Olivier Maury + * @author Louis Tromel */ public class I18nTest { @@ -45,7 +43,7 @@ public class I18nTest { private static final String NAME = "fr.soeretempo.sido.verification.resources.test"; @Test - public void contructorWithResourceBundle() { + public void constructorWithResourceBundle() { final ResourceBundle bundle = ResourceBundle.getBundle(NAME, Locale.FRENCH); final I18n res = new I18n(bundle); String actual; @@ -90,8 +88,9 @@ public class I18nTest { final int nb = 1314; final I18n res = new I18n(NAME, Locale.FRENCH); final String actual = res.format(nb, KEY, nb); + final String javaVersion = System.getProperty("java.specification.version"); String expected; - switch (System.getProperty("java.specification.version")) { + switch (javaVersion) { case "1.8": case "9": case "10": @@ -101,7 +100,7 @@ public class I18nTest { default: expected = "Il y a 1 314 produits dans votre panier, ce qui est beaucoup."; } - assertEquals(expected, actual); + assertEquals("Failure with Java version=" + javaVersion, expected, actual); } /** -- GitLab From 56b78e3773a07244f7b468b527498c6dcce4158e Mon Sep 17 00:00:00 2001 From: Olivier Maury <Olivier.Maury@inrae.fr> Date: Tue, 7 Jan 2025 17:41:42 +0100 Subject: [PATCH 07/19] =?UTF-8?q?Ajout=20d'un=20message=20pour=20test=20d'?= =?UTF-8?q?=C3=A9galit=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/soeretempo/sido/verification/resources/I18nTest.java | 5 +++++ .../sido/verification/resources/ResourcesTest.java | 5 +---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/verification/src/test/java/fr/soeretempo/sido/verification/resources/I18nTest.java b/verification/src/test/java/fr/soeretempo/sido/verification/resources/I18nTest.java index bcd8ce72..c021ca90 100644 --- a/verification/src/test/java/fr/soeretempo/sido/verification/resources/I18nTest.java +++ b/verification/src/test/java/fr/soeretempo/sido/verification/resources/I18nTest.java @@ -22,6 +22,7 @@ import static org.junit.Assert.assertEquals; import java.util.Locale; import java.util.ResourceBundle; +import lombok.extern.log4j.Log4j2; import org.junit.Test; /** @@ -30,6 +31,7 @@ import org.junit.Test; * @author Olivier Maury * @author Louis Tromel */ +@Log4j2 public class I18nTest { /** @@ -100,6 +102,9 @@ public class I18nTest { default: expected = "Il y a 1 314 produits dans votre panier, ce qui est beaucoup."; } + LOGGER.info("expected={}", expected); + LOGGER.info("actual__={}", actual); + LOGGER.info("Java version={}", javaVersion); assertEquals("Failure with Java version=" + javaVersion, expected, actual); } diff --git a/verification/src/test/java/fr/soeretempo/sido/verification/resources/ResourcesTest.java b/verification/src/test/java/fr/soeretempo/sido/verification/resources/ResourcesTest.java index 19ffd76c..9420ecfa 100644 --- a/verification/src/test/java/fr/soeretempo/sido/verification/resources/ResourcesTest.java +++ b/verification/src/test/java/fr/soeretempo/sido/verification/resources/ResourcesTest.java @@ -29,10 +29,7 @@ import org.junit.Test; /** * Test Resources. * - * Last changed : $Date$ - * - * @author $Author$ - * @version $Revision$ + * @author Olivier Maury */ public class ResourcesTest { -- GitLab From c2e103a6bf0d734d269b3c2d547779dcf893c3f4 Mon Sep 17 00:00:00 2001 From: Olivier Maury <Olivier.Maury@inrae.fr> Date: Tue, 7 Jan 2025 17:47:00 +0100 Subject: [PATCH 08/19] =?UTF-8?q?Ajout=20d'un=20message=20pour=20test=20d'?= =?UTF-8?q?=C3=A9galit=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitlab-ci.yml | 8 +++++++- .../sido/verification/OutilsVerifEXCELModelTest.java | 8 ++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0404cf24..f54b61fa 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -42,10 +42,16 @@ build_job: paths: - target - "*/target" -test_job: +test0_job: stage: test extends: .settingsxml needs: ["build_job"] + script: + - mvn $MAVEN_CLI_OPTS test -Dtest=fr.soeretempo.sido.verification.resources.I18nTest --projects=verification +test_job: + stage: test + extends: .settingsxml + needs: ["test0_job", "build_job"] script: - echo "Maven test started" - mvn $MAVEN_CLI_OPTS test org.jacoco:jacoco-maven-plugin:report-aggregate diff --git a/verification/src/test/java/fr/soeretempo/sido/verification/OutilsVerifEXCELModelTest.java b/verification/src/test/java/fr/soeretempo/sido/verification/OutilsVerifEXCELModelTest.java index 022292bc..815ea9c8 100644 --- a/verification/src/test/java/fr/soeretempo/sido/verification/OutilsVerifEXCELModelTest.java +++ b/verification/src/test/java/fr/soeretempo/sido/verification/OutilsVerifEXCELModelTest.java @@ -62,13 +62,13 @@ public class OutilsVerifEXCELModelTest { try { verifExcel = new OutilsVerifEXCEL(path); } catch (final Exception e) { - log.catching(Level.FATAL, e); + LOGGER.catching(Level.FATAL, e); throw e; } } /** - * listColumnsFeuillesM returne la liste des colonnes d'une feuille du + * listColumnsFeuillesM retourne la liste des colonnes d'une feuille du * fichier XML. */ @Test @@ -83,7 +83,7 @@ public class OutilsVerifEXCELModelTest { } /** - * listFeuillesM returne la liste des feuilles du fichier données. + * listFeuillesM retourne la liste des feuilles du fichier données. */ @Test public void listSheetsM() { @@ -108,7 +108,7 @@ public class OutilsVerifEXCELModelTest { } /** - * nbrColumnsFeuillesM returne le nombre des colonnes dans une feuille + * nbrColumnsFeuillesM retourne le nombre des colonnes dans une feuille * fichier données. */ @Test -- GitLab From 8c144f30213f664baa066445d5ecef99dac67c27 Mon Sep 17 00:00:00 2001 From: Olivier Maury <Olivier.Maury@inrae.fr> Date: Tue, 7 Jan 2025 17:50:02 +0100 Subject: [PATCH 09/19] =?UTF-8?q?Ajout=20d'un=20message=20pour=20test=20d'?= =?UTF-8?q?=C3=A9galit=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- verification/src/test/java/lombok.config | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 verification/src/test/java/lombok.config diff --git a/verification/src/test/java/lombok.config b/verification/src/test/java/lombok.config new file mode 100644 index 00000000..b15c29c6 --- /dev/null +++ b/verification/src/test/java/lombok.config @@ -0,0 +1,2 @@ +# configuration directives for Lombok. These apply to all source files in this directory and all child directories. +lombok.log.fieldName = LOGGER -- GitLab From 71675f58f2ac3431353fd631febabd101410d5aa Mon Sep 17 00:00:00 2001 From: Olivier Maury <Olivier.Maury@inrae.fr> Date: Tue, 7 Jan 2025 18:13:58 +0100 Subject: [PATCH 10/19] Essai de correction de tests CI --- .gitlab-ci.yml | 2 +- .../gwt/server/scheduled/UserAnonymizer.java | 22 +++++++++------- .../sido/verification/resources/I18n.java | 6 ++--- .../verification/resources/ResourcesTest.java | 26 +++++++++++++++++++ 4 files changed, 41 insertions(+), 15 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f54b61fa..85dc735e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -47,7 +47,7 @@ test0_job: extends: .settingsxml needs: ["build_job"] script: - - mvn $MAVEN_CLI_OPTS test -Dtest=fr.soeretempo.sido.verification.resources.I18nTest --projects=verification + - mvn $MAVEN_CLI_OPTS test -Dtest=fr.soeretempo.sido.verification.resources.I18nTest,fr.soeretempo.sido.verification.resources.ResourcesTest --projects=verification test_job: stage: test extends: .settingsxml diff --git a/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/scheduled/UserAnonymizer.java b/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/scheduled/UserAnonymizer.java index 78352a71..734e4ac0 100644 --- a/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/scheduled/UserAnonymizer.java +++ b/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/scheduled/UserAnonymizer.java @@ -21,7 +21,9 @@ import lombok.Setter; import lombok.extern.log4j.Log4j2; /** - * Runnable class that erase personnal data of old accounts and objects related. + * Runnable class that erase personal data of old accounts and objects related. + * + * @author Louis Tromel */ @Log4j2 @ApplicationScoped @@ -72,22 +74,24 @@ public class UserAnonymizer implements Runnable { private void warn() throws IOException { LOGGER.traceEntry(); + final int fiveYears = 5; + final int twoWeeks = 2; final List<User> warnedForDeletion = new ArrayList<>(); - final LocalDateTime fiveYearsMinusTwoWeeks = LocalDateTime.now().minusYears(5).plusWeeks(2); + final LocalDateTime fiveYearsMinusTwoWeeks = LocalDateTime.now().minusYears(fiveYears).plusWeeks(twoWeeks); final List<User> oldUsersList = userDao.findInactiveSince(fiveYearsMinusTwoWeeks); for (final User user : oldUsersList) { if (!user.isDeleted()) { if (user.getDeletionWarning() == null) { - LOGGER.trace("Warning for deletion : " + user); + LOGGER.trace("Warning for deletion: {}", user); warnedForDeletion.add(user); mailService.warningUserDeletion(user, config.get(Key.APP_URL), DEFAULT_LOCALE); userDao.setDeletionWarning(user); } else { - LOGGER.trace("Warning for deletion already exists : " + user); + LOGGER.trace("Warning for deletion already exists: {}", user); } } } - LOGGER.info("Warned for deletion : " + warnedForDeletion); + LOGGER.info("Warned for deletion: {}", warnedForDeletion); LOGGER.traceExit(); } @@ -100,18 +104,16 @@ public class UserAnonymizer implements Runnable { for (final User user : oldUsersList) { if (user.getDeletionWarning().isBefore(twoWeeksAgo) && !user.isDeleted()) { - LOGGER.trace("Deletion : " + user); + LOGGER.trace("Deletion : {}", user); anonymized.add(user); mailService.userDeleted(user, config.get(Key.APP_URL), DEFAULT_LOCALE); userDao.anonymizeAccount(user); } else { - LOGGER.trace("Delete will be done in a few days, the warning is not 14 days ago : " + user); + LOGGER.trace("Delete will be done in a few days, the warning is not 14 days ago: {}", user); } } - LOGGER.info("Anonymized : " + anonymized); + LOGGER.info("Anonymized : {}", anonymized); LOGGER.traceExit(); } - - } diff --git a/verification/src/main/java/fr/soeretempo/sido/verification/resources/I18n.java b/verification/src/main/java/fr/soeretempo/sido/verification/resources/I18n.java index fae4248f..7c4b4bff 100644 --- a/verification/src/main/java/fr/soeretempo/sido/verification/resources/I18n.java +++ b/verification/src/main/java/fr/soeretempo/sido/verification/resources/I18n.java @@ -28,10 +28,8 @@ import java.util.function.Predicate; /** * Localized messages with plural handling à la GWT. * - * Last change $Date$ - * - * @author $Author$ - * @version $Revision$ + * @author Olivier Maury + * @author Louis Tromel */ public final class I18n { diff --git a/verification/src/test/java/fr/soeretempo/sido/verification/resources/ResourcesTest.java b/verification/src/test/java/fr/soeretempo/sido/verification/resources/ResourcesTest.java index 9420ecfa..e690d576 100644 --- a/verification/src/test/java/fr/soeretempo/sido/verification/resources/ResourcesTest.java +++ b/verification/src/test/java/fr/soeretempo/sido/verification/resources/ResourcesTest.java @@ -24,6 +24,7 @@ import java.time.Month; import java.time.format.DateTimeParseException; import java.util.Locale; +import lombok.extern.log4j.Log4j2; import org.junit.Test; /** @@ -31,6 +32,7 @@ import org.junit.Test; * * @author Olivier Maury */ + @Log4j2 public class ResourcesTest { private static final int DAY = 27; @@ -55,6 +57,30 @@ public class ResourcesTest { assertEquals(expected, actual); } + @Test + public void formatPluralMany() { + final int nb = 1314; + final String key = "cartItems[many]"; + final Resources res = new Resources(NAME, Locale.FRENCH); + final String actual = res.format(key, nb); + final String javaVersion = System.getProperty("java.specification.version"); + String expected; + switch (javaVersion) { + case "1.8": + case "9": + case "10": + case "11": + expected = "Il y a 1 314 produits dans votre panier, ce qui est beaucoup."; + break; + default: + expected = "Il y a 1 314 produits dans votre panier, ce qui est beaucoup."; + } + LOGGER.info("expected={}", expected); + LOGGER.info("actual__={}", actual); + LOGGER.info("Java version={}", javaVersion); + assertEquals("Failure with Java version=" + javaVersion, expected, actual); + } + @Test public void formatMissing() { Resources res = new Resources(NAME, Locale.FRENCH); -- GitLab From 1af26db8804b068e26814bfcce9131dbc0af3925 Mon Sep 17 00:00:00 2001 From: Olivier Maury <Olivier.Maury@inrae.fr> Date: Tue, 7 Jan 2025 18:28:20 +0100 Subject: [PATCH 11/19] Correction MessageFormat --- .../fr/soeretempo/sido/verification/resources/Resources.java | 5 ++--- .../sido/verification/resources/ResourcesTest.java | 3 +++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/verification/src/main/java/fr/soeretempo/sido/verification/resources/Resources.java b/verification/src/main/java/fr/soeretempo/sido/verification/resources/Resources.java index de165c3c..66d5ae51 100644 --- a/verification/src/main/java/fr/soeretempo/sido/verification/resources/Resources.java +++ b/verification/src/main/java/fr/soeretempo/sido/verification/resources/Resources.java @@ -101,9 +101,8 @@ public final class Resources { */ public String format(final String key, final Object... messageArguments) { try { - final MessageFormat formatter = new MessageFormat( - resourceBundle.getString(key)); - formatter.setLocale(currentLocale); + final String format = resourceBundle.getString(key); + final MessageFormat formatter = new MessageFormat(format, currentLocale); return formatter.format(messageArguments); } catch (final MissingResourceException e) { if (messageArguments == null) { diff --git a/verification/src/test/java/fr/soeretempo/sido/verification/resources/ResourcesTest.java b/verification/src/test/java/fr/soeretempo/sido/verification/resources/ResourcesTest.java index e690d576..b52c563b 100644 --- a/verification/src/test/java/fr/soeretempo/sido/verification/resources/ResourcesTest.java +++ b/verification/src/test/java/fr/soeretempo/sido/verification/resources/ResourcesTest.java @@ -57,6 +57,9 @@ public class ResourcesTest { assertEquals(expected, actual); } + /** + * Ensure format number is well done. + */ @Test public void formatPluralMany() { final int nb = 1314; -- GitLab From 6d4576bd83c46734e49d7926fdf06a0532bf31e9 Mon Sep 17 00:00:00 2001 From: Olivier Maury <Olivier.Maury@inrae.fr> Date: Tue, 7 Jan 2025 18:31:26 +0100 Subject: [PATCH 12/19] Nettoyage de code --- .../fr/soeretempo/sido/verification/resources/I18nTest.java | 5 ----- .../sido/verification/resources/ResourcesTest.java | 5 ----- 2 files changed, 10 deletions(-) diff --git a/verification/src/test/java/fr/soeretempo/sido/verification/resources/I18nTest.java b/verification/src/test/java/fr/soeretempo/sido/verification/resources/I18nTest.java index c021ca90..bcd8ce72 100644 --- a/verification/src/test/java/fr/soeretempo/sido/verification/resources/I18nTest.java +++ b/verification/src/test/java/fr/soeretempo/sido/verification/resources/I18nTest.java @@ -22,7 +22,6 @@ import static org.junit.Assert.assertEquals; import java.util.Locale; import java.util.ResourceBundle; -import lombok.extern.log4j.Log4j2; import org.junit.Test; /** @@ -31,7 +30,6 @@ import org.junit.Test; * @author Olivier Maury * @author Louis Tromel */ -@Log4j2 public class I18nTest { /** @@ -102,9 +100,6 @@ public class I18nTest { default: expected = "Il y a 1 314 produits dans votre panier, ce qui est beaucoup."; } - LOGGER.info("expected={}", expected); - LOGGER.info("actual__={}", actual); - LOGGER.info("Java version={}", javaVersion); assertEquals("Failure with Java version=" + javaVersion, expected, actual); } diff --git a/verification/src/test/java/fr/soeretempo/sido/verification/resources/ResourcesTest.java b/verification/src/test/java/fr/soeretempo/sido/verification/resources/ResourcesTest.java index b52c563b..5e4ea7fe 100644 --- a/verification/src/test/java/fr/soeretempo/sido/verification/resources/ResourcesTest.java +++ b/verification/src/test/java/fr/soeretempo/sido/verification/resources/ResourcesTest.java @@ -24,7 +24,6 @@ import java.time.Month; import java.time.format.DateTimeParseException; import java.util.Locale; -import lombok.extern.log4j.Log4j2; import org.junit.Test; /** @@ -32,7 +31,6 @@ import org.junit.Test; * * @author Olivier Maury */ - @Log4j2 public class ResourcesTest { private static final int DAY = 27; @@ -78,9 +76,6 @@ public class ResourcesTest { default: expected = "Il y a 1 314 produits dans votre panier, ce qui est beaucoup."; } - LOGGER.info("expected={}", expected); - LOGGER.info("actual__={}", actual); - LOGGER.info("Java version={}", javaVersion); assertEquals("Failure with Java version=" + javaVersion, expected, actual); } -- GitLab From 7f53580598c03bd7bffd09c44de2c856c22b41c6 Mon Sep 17 00:00:00 2001 From: Olivier Maury <Olivier.Maury@inrae.fr> Date: Tue, 7 Jan 2025 18:31:50 +0100 Subject: [PATCH 13/19] Nettoyage de code --- .gitlab-ci.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 85dc735e..0404cf24 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -42,16 +42,10 @@ build_job: paths: - target - "*/target" -test0_job: - stage: test - extends: .settingsxml - needs: ["build_job"] - script: - - mvn $MAVEN_CLI_OPTS test -Dtest=fr.soeretempo.sido.verification.resources.I18nTest,fr.soeretempo.sido.verification.resources.ResourcesTest --projects=verification test_job: stage: test extends: .settingsxml - needs: ["test0_job", "build_job"] + needs: ["build_job"] script: - echo "Maven test started" - mvn $MAVEN_CLI_OPTS test org.jacoco:jacoco-maven-plugin:report-aggregate -- GitLab From 4ad8553157b9a61193f77188d920a9cb270dfeae Mon Sep 17 00:00:00 2001 From: Olivier Maury <Olivier.Maury@inrae.fr> Date: Wed, 8 Jan 2025 07:15:37 +0100 Subject: [PATCH 14/19] Tester MainSidoVerifXLSXTest --- .gitlab-ci.yml | 16 +++++++++++++++- .../sido/cli/MainSidoVerifXLSXTest.java | 4 ++-- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0404cf24..70ef0c94 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -42,10 +42,24 @@ build_job: paths: - target - "*/target" +test0_job: + stage: test + extends: .settingsxml + needs: + - build_job + script: + - mvn $MAVEN_CLI_OPTS test -Dtest=fr.soeretempo.sido.cli.MainSidoVerifXLSXTest --projects=sido-cli + artifacts: + untracked: false + when: on_failure + access: all + expire_in: "30 days" + paths: + - sido-cli/logs/sidocli-test.log test_job: stage: test extends: .settingsxml - needs: ["build_job"] + needs: ["test0_job", "build_job"] script: - echo "Maven test started" - mvn $MAVEN_CLI_OPTS test org.jacoco:jacoco-maven-plugin:report-aggregate diff --git a/sido-cli/src/test/java/fr/soeretempo/sido/cli/MainSidoVerifXLSXTest.java b/sido-cli/src/test/java/fr/soeretempo/sido/cli/MainSidoVerifXLSXTest.java index 51c89652..30cd1fb0 100644 --- a/sido-cli/src/test/java/fr/soeretempo/sido/cli/MainSidoVerifXLSXTest.java +++ b/sido-cli/src/test/java/fr/soeretempo/sido/cli/MainSidoVerifXLSXTest.java @@ -58,6 +58,7 @@ public class MainSidoVerifXLSXTest { @Test public void verifXLSXFileTest() throws JAXBException, InvalidFormatException, Exception { + LOGGER.info("xmlPath={}, xlsxPath={}", xmlPath, xlsxPath); final String[] args = new String[] {xmlPath, xlsxPath}; try { MainSido.main(args); @@ -116,8 +117,7 @@ public class MainSidoVerifXLSXTest { @Parameterized.Parameters public static Iterable<String[]> data() { final List<String[]> files = new ArrayList<>(); - files.add(new String[] {"fichier-20180625.xlsx", "Foret.xml", - "Foret_verifXLSX.txt"}); + files.add(new String[] {"fichier-20180625.xlsx", "Foret.xml", "Foret_verifXLSX.txt"}); return files; } } -- GitLab From 6ca0844ce7a2645037bc2211d149791d3a3abae9 Mon Sep 17 00:00:00 2001 From: Olivier Maury <Olivier.Maury@inrae.fr> Date: Wed, 8 Jan 2025 07:23:45 +0100 Subject: [PATCH 15/19] Correction de MainSidoVerifXLSXTest --- .../test/java/fr/soeretempo/sido/cli/MainSidoVerifXLSXTest.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sido-cli/src/test/java/fr/soeretempo/sido/cli/MainSidoVerifXLSXTest.java b/sido-cli/src/test/java/fr/soeretempo/sido/cli/MainSidoVerifXLSXTest.java index 30cd1fb0..30ab3e7e 100644 --- a/sido-cli/src/test/java/fr/soeretempo/sido/cli/MainSidoVerifXLSXTest.java +++ b/sido-cli/src/test/java/fr/soeretempo/sido/cli/MainSidoVerifXLSXTest.java @@ -24,6 +24,7 @@ import java.nio.file.Path; import java.nio.file.Paths; import java.util.ArrayList; import java.util.List; +import java.util.Locale; import javax.xml.bind.JAXBException; @@ -60,6 +61,7 @@ public class MainSidoVerifXLSXTest { InvalidFormatException, Exception { LOGGER.info("xmlPath={}, xlsxPath={}", xmlPath, xlsxPath); final String[] args = new String[] {xmlPath, xlsxPath}; + Locale.setDefault(Locale.FRENCH); try { MainSido.main(args); } catch (final Exception e) { -- GitLab From 4de5efd9cc443d56649848320356b549ebc726d4 Mon Sep 17 00:00:00 2001 From: Olivier Maury <Olivier.Maury@inrae.fr> Date: Wed, 8 Jan 2025 07:41:12 +0100 Subject: [PATCH 16/19] Nettoyage de CI et configuration Checkstyle --- .gitlab-ci.yml | 15 +-------------- pom.xml | 17 +++++++++++++---- 2 files changed, 14 insertions(+), 18 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 70ef0c94..74eddc00 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -42,24 +42,11 @@ build_job: paths: - target - "*/target" -test0_job: +test_job: stage: test extends: .settingsxml needs: - build_job - script: - - mvn $MAVEN_CLI_OPTS test -Dtest=fr.soeretempo.sido.cli.MainSidoVerifXLSXTest --projects=sido-cli - artifacts: - untracked: false - when: on_failure - access: all - expire_in: "30 days" - paths: - - sido-cli/logs/sidocli-test.log -test_job: - stage: test - extends: .settingsxml - needs: ["test0_job", "build_job"] script: - echo "Maven test started" - mvn $MAVEN_CLI_OPTS test org.jacoco:jacoco-maven-plugin:report-aggregate diff --git a/pom.xml b/pom.xml index 32c14f80..2b1046f2 100644 --- a/pom.xml +++ b/pom.xml @@ -84,6 +84,7 @@ <properties> <environment>dev</environment> <build.date>${maven.build.timestamp}</build.date> + <checkstyle.version>3.6.0</checkstyle.version> <junit.version>4.13.2</junit.version> <log4j.version>2.22.1</log4j.version> <lombok.version>1.18.30</lombok.version> @@ -262,10 +263,6 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-checkstyle-plugin</artifactId> - <version>3.1.1</version> - <configuration> - <propertyExpansion>basedir=${basedir}</propertyExpansion> - </configuration> </plugin> <!-- Running JUnit tests --> <plugin> @@ -424,6 +421,18 @@ <artifactId>maven-deploy-plugin</artifactId> <version>2.8.2</version> </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-checkstyle-plugin</artifactId> + <version>${checkstyle.version}</version> + <configuration> + <excludes>**/module-info.java</excludes> + <includeResources>false</includeResources> + <includeTestResources>false</includeTestResources> + <includeTestSourceDirectory>true</includeTestSourceDirectory> + <propertyExpansion>basedir=${basedir}</propertyExpansion> + </configuration> + </plugin> </plugins> </pluginManagement> </build> -- GitLab From d0be4d431825eea5b851b2965485e0a7067817e1 Mon Sep 17 00:00:00 2001 From: Olivier Maury <Olivier.Maury@inrae.fr> Date: Wed, 8 Jan 2025 08:00:18 +0100 Subject: [PATCH 17/19] Configuration Checkstyle, sun_checks.xml de TEMPO --- config/sun_checks.xml | 285 +++++++++++++------ sido-cli/config/sun_checks.xml | 203 +------------ sido-createSchemaTable/config/sun_checks.xml | 203 +------------ sido-eml/config/sun_checks.xml | 208 +------------- sido-gwt/config/sun_checks.xml | 208 +------------- sido-rs/config/sun_checks.xml | 203 +------------ verification/config/sun_checks.xml | 203 +------------ 7 files changed, 203 insertions(+), 1310 deletions(-) mode change 100644 => 120000 sido-cli/config/sun_checks.xml mode change 100644 => 120000 sido-createSchemaTable/config/sun_checks.xml mode change 100644 => 120000 sido-eml/config/sun_checks.xml mode change 100644 => 120000 sido-gwt/config/sun_checks.xml mode change 100644 => 120000 sido-rs/config/sun_checks.xml mode change 100644 => 120000 verification/config/sun_checks.xml diff --git a/config/sun_checks.xml b/config/sun_checks.xml index b7e3b1dd..7b7a63d3 100644 --- a/config/sun_checks.xml +++ b/config/sun_checks.xml @@ -1,93 +1,202 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE module PUBLIC "-//Checkstyle//DTD Checkstyle Configuration 1.3//EN" "https://checkstyle.org/dtds/configuration_1_3.dtd"> +<?xml version="1.0"?> +<!DOCTYPE module PUBLIC + "-//Checkstyle//DTD Check Configuration 1.3//EN" + "https://checkstyle.org/dtds/configuration_1_3.dtd"> +<!-- This is a checkstyle configuration file derived from Sun coding conventions. + For descriptions of what the following rules do, please see the checkstyle + configuration page at http://checkstyle.sourceforge.net/config.html --> + <!-- - This configuration file was written by the eclipse-cs plugin configuration editor ---> -<!-- - Checkstyle-Configuration: SIDO config checkstyle - Description: none + + Checkstyle configuration that checks the sun coding conventions from: + + - the Java Language Specification at + http://java.sun.com/docs/books/jls/second_edition/html/index.html + + - the Sun Code Conventions at http://java.sun.com/docs/codeconv/ + + - the Javadoc guidelines at + http://java.sun.com/j2se/javadoc/writingdoccomments/index.html + + - the JDK Api documentation http://java.sun.com/j2se/docs/api/index.html + + - some best practices + + Checkstyle is very configurable. Be sure to read the documentation at + http://checkstyle.sf.net (or in your downloaded distribution). + + Most Checks are configurable, be sure to consult the documentation. + + To completely disable a check, just comment it out or delete it from the file. + + Finally, it is worth reading the documentation. + --> <module name="Checker"> - <property name="severity" value="warning"/> - <property name="fileExtensions" value="java, xml"/> - <module name="TreeWalker"> - <module name="JavadocMethod"/> - <module name="JavadocType"/> - <module name="JavadocVariable"/> - <module name="JavadocStyle"/> - <module name="ConstantName"/> - <module name="LocalFinalVariableName"/> - <module name="LocalVariableName"/> - <module name="MemberName"/> - <module name="MethodName"/> - <module name="PackageName"/> - <module name="ParameterName"/> - <module name="StaticVariableName"/> - <module name="TypeName"/> - <module name="AvoidStarImport"/> - <module name="IllegalImport"/> - <module name="RedundantImport"/> - <module name="UnusedImports"/> - <module name="MethodLength"/> - <module name="ParameterNumber"> - <property name="max" value="9"/> - </module> - <module name="EmptyForIteratorPad"/> - <module name="GenericWhitespace"/> - <module name="MethodParamPad"/> - <module name="NoWhitespaceAfter"/> - <module name="NoWhitespaceBefore"/> - <module name="OperatorWrap"/> - <module name="ParenPad"/> - <module name="TypecastParenPad"/> - <module name="WhitespaceAfter"/> - <module name="WhitespaceAround"/> - <module name="ModifierOrder"/> - <module name="RedundantModifier"/> - <module name="AvoidNestedBlocks"/> - <module name="EmptyBlock"/> - <module name="LeftCurly"/> - <module name="NeedBraces"/> - <module name="RightCurly"/> - <module name="AvoidInlineConditionals"/> - <module name="EmptyStatement"/> - <module name="EqualsHashCode"/> - <module name="HiddenField"/> - <module name="IllegalInstantiation"/> - <module name="InnerAssignment"/> - <module name="MagicNumber"/> - <module name="MissingSwitchDefault"/> - <module name="SimplifyBooleanExpression"/> - <module name="SimplifyBooleanReturn"/> - <module name="DesignForExtension"/> - <module name="FinalClass"/> - <module name="HideUtilityClassConstructor"/> - <module name="InterfaceIsType"/> - <module name="VisibilityModifier"/> - <module name="ArrayTypeStyle"/> - <module name="FinalParameters"/> - <module name="TodoComment"/> - <module name="UpperEll"/> - <module name="SuppressWarningsHolder"/> - </module> - <module name="JavadocPackage"/> - <module name="NewlineAtEndOfFile"/> - <module name="Translation"/> - <module name="FileLength"/> - <module name="FileTabCharacter"> - <property name="fileExtensions" value="java"/> - </module> - <module name="LineLength"> - <property name="ignorePattern" value="^import "/> - <property name="max" value="120"/> - </module> - <module name="RegexpSingleline"> - <property name="format" value="\s+$"/> - <property name="message" value="Line has trailing spaces."/> - </module> - <module name="SuppressionFilter"> - <property name="file" value="${basedir}/config/checkstyle-suppressions.xml"/> - </module> - <module name="SuppressWarningsFilter"/> + <!-- + If you set the basedir property below, then all reported file + names will be relative to the specified directory. See + http://checkstyle.sourceforge.net/5.x/config.html#Checker + + <property name="basedir" value="${basedir}"/> + --> + + <!-- + --> + <property name="fileExtensions" value="java, xml"/> + + <!-- Checks that a package-info.java file exists for each package. --> + <!-- See http://checkstyle.sf.net/config_javadoc.html#JavadocPackage --> + <module name="JavadocPackage" /> + + <!-- Checks whether files end with a new line. --> + <!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile --> + <module name="NewlineAtEndOfFile" /> + + <!-- Checks that property files contain the same keys. --> + <!-- See http://checkstyle.sf.net/config_misc.html#Translation --> + <module name="Translation" /> + + <!-- Checks for Size Violations. --> + <!-- See http://checkstyle.sf.net/config_sizes.html --> + <module name="FileLength" /> + + <!-- Checks for whitespace --> + <!-- See http://checkstyle.sf.net/config_whitespace.html --> + <module name="FileTabCharacter"> + <property name="fileExtensions" value="java" /> + </module> + + <!-- https://checkstyle.sourceforge.io/config_sizes.html#LineLength --> + <module name="LineLength"> + <property name="ignorePattern" value="^import " /> + <property name="max" value="120" /> + </module> + + <!-- Miscellaneous other checks. --> + <!-- See http://checkstyle.sf.net/config_misc.html --> + <module name="RegexpSingleline"> + <property name="format" value="\s+$" /> + <property name="minimum" value="0" /> + <property name="maximum" value="0" /> + <property name="message" value="Line has trailing spaces." /> + </module> + + <module name="SuppressionFilter"> + <property name="file" + value="${basedir}/config/checkstyle-suppressions.xml" /> + </module> + + <!-- Adding to Sun convention: --> + <module name="SuppressWarningsFilter" /> + <!-- <module name="SuppressionCommentFilter"> <property name="offCommentFormat" + value="CHECKSTYLE.OFF\: ([\w\|]+)" /> <property name="onCommentFormat" value="CHECKSTYLE.ON\: + ([\w\|]+)" /> <property name="checkFormat" value="$1" /> </module> --> + + <!-- Checks for Headers --> + <!-- See http://checkstyle.sf.net/config_header.html --> + <!-- <module name="Header"> --> + <!-- <property name="headerFile" value="${checkstyle.header.file}"/> --> + <!-- <property name="fileExtensions" value="java"/> --> + <!-- </module> --> + <module name="TreeWalker"> + + <!-- Checks for Javadoc comments. --> + <!-- See http://checkstyle.sf.net/config_javadoc.html --> + <module name="JavadocMethod" /> + <module name="JavadocType" /> + <module name="JavadocVariable" /> + <module name="JavadocStyle" /> + + + <!-- Checks for Naming Conventions. --> + <!-- See http://checkstyle.sf.net/config_naming.html --> + <module name="ConstantName" /> + <module name="LocalFinalVariableName" /> + <module name="LocalVariableName" /> + <module name="MemberName" /> + <module name="MethodName" /> + <module name="PackageName" /> + <module name="ParameterName" /> + <module name="StaticVariableName" /> + <module name="TypeName" /> + + + <!-- Checks for imports --> + <!-- See http://checkstyle.sf.net/config_import.html --> + <module name="AvoidStarImport" /> + <module name="IllegalImport" /> <!-- defaults to sun.* packages --> + <module name="RedundantImport" /> + <module name="UnusedImports" /> + + + <!-- Checks for Size Violations. --> + <!-- See http://checkstyle.sf.net/config_sizes.html --> + <module name="MethodLength" /> + <module name="ParameterNumber"> + <property name="max" value="9"/> + </module> + + <!-- Checks for whitespace --> + <!-- See http://checkstyle.sf.net/config_whitespace.html --> + <module name="EmptyForIteratorPad" /> + <module name="GenericWhitespace" /> + <module name="MethodParamPad" /> + <module name="NoWhitespaceAfter" /> + <module name="NoWhitespaceBefore" /> + <module name="OperatorWrap" /> + <module name="ParenPad" /> + <module name="TypecastParenPad" /> + <module name="WhitespaceAfter" /> + <module name="WhitespaceAround" /> + + + <!-- Modifier Checks --> + <!-- See http://checkstyle.sf.net/config_modifiers.html --> + <module name="ModifierOrder" /> + <module name="RedundantModifier" /> + + + <!-- Checks for blocks. You know, those {}'s --> + <!-- See http://checkstyle.sf.net/config_blocks.html --> + <module name="AvoidNestedBlocks" /> + <module name="EmptyBlock" /> + <module name="LeftCurly" /> + <module name="NeedBraces" /> + <module name="RightCurly" /> + + + <!-- Checks for common coding problems --> + <!-- See http://checkstyle.sf.net/config_coding.html --> + <module name="AvoidInlineConditionals" /> + <module name="EmptyStatement" /> + <module name="EqualsHashCode" /> + <module name="HiddenField" /> + <module name="IllegalInstantiation" /> + <module name="InnerAssignment" /> + <module name="MagicNumber" /> + <module name="MissingSwitchDefault" /> + <module name="SimplifyBooleanExpression" /> + <module name="SimplifyBooleanReturn" /> + + <!-- Checks for class design --> + <!-- See http://checkstyle.sf.net/config_design.html --> + <module name="DesignForExtension" /> + <module name="FinalClass" /> + <module name="HideUtilityClassConstructor" /> + <module name="InterfaceIsType" /> + <module name="VisibilityModifier" /> + + + <!-- Miscellaneous other checks. --> + <!-- See http://checkstyle.sf.net/config_misc.html --> + <module name="ArrayTypeStyle" /> + <module name="FinalParameters" /> + <module name="TodoComment" /> + <module name="UpperEll" /> + + <!-- Adding to Sun convention: --> + <module name="SuppressWarningsHolder" /> + </module> </module> diff --git a/sido-cli/config/sun_checks.xml b/sido-cli/config/sun_checks.xml deleted file mode 100644 index 7b7a63d3..00000000 --- a/sido-cli/config/sun_checks.xml +++ /dev/null @@ -1,202 +0,0 @@ -<?xml version="1.0"?> -<!DOCTYPE module PUBLIC - "-//Checkstyle//DTD Check Configuration 1.3//EN" - "https://checkstyle.org/dtds/configuration_1_3.dtd"> -<!-- This is a checkstyle configuration file derived from Sun coding conventions. - For descriptions of what the following rules do, please see the checkstyle - configuration page at http://checkstyle.sourceforge.net/config.html --> - - -<!-- - - Checkstyle configuration that checks the sun coding conventions from: - - - the Java Language Specification at - http://java.sun.com/docs/books/jls/second_edition/html/index.html - - - the Sun Code Conventions at http://java.sun.com/docs/codeconv/ - - - the Javadoc guidelines at - http://java.sun.com/j2se/javadoc/writingdoccomments/index.html - - - the JDK Api documentation http://java.sun.com/j2se/docs/api/index.html - - - some best practices - - Checkstyle is very configurable. Be sure to read the documentation at - http://checkstyle.sf.net (or in your downloaded distribution). - - Most Checks are configurable, be sure to consult the documentation. - - To completely disable a check, just comment it out or delete it from the file. - - Finally, it is worth reading the documentation. - ---> -<module name="Checker"> - <!-- - If you set the basedir property below, then all reported file - names will be relative to the specified directory. See - http://checkstyle.sourceforge.net/5.x/config.html#Checker - - <property name="basedir" value="${basedir}"/> - --> - - <!-- - --> - <property name="fileExtensions" value="java, xml"/> - - <!-- Checks that a package-info.java file exists for each package. --> - <!-- See http://checkstyle.sf.net/config_javadoc.html#JavadocPackage --> - <module name="JavadocPackage" /> - - <!-- Checks whether files end with a new line. --> - <!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile --> - <module name="NewlineAtEndOfFile" /> - - <!-- Checks that property files contain the same keys. --> - <!-- See http://checkstyle.sf.net/config_misc.html#Translation --> - <module name="Translation" /> - - <!-- Checks for Size Violations. --> - <!-- See http://checkstyle.sf.net/config_sizes.html --> - <module name="FileLength" /> - - <!-- Checks for whitespace --> - <!-- See http://checkstyle.sf.net/config_whitespace.html --> - <module name="FileTabCharacter"> - <property name="fileExtensions" value="java" /> - </module> - - <!-- https://checkstyle.sourceforge.io/config_sizes.html#LineLength --> - <module name="LineLength"> - <property name="ignorePattern" value="^import " /> - <property name="max" value="120" /> - </module> - - <!-- Miscellaneous other checks. --> - <!-- See http://checkstyle.sf.net/config_misc.html --> - <module name="RegexpSingleline"> - <property name="format" value="\s+$" /> - <property name="minimum" value="0" /> - <property name="maximum" value="0" /> - <property name="message" value="Line has trailing spaces." /> - </module> - - <module name="SuppressionFilter"> - <property name="file" - value="${basedir}/config/checkstyle-suppressions.xml" /> - </module> - - <!-- Adding to Sun convention: --> - <module name="SuppressWarningsFilter" /> - <!-- <module name="SuppressionCommentFilter"> <property name="offCommentFormat" - value="CHECKSTYLE.OFF\: ([\w\|]+)" /> <property name="onCommentFormat" value="CHECKSTYLE.ON\: - ([\w\|]+)" /> <property name="checkFormat" value="$1" /> </module> --> - - <!-- Checks for Headers --> - <!-- See http://checkstyle.sf.net/config_header.html --> - <!-- <module name="Header"> --> - <!-- <property name="headerFile" value="${checkstyle.header.file}"/> --> - <!-- <property name="fileExtensions" value="java"/> --> - <!-- </module> --> - <module name="TreeWalker"> - - <!-- Checks for Javadoc comments. --> - <!-- See http://checkstyle.sf.net/config_javadoc.html --> - <module name="JavadocMethod" /> - <module name="JavadocType" /> - <module name="JavadocVariable" /> - <module name="JavadocStyle" /> - - - <!-- Checks for Naming Conventions. --> - <!-- See http://checkstyle.sf.net/config_naming.html --> - <module name="ConstantName" /> - <module name="LocalFinalVariableName" /> - <module name="LocalVariableName" /> - <module name="MemberName" /> - <module name="MethodName" /> - <module name="PackageName" /> - <module name="ParameterName" /> - <module name="StaticVariableName" /> - <module name="TypeName" /> - - - <!-- Checks for imports --> - <!-- See http://checkstyle.sf.net/config_import.html --> - <module name="AvoidStarImport" /> - <module name="IllegalImport" /> <!-- defaults to sun.* packages --> - <module name="RedundantImport" /> - <module name="UnusedImports" /> - - - <!-- Checks for Size Violations. --> - <!-- See http://checkstyle.sf.net/config_sizes.html --> - <module name="MethodLength" /> - <module name="ParameterNumber"> - <property name="max" value="9"/> - </module> - - <!-- Checks for whitespace --> - <!-- See http://checkstyle.sf.net/config_whitespace.html --> - <module name="EmptyForIteratorPad" /> - <module name="GenericWhitespace" /> - <module name="MethodParamPad" /> - <module name="NoWhitespaceAfter" /> - <module name="NoWhitespaceBefore" /> - <module name="OperatorWrap" /> - <module name="ParenPad" /> - <module name="TypecastParenPad" /> - <module name="WhitespaceAfter" /> - <module name="WhitespaceAround" /> - - - <!-- Modifier Checks --> - <!-- See http://checkstyle.sf.net/config_modifiers.html --> - <module name="ModifierOrder" /> - <module name="RedundantModifier" /> - - - <!-- Checks for blocks. You know, those {}'s --> - <!-- See http://checkstyle.sf.net/config_blocks.html --> - <module name="AvoidNestedBlocks" /> - <module name="EmptyBlock" /> - <module name="LeftCurly" /> - <module name="NeedBraces" /> - <module name="RightCurly" /> - - - <!-- Checks for common coding problems --> - <!-- See http://checkstyle.sf.net/config_coding.html --> - <module name="AvoidInlineConditionals" /> - <module name="EmptyStatement" /> - <module name="EqualsHashCode" /> - <module name="HiddenField" /> - <module name="IllegalInstantiation" /> - <module name="InnerAssignment" /> - <module name="MagicNumber" /> - <module name="MissingSwitchDefault" /> - <module name="SimplifyBooleanExpression" /> - <module name="SimplifyBooleanReturn" /> - - <!-- Checks for class design --> - <!-- See http://checkstyle.sf.net/config_design.html --> - <module name="DesignForExtension" /> - <module name="FinalClass" /> - <module name="HideUtilityClassConstructor" /> - <module name="InterfaceIsType" /> - <module name="VisibilityModifier" /> - - - <!-- Miscellaneous other checks. --> - <!-- See http://checkstyle.sf.net/config_misc.html --> - <module name="ArrayTypeStyle" /> - <module name="FinalParameters" /> - <module name="TodoComment" /> - <module name="UpperEll" /> - - <!-- Adding to Sun convention: --> - <module name="SuppressWarningsHolder" /> - </module> -</module> diff --git a/sido-cli/config/sun_checks.xml b/sido-cli/config/sun_checks.xml new file mode 120000 index 00000000..63587434 --- /dev/null +++ b/sido-cli/config/sun_checks.xml @@ -0,0 +1 @@ +../../config/sun_checks.xml \ No newline at end of file diff --git a/sido-createSchemaTable/config/sun_checks.xml b/sido-createSchemaTable/config/sun_checks.xml deleted file mode 100644 index 7b7a63d3..00000000 --- a/sido-createSchemaTable/config/sun_checks.xml +++ /dev/null @@ -1,202 +0,0 @@ -<?xml version="1.0"?> -<!DOCTYPE module PUBLIC - "-//Checkstyle//DTD Check Configuration 1.3//EN" - "https://checkstyle.org/dtds/configuration_1_3.dtd"> -<!-- This is a checkstyle configuration file derived from Sun coding conventions. - For descriptions of what the following rules do, please see the checkstyle - configuration page at http://checkstyle.sourceforge.net/config.html --> - - -<!-- - - Checkstyle configuration that checks the sun coding conventions from: - - - the Java Language Specification at - http://java.sun.com/docs/books/jls/second_edition/html/index.html - - - the Sun Code Conventions at http://java.sun.com/docs/codeconv/ - - - the Javadoc guidelines at - http://java.sun.com/j2se/javadoc/writingdoccomments/index.html - - - the JDK Api documentation http://java.sun.com/j2se/docs/api/index.html - - - some best practices - - Checkstyle is very configurable. Be sure to read the documentation at - http://checkstyle.sf.net (or in your downloaded distribution). - - Most Checks are configurable, be sure to consult the documentation. - - To completely disable a check, just comment it out or delete it from the file. - - Finally, it is worth reading the documentation. - ---> -<module name="Checker"> - <!-- - If you set the basedir property below, then all reported file - names will be relative to the specified directory. See - http://checkstyle.sourceforge.net/5.x/config.html#Checker - - <property name="basedir" value="${basedir}"/> - --> - - <!-- - --> - <property name="fileExtensions" value="java, xml"/> - - <!-- Checks that a package-info.java file exists for each package. --> - <!-- See http://checkstyle.sf.net/config_javadoc.html#JavadocPackage --> - <module name="JavadocPackage" /> - - <!-- Checks whether files end with a new line. --> - <!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile --> - <module name="NewlineAtEndOfFile" /> - - <!-- Checks that property files contain the same keys. --> - <!-- See http://checkstyle.sf.net/config_misc.html#Translation --> - <module name="Translation" /> - - <!-- Checks for Size Violations. --> - <!-- See http://checkstyle.sf.net/config_sizes.html --> - <module name="FileLength" /> - - <!-- Checks for whitespace --> - <!-- See http://checkstyle.sf.net/config_whitespace.html --> - <module name="FileTabCharacter"> - <property name="fileExtensions" value="java" /> - </module> - - <!-- https://checkstyle.sourceforge.io/config_sizes.html#LineLength --> - <module name="LineLength"> - <property name="ignorePattern" value="^import " /> - <property name="max" value="120" /> - </module> - - <!-- Miscellaneous other checks. --> - <!-- See http://checkstyle.sf.net/config_misc.html --> - <module name="RegexpSingleline"> - <property name="format" value="\s+$" /> - <property name="minimum" value="0" /> - <property name="maximum" value="0" /> - <property name="message" value="Line has trailing spaces." /> - </module> - - <module name="SuppressionFilter"> - <property name="file" - value="${basedir}/config/checkstyle-suppressions.xml" /> - </module> - - <!-- Adding to Sun convention: --> - <module name="SuppressWarningsFilter" /> - <!-- <module name="SuppressionCommentFilter"> <property name="offCommentFormat" - value="CHECKSTYLE.OFF\: ([\w\|]+)" /> <property name="onCommentFormat" value="CHECKSTYLE.ON\: - ([\w\|]+)" /> <property name="checkFormat" value="$1" /> </module> --> - - <!-- Checks for Headers --> - <!-- See http://checkstyle.sf.net/config_header.html --> - <!-- <module name="Header"> --> - <!-- <property name="headerFile" value="${checkstyle.header.file}"/> --> - <!-- <property name="fileExtensions" value="java"/> --> - <!-- </module> --> - <module name="TreeWalker"> - - <!-- Checks for Javadoc comments. --> - <!-- See http://checkstyle.sf.net/config_javadoc.html --> - <module name="JavadocMethod" /> - <module name="JavadocType" /> - <module name="JavadocVariable" /> - <module name="JavadocStyle" /> - - - <!-- Checks for Naming Conventions. --> - <!-- See http://checkstyle.sf.net/config_naming.html --> - <module name="ConstantName" /> - <module name="LocalFinalVariableName" /> - <module name="LocalVariableName" /> - <module name="MemberName" /> - <module name="MethodName" /> - <module name="PackageName" /> - <module name="ParameterName" /> - <module name="StaticVariableName" /> - <module name="TypeName" /> - - - <!-- Checks for imports --> - <!-- See http://checkstyle.sf.net/config_import.html --> - <module name="AvoidStarImport" /> - <module name="IllegalImport" /> <!-- defaults to sun.* packages --> - <module name="RedundantImport" /> - <module name="UnusedImports" /> - - - <!-- Checks for Size Violations. --> - <!-- See http://checkstyle.sf.net/config_sizes.html --> - <module name="MethodLength" /> - <module name="ParameterNumber"> - <property name="max" value="9"/> - </module> - - <!-- Checks for whitespace --> - <!-- See http://checkstyle.sf.net/config_whitespace.html --> - <module name="EmptyForIteratorPad" /> - <module name="GenericWhitespace" /> - <module name="MethodParamPad" /> - <module name="NoWhitespaceAfter" /> - <module name="NoWhitespaceBefore" /> - <module name="OperatorWrap" /> - <module name="ParenPad" /> - <module name="TypecastParenPad" /> - <module name="WhitespaceAfter" /> - <module name="WhitespaceAround" /> - - - <!-- Modifier Checks --> - <!-- See http://checkstyle.sf.net/config_modifiers.html --> - <module name="ModifierOrder" /> - <module name="RedundantModifier" /> - - - <!-- Checks for blocks. You know, those {}'s --> - <!-- See http://checkstyle.sf.net/config_blocks.html --> - <module name="AvoidNestedBlocks" /> - <module name="EmptyBlock" /> - <module name="LeftCurly" /> - <module name="NeedBraces" /> - <module name="RightCurly" /> - - - <!-- Checks for common coding problems --> - <!-- See http://checkstyle.sf.net/config_coding.html --> - <module name="AvoidInlineConditionals" /> - <module name="EmptyStatement" /> - <module name="EqualsHashCode" /> - <module name="HiddenField" /> - <module name="IllegalInstantiation" /> - <module name="InnerAssignment" /> - <module name="MagicNumber" /> - <module name="MissingSwitchDefault" /> - <module name="SimplifyBooleanExpression" /> - <module name="SimplifyBooleanReturn" /> - - <!-- Checks for class design --> - <!-- See http://checkstyle.sf.net/config_design.html --> - <module name="DesignForExtension" /> - <module name="FinalClass" /> - <module name="HideUtilityClassConstructor" /> - <module name="InterfaceIsType" /> - <module name="VisibilityModifier" /> - - - <!-- Miscellaneous other checks. --> - <!-- See http://checkstyle.sf.net/config_misc.html --> - <module name="ArrayTypeStyle" /> - <module name="FinalParameters" /> - <module name="TodoComment" /> - <module name="UpperEll" /> - - <!-- Adding to Sun convention: --> - <module name="SuppressWarningsHolder" /> - </module> -</module> diff --git a/sido-createSchemaTable/config/sun_checks.xml b/sido-createSchemaTable/config/sun_checks.xml new file mode 120000 index 00000000..63587434 --- /dev/null +++ b/sido-createSchemaTable/config/sun_checks.xml @@ -0,0 +1 @@ +../../config/sun_checks.xml \ No newline at end of file diff --git a/sido-eml/config/sun_checks.xml b/sido-eml/config/sun_checks.xml deleted file mode 100644 index fe3f27ce..00000000 --- a/sido-eml/config/sun_checks.xml +++ /dev/null @@ -1,207 +0,0 @@ -<?xml version="1.0"?> -<!DOCTYPE module PUBLIC - "-//Checkstyle//DTD Check Configuration 1.3//EN" - "https://checkstyle.org/dtds/configuration_1_3.dtd"> -<!-- This is a checkstyle configuration file derived from Sun coding conventions. - For descriptions of what the following rules do, please see the checkstyle - configuration page at http://checkstyle.sourceforge.net/config.html --> - - -<!-- - - Checkstyle configuration that checks the sun coding conventions from: - - - the Java Language Specification at - http://java.sun.com/docs/books/jls/second_edition/html/index.html - - - the Sun Code Conventions at http://java.sun.com/docs/codeconv/ - - - the Javadoc guidelines at - http://java.sun.com/j2se/javadoc/writingdoccomments/index.html - - - the JDK Api documentation http://java.sun.com/j2se/docs/api/index.html - - - some best practices - - Checkstyle is very configurable. Be sure to read the documentation at - http://checkstyle.sf.net (or in your downloaded distribution). - - Most Checks are configurable, be sure to consult the documentation. - - To completely disable a check, just comment it out or delete it from the file. - - Finally, it is worth reading the documentation. - ---> -<module name="Checker"> - <!-- - If you set the basedir property below, then all reported file - names will be relative to the specified directory. See - http://checkstyle.sourceforge.net/5.x/config.html#Checker - - <property name="basedir" value="${basedir}"/> - --> - - <!-- - --> - <property name="fileExtensions" value="java, xml"/> - - <!-- Checks that a package-info.java file exists for each package. --> - <!-- See http://checkstyle.sf.net/config_javadoc.html#JavadocPackage --> - <module name="JavadocPackage" /> - - <!-- Checks whether files end with a new line. --> - <!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile --> - <module name="NewlineAtEndOfFile" /> - - <!-- Checks that property files contain the same keys. --> - <!-- See http://checkstyle.sf.net/config_misc.html#Translation --> - <module name="Translation" /> - - <!-- Checks for Size Violations. --> - <!-- See http://checkstyle.sf.net/config_sizes.html --> - <module name="FileLength" /> - - <!-- Checks for whitespace --> - <!-- See http://checkstyle.sf.net/config_whitespace.html --> - <module name="FileTabCharacter"> - <property name="fileExtensions" value="java" /> - </module> - - <!-- https://checkstyle.sourceforge.io/config_sizes.html#LineLength --> - <module name="LineLength"> - <property name="ignorePattern" value="^import " /> - <property name="max" value="120" /> - </module> - - <!-- Miscellaneous other checks. --> - <!-- See http://checkstyle.sf.net/config_misc.html --> - <module name="RegexpSingleline"> - <property name="format" value="\s+$" /> - <property name="minimum" value="0" /> - <property name="maximum" value="0" /> - <property name="message" value="Line has trailing spaces." /> - </module> - - <module name="SuppressionFilter"> - <property name="file" - value="${basedir}/config/checkstyle-suppressions.xml" /> - </module> - - <!-- Adding to Sun convention: --> - <module name="SuppressWarningsFilter" /> - <!-- <module name="SuppressionCommentFilter"> <property name="offCommentFormat" - value="CHECKSTYLE.OFF\: ([\w\|]+)" /> <property name="onCommentFormat" value="CHECKSTYLE.ON\: - ([\w\|]+)" /> <property name="checkFormat" value="$1" /> </module> --> - - <!-- Checks for Headers --> - <!-- See http://checkstyle.sf.net/config_header.html --> - <!-- <module name="Header"> --> - <!-- <property name="headerFile" value="${checkstyle.header.file}"/> --> - <!-- <property name="fileExtensions" value="java"/> --> - <!-- </module> --> - <module name="TreeWalker"> - - <!-- Checks for Javadoc comments. --> - <!-- See http://checkstyle.sf.net/config_javadoc.html --> - <module name="JavadocMethod" /> - <module name="JavadocType" /> - <module name="JavadocVariable" /> - <module name="JavadocStyle" /> - - - <!-- Checks for Naming Conventions. --> - <!-- See http://checkstyle.sf.net/config_naming.html --> - <module name="ConstantName" /> - <module name="LocalFinalVariableName" /> - <module name="LocalVariableName" /> - <module name="MemberName" /> - <module name="MethodName" /> - <module name="PackageName" /> - <module name="ParameterName" /> - <module name="StaticVariableName" /> - <module name="TypeName" /> - - - <!-- Checks for imports --> - <!-- See http://checkstyle.sf.net/config_import.html --> - <module name="AvoidStarImport" /> - <module name="IllegalImport" /> <!-- defaults to sun.* packages --> - <module name="RedundantImport" /> - <module name="UnusedImports" /> - - - <!-- Checks for Size Violations. --> - <!-- See http://checkstyle.sf.net/config_sizes.html --> - <module name="MethodLength" /> - <module name="ParameterNumber"> - <property name="max" value="9"/> - </module> - - <!-- Checks for whitespace --> - <!-- See http://checkstyle.sf.net/config_whitespace.html --> - <module name="EmptyForIteratorPad" /> - <module name="GenericWhitespace" /> - <module name="MethodParamPad" /> - <module name="NoWhitespaceAfter" /> - <module name="NoWhitespaceBefore" /> - <module name="OperatorWrap" /> - <module name="ParenPad" /> - <module name="TypecastParenPad" /> - <module name="WhitespaceAfter" /> - <module name="WhitespaceAround" /> - - - <!-- Modifier Checks --> - <!-- See http://checkstyle.sf.net/config_modifiers.html --> - <module name="ModifierOrder" /> - <module name="RedundantModifier" /> - - - <!-- Checks for blocks. You know, those {}'s --> - <!-- See http://checkstyle.sf.net/config_blocks.html --> - <module name="AvoidNestedBlocks" /> - <module name="EmptyBlock" /> - <module name="LeftCurly" /> - <module name="NeedBraces" /> - <module name="RightCurly" /> - - - <!-- Checks for common coding problems --> - <!-- See http://checkstyle.sf.net/config_coding.html --> - <module name="AvoidInlineConditionals" /> - <module name="EmptyStatement" /> - <module name="EqualsHashCode" /> - <module name="HiddenField" /> - <module name="IllegalInstantiation" /> - <module name="InnerAssignment" /> - <module name="MagicNumber" /> - <module name="MissingSwitchDefault" /> - <module name="SimplifyBooleanExpression" /> - <module name="SimplifyBooleanReturn" /> - - <!-- Checks for class design --> - <!-- See http://checkstyle.sf.net/config_design.html --> - <module name="DesignForExtension" /> - <module name="FinalClass" /> - <module name="HideUtilityClassConstructor" /> - <module name="InterfaceIsType" /> - <module name="VisibilityModifier" /> - - - <!-- Miscellaneous other checks. --> - <!-- See http://checkstyle.sf.net/config_misc.html --> - <module name="ArrayTypeStyle" /> - <module name="FinalParameters" /> - <module name="TodoComment" /> - <module name="UpperEll" /> - - <!-- Adding to Sun convention: --> - <module name="SuppressWarningsHolder" /> - - <!-- Allow protected for UiBinder --> - <module name="VisibilityModifier"> - <property name="protectedAllowed" value="true"/> - </module> - </module> -</module> diff --git a/sido-eml/config/sun_checks.xml b/sido-eml/config/sun_checks.xml new file mode 120000 index 00000000..63587434 --- /dev/null +++ b/sido-eml/config/sun_checks.xml @@ -0,0 +1 @@ +../../config/sun_checks.xml \ No newline at end of file diff --git a/sido-gwt/config/sun_checks.xml b/sido-gwt/config/sun_checks.xml deleted file mode 100644 index fe3f27ce..00000000 --- a/sido-gwt/config/sun_checks.xml +++ /dev/null @@ -1,207 +0,0 @@ -<?xml version="1.0"?> -<!DOCTYPE module PUBLIC - "-//Checkstyle//DTD Check Configuration 1.3//EN" - "https://checkstyle.org/dtds/configuration_1_3.dtd"> -<!-- This is a checkstyle configuration file derived from Sun coding conventions. - For descriptions of what the following rules do, please see the checkstyle - configuration page at http://checkstyle.sourceforge.net/config.html --> - - -<!-- - - Checkstyle configuration that checks the sun coding conventions from: - - - the Java Language Specification at - http://java.sun.com/docs/books/jls/second_edition/html/index.html - - - the Sun Code Conventions at http://java.sun.com/docs/codeconv/ - - - the Javadoc guidelines at - http://java.sun.com/j2se/javadoc/writingdoccomments/index.html - - - the JDK Api documentation http://java.sun.com/j2se/docs/api/index.html - - - some best practices - - Checkstyle is very configurable. Be sure to read the documentation at - http://checkstyle.sf.net (or in your downloaded distribution). - - Most Checks are configurable, be sure to consult the documentation. - - To completely disable a check, just comment it out or delete it from the file. - - Finally, it is worth reading the documentation. - ---> -<module name="Checker"> - <!-- - If you set the basedir property below, then all reported file - names will be relative to the specified directory. See - http://checkstyle.sourceforge.net/5.x/config.html#Checker - - <property name="basedir" value="${basedir}"/> - --> - - <!-- - --> - <property name="fileExtensions" value="java, xml"/> - - <!-- Checks that a package-info.java file exists for each package. --> - <!-- See http://checkstyle.sf.net/config_javadoc.html#JavadocPackage --> - <module name="JavadocPackage" /> - - <!-- Checks whether files end with a new line. --> - <!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile --> - <module name="NewlineAtEndOfFile" /> - - <!-- Checks that property files contain the same keys. --> - <!-- See http://checkstyle.sf.net/config_misc.html#Translation --> - <module name="Translation" /> - - <!-- Checks for Size Violations. --> - <!-- See http://checkstyle.sf.net/config_sizes.html --> - <module name="FileLength" /> - - <!-- Checks for whitespace --> - <!-- See http://checkstyle.sf.net/config_whitespace.html --> - <module name="FileTabCharacter"> - <property name="fileExtensions" value="java" /> - </module> - - <!-- https://checkstyle.sourceforge.io/config_sizes.html#LineLength --> - <module name="LineLength"> - <property name="ignorePattern" value="^import " /> - <property name="max" value="120" /> - </module> - - <!-- Miscellaneous other checks. --> - <!-- See http://checkstyle.sf.net/config_misc.html --> - <module name="RegexpSingleline"> - <property name="format" value="\s+$" /> - <property name="minimum" value="0" /> - <property name="maximum" value="0" /> - <property name="message" value="Line has trailing spaces." /> - </module> - - <module name="SuppressionFilter"> - <property name="file" - value="${basedir}/config/checkstyle-suppressions.xml" /> - </module> - - <!-- Adding to Sun convention: --> - <module name="SuppressWarningsFilter" /> - <!-- <module name="SuppressionCommentFilter"> <property name="offCommentFormat" - value="CHECKSTYLE.OFF\: ([\w\|]+)" /> <property name="onCommentFormat" value="CHECKSTYLE.ON\: - ([\w\|]+)" /> <property name="checkFormat" value="$1" /> </module> --> - - <!-- Checks for Headers --> - <!-- See http://checkstyle.sf.net/config_header.html --> - <!-- <module name="Header"> --> - <!-- <property name="headerFile" value="${checkstyle.header.file}"/> --> - <!-- <property name="fileExtensions" value="java"/> --> - <!-- </module> --> - <module name="TreeWalker"> - - <!-- Checks for Javadoc comments. --> - <!-- See http://checkstyle.sf.net/config_javadoc.html --> - <module name="JavadocMethod" /> - <module name="JavadocType" /> - <module name="JavadocVariable" /> - <module name="JavadocStyle" /> - - - <!-- Checks for Naming Conventions. --> - <!-- See http://checkstyle.sf.net/config_naming.html --> - <module name="ConstantName" /> - <module name="LocalFinalVariableName" /> - <module name="LocalVariableName" /> - <module name="MemberName" /> - <module name="MethodName" /> - <module name="PackageName" /> - <module name="ParameterName" /> - <module name="StaticVariableName" /> - <module name="TypeName" /> - - - <!-- Checks for imports --> - <!-- See http://checkstyle.sf.net/config_import.html --> - <module name="AvoidStarImport" /> - <module name="IllegalImport" /> <!-- defaults to sun.* packages --> - <module name="RedundantImport" /> - <module name="UnusedImports" /> - - - <!-- Checks for Size Violations. --> - <!-- See http://checkstyle.sf.net/config_sizes.html --> - <module name="MethodLength" /> - <module name="ParameterNumber"> - <property name="max" value="9"/> - </module> - - <!-- Checks for whitespace --> - <!-- See http://checkstyle.sf.net/config_whitespace.html --> - <module name="EmptyForIteratorPad" /> - <module name="GenericWhitespace" /> - <module name="MethodParamPad" /> - <module name="NoWhitespaceAfter" /> - <module name="NoWhitespaceBefore" /> - <module name="OperatorWrap" /> - <module name="ParenPad" /> - <module name="TypecastParenPad" /> - <module name="WhitespaceAfter" /> - <module name="WhitespaceAround" /> - - - <!-- Modifier Checks --> - <!-- See http://checkstyle.sf.net/config_modifiers.html --> - <module name="ModifierOrder" /> - <module name="RedundantModifier" /> - - - <!-- Checks for blocks. You know, those {}'s --> - <!-- See http://checkstyle.sf.net/config_blocks.html --> - <module name="AvoidNestedBlocks" /> - <module name="EmptyBlock" /> - <module name="LeftCurly" /> - <module name="NeedBraces" /> - <module name="RightCurly" /> - - - <!-- Checks for common coding problems --> - <!-- See http://checkstyle.sf.net/config_coding.html --> - <module name="AvoidInlineConditionals" /> - <module name="EmptyStatement" /> - <module name="EqualsHashCode" /> - <module name="HiddenField" /> - <module name="IllegalInstantiation" /> - <module name="InnerAssignment" /> - <module name="MagicNumber" /> - <module name="MissingSwitchDefault" /> - <module name="SimplifyBooleanExpression" /> - <module name="SimplifyBooleanReturn" /> - - <!-- Checks for class design --> - <!-- See http://checkstyle.sf.net/config_design.html --> - <module name="DesignForExtension" /> - <module name="FinalClass" /> - <module name="HideUtilityClassConstructor" /> - <module name="InterfaceIsType" /> - <module name="VisibilityModifier" /> - - - <!-- Miscellaneous other checks. --> - <!-- See http://checkstyle.sf.net/config_misc.html --> - <module name="ArrayTypeStyle" /> - <module name="FinalParameters" /> - <module name="TodoComment" /> - <module name="UpperEll" /> - - <!-- Adding to Sun convention: --> - <module name="SuppressWarningsHolder" /> - - <!-- Allow protected for UiBinder --> - <module name="VisibilityModifier"> - <property name="protectedAllowed" value="true"/> - </module> - </module> -</module> diff --git a/sido-gwt/config/sun_checks.xml b/sido-gwt/config/sun_checks.xml new file mode 120000 index 00000000..63587434 --- /dev/null +++ b/sido-gwt/config/sun_checks.xml @@ -0,0 +1 @@ +../../config/sun_checks.xml \ No newline at end of file diff --git a/sido-rs/config/sun_checks.xml b/sido-rs/config/sun_checks.xml deleted file mode 100644 index 7b7a63d3..00000000 --- a/sido-rs/config/sun_checks.xml +++ /dev/null @@ -1,202 +0,0 @@ -<?xml version="1.0"?> -<!DOCTYPE module PUBLIC - "-//Checkstyle//DTD Check Configuration 1.3//EN" - "https://checkstyle.org/dtds/configuration_1_3.dtd"> -<!-- This is a checkstyle configuration file derived from Sun coding conventions. - For descriptions of what the following rules do, please see the checkstyle - configuration page at http://checkstyle.sourceforge.net/config.html --> - - -<!-- - - Checkstyle configuration that checks the sun coding conventions from: - - - the Java Language Specification at - http://java.sun.com/docs/books/jls/second_edition/html/index.html - - - the Sun Code Conventions at http://java.sun.com/docs/codeconv/ - - - the Javadoc guidelines at - http://java.sun.com/j2se/javadoc/writingdoccomments/index.html - - - the JDK Api documentation http://java.sun.com/j2se/docs/api/index.html - - - some best practices - - Checkstyle is very configurable. Be sure to read the documentation at - http://checkstyle.sf.net (or in your downloaded distribution). - - Most Checks are configurable, be sure to consult the documentation. - - To completely disable a check, just comment it out or delete it from the file. - - Finally, it is worth reading the documentation. - ---> -<module name="Checker"> - <!-- - If you set the basedir property below, then all reported file - names will be relative to the specified directory. See - http://checkstyle.sourceforge.net/5.x/config.html#Checker - - <property name="basedir" value="${basedir}"/> - --> - - <!-- - --> - <property name="fileExtensions" value="java, xml"/> - - <!-- Checks that a package-info.java file exists for each package. --> - <!-- See http://checkstyle.sf.net/config_javadoc.html#JavadocPackage --> - <module name="JavadocPackage" /> - - <!-- Checks whether files end with a new line. --> - <!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile --> - <module name="NewlineAtEndOfFile" /> - - <!-- Checks that property files contain the same keys. --> - <!-- See http://checkstyle.sf.net/config_misc.html#Translation --> - <module name="Translation" /> - - <!-- Checks for Size Violations. --> - <!-- See http://checkstyle.sf.net/config_sizes.html --> - <module name="FileLength" /> - - <!-- Checks for whitespace --> - <!-- See http://checkstyle.sf.net/config_whitespace.html --> - <module name="FileTabCharacter"> - <property name="fileExtensions" value="java" /> - </module> - - <!-- https://checkstyle.sourceforge.io/config_sizes.html#LineLength --> - <module name="LineLength"> - <property name="ignorePattern" value="^import " /> - <property name="max" value="120" /> - </module> - - <!-- Miscellaneous other checks. --> - <!-- See http://checkstyle.sf.net/config_misc.html --> - <module name="RegexpSingleline"> - <property name="format" value="\s+$" /> - <property name="minimum" value="0" /> - <property name="maximum" value="0" /> - <property name="message" value="Line has trailing spaces." /> - </module> - - <module name="SuppressionFilter"> - <property name="file" - value="${basedir}/config/checkstyle-suppressions.xml" /> - </module> - - <!-- Adding to Sun convention: --> - <module name="SuppressWarningsFilter" /> - <!-- <module name="SuppressionCommentFilter"> <property name="offCommentFormat" - value="CHECKSTYLE.OFF\: ([\w\|]+)" /> <property name="onCommentFormat" value="CHECKSTYLE.ON\: - ([\w\|]+)" /> <property name="checkFormat" value="$1" /> </module> --> - - <!-- Checks for Headers --> - <!-- See http://checkstyle.sf.net/config_header.html --> - <!-- <module name="Header"> --> - <!-- <property name="headerFile" value="${checkstyle.header.file}"/> --> - <!-- <property name="fileExtensions" value="java"/> --> - <!-- </module> --> - <module name="TreeWalker"> - - <!-- Checks for Javadoc comments. --> - <!-- See http://checkstyle.sf.net/config_javadoc.html --> - <module name="JavadocMethod" /> - <module name="JavadocType" /> - <module name="JavadocVariable" /> - <module name="JavadocStyle" /> - - - <!-- Checks for Naming Conventions. --> - <!-- See http://checkstyle.sf.net/config_naming.html --> - <module name="ConstantName" /> - <module name="LocalFinalVariableName" /> - <module name="LocalVariableName" /> - <module name="MemberName" /> - <module name="MethodName" /> - <module name="PackageName" /> - <module name="ParameterName" /> - <module name="StaticVariableName" /> - <module name="TypeName" /> - - - <!-- Checks for imports --> - <!-- See http://checkstyle.sf.net/config_import.html --> - <module name="AvoidStarImport" /> - <module name="IllegalImport" /> <!-- defaults to sun.* packages --> - <module name="RedundantImport" /> - <module name="UnusedImports" /> - - - <!-- Checks for Size Violations. --> - <!-- See http://checkstyle.sf.net/config_sizes.html --> - <module name="MethodLength" /> - <module name="ParameterNumber"> - <property name="max" value="9"/> - </module> - - <!-- Checks for whitespace --> - <!-- See http://checkstyle.sf.net/config_whitespace.html --> - <module name="EmptyForIteratorPad" /> - <module name="GenericWhitespace" /> - <module name="MethodParamPad" /> - <module name="NoWhitespaceAfter" /> - <module name="NoWhitespaceBefore" /> - <module name="OperatorWrap" /> - <module name="ParenPad" /> - <module name="TypecastParenPad" /> - <module name="WhitespaceAfter" /> - <module name="WhitespaceAround" /> - - - <!-- Modifier Checks --> - <!-- See http://checkstyle.sf.net/config_modifiers.html --> - <module name="ModifierOrder" /> - <module name="RedundantModifier" /> - - - <!-- Checks for blocks. You know, those {}'s --> - <!-- See http://checkstyle.sf.net/config_blocks.html --> - <module name="AvoidNestedBlocks" /> - <module name="EmptyBlock" /> - <module name="LeftCurly" /> - <module name="NeedBraces" /> - <module name="RightCurly" /> - - - <!-- Checks for common coding problems --> - <!-- See http://checkstyle.sf.net/config_coding.html --> - <module name="AvoidInlineConditionals" /> - <module name="EmptyStatement" /> - <module name="EqualsHashCode" /> - <module name="HiddenField" /> - <module name="IllegalInstantiation" /> - <module name="InnerAssignment" /> - <module name="MagicNumber" /> - <module name="MissingSwitchDefault" /> - <module name="SimplifyBooleanExpression" /> - <module name="SimplifyBooleanReturn" /> - - <!-- Checks for class design --> - <!-- See http://checkstyle.sf.net/config_design.html --> - <module name="DesignForExtension" /> - <module name="FinalClass" /> - <module name="HideUtilityClassConstructor" /> - <module name="InterfaceIsType" /> - <module name="VisibilityModifier" /> - - - <!-- Miscellaneous other checks. --> - <!-- See http://checkstyle.sf.net/config_misc.html --> - <module name="ArrayTypeStyle" /> - <module name="FinalParameters" /> - <module name="TodoComment" /> - <module name="UpperEll" /> - - <!-- Adding to Sun convention: --> - <module name="SuppressWarningsHolder" /> - </module> -</module> diff --git a/sido-rs/config/sun_checks.xml b/sido-rs/config/sun_checks.xml new file mode 120000 index 00000000..63587434 --- /dev/null +++ b/sido-rs/config/sun_checks.xml @@ -0,0 +1 @@ +../../config/sun_checks.xml \ No newline at end of file diff --git a/verification/config/sun_checks.xml b/verification/config/sun_checks.xml deleted file mode 100644 index 7b7a63d3..00000000 --- a/verification/config/sun_checks.xml +++ /dev/null @@ -1,202 +0,0 @@ -<?xml version="1.0"?> -<!DOCTYPE module PUBLIC - "-//Checkstyle//DTD Check Configuration 1.3//EN" - "https://checkstyle.org/dtds/configuration_1_3.dtd"> -<!-- This is a checkstyle configuration file derived from Sun coding conventions. - For descriptions of what the following rules do, please see the checkstyle - configuration page at http://checkstyle.sourceforge.net/config.html --> - - -<!-- - - Checkstyle configuration that checks the sun coding conventions from: - - - the Java Language Specification at - http://java.sun.com/docs/books/jls/second_edition/html/index.html - - - the Sun Code Conventions at http://java.sun.com/docs/codeconv/ - - - the Javadoc guidelines at - http://java.sun.com/j2se/javadoc/writingdoccomments/index.html - - - the JDK Api documentation http://java.sun.com/j2se/docs/api/index.html - - - some best practices - - Checkstyle is very configurable. Be sure to read the documentation at - http://checkstyle.sf.net (or in your downloaded distribution). - - Most Checks are configurable, be sure to consult the documentation. - - To completely disable a check, just comment it out or delete it from the file. - - Finally, it is worth reading the documentation. - ---> -<module name="Checker"> - <!-- - If you set the basedir property below, then all reported file - names will be relative to the specified directory. See - http://checkstyle.sourceforge.net/5.x/config.html#Checker - - <property name="basedir" value="${basedir}"/> - --> - - <!-- - --> - <property name="fileExtensions" value="java, xml"/> - - <!-- Checks that a package-info.java file exists for each package. --> - <!-- See http://checkstyle.sf.net/config_javadoc.html#JavadocPackage --> - <module name="JavadocPackage" /> - - <!-- Checks whether files end with a new line. --> - <!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile --> - <module name="NewlineAtEndOfFile" /> - - <!-- Checks that property files contain the same keys. --> - <!-- See http://checkstyle.sf.net/config_misc.html#Translation --> - <module name="Translation" /> - - <!-- Checks for Size Violations. --> - <!-- See http://checkstyle.sf.net/config_sizes.html --> - <module name="FileLength" /> - - <!-- Checks for whitespace --> - <!-- See http://checkstyle.sf.net/config_whitespace.html --> - <module name="FileTabCharacter"> - <property name="fileExtensions" value="java" /> - </module> - - <!-- https://checkstyle.sourceforge.io/config_sizes.html#LineLength --> - <module name="LineLength"> - <property name="ignorePattern" value="^import " /> - <property name="max" value="120" /> - </module> - - <!-- Miscellaneous other checks. --> - <!-- See http://checkstyle.sf.net/config_misc.html --> - <module name="RegexpSingleline"> - <property name="format" value="\s+$" /> - <property name="minimum" value="0" /> - <property name="maximum" value="0" /> - <property name="message" value="Line has trailing spaces." /> - </module> - - <module name="SuppressionFilter"> - <property name="file" - value="${basedir}/config/checkstyle-suppressions.xml" /> - </module> - - <!-- Adding to Sun convention: --> - <module name="SuppressWarningsFilter" /> - <!-- <module name="SuppressionCommentFilter"> <property name="offCommentFormat" - value="CHECKSTYLE.OFF\: ([\w\|]+)" /> <property name="onCommentFormat" value="CHECKSTYLE.ON\: - ([\w\|]+)" /> <property name="checkFormat" value="$1" /> </module> --> - - <!-- Checks for Headers --> - <!-- See http://checkstyle.sf.net/config_header.html --> - <!-- <module name="Header"> --> - <!-- <property name="headerFile" value="${checkstyle.header.file}"/> --> - <!-- <property name="fileExtensions" value="java"/> --> - <!-- </module> --> - <module name="TreeWalker"> - - <!-- Checks for Javadoc comments. --> - <!-- See http://checkstyle.sf.net/config_javadoc.html --> - <module name="JavadocMethod" /> - <module name="JavadocType" /> - <module name="JavadocVariable" /> - <module name="JavadocStyle" /> - - - <!-- Checks for Naming Conventions. --> - <!-- See http://checkstyle.sf.net/config_naming.html --> - <module name="ConstantName" /> - <module name="LocalFinalVariableName" /> - <module name="LocalVariableName" /> - <module name="MemberName" /> - <module name="MethodName" /> - <module name="PackageName" /> - <module name="ParameterName" /> - <module name="StaticVariableName" /> - <module name="TypeName" /> - - - <!-- Checks for imports --> - <!-- See http://checkstyle.sf.net/config_import.html --> - <module name="AvoidStarImport" /> - <module name="IllegalImport" /> <!-- defaults to sun.* packages --> - <module name="RedundantImport" /> - <module name="UnusedImports" /> - - - <!-- Checks for Size Violations. --> - <!-- See http://checkstyle.sf.net/config_sizes.html --> - <module name="MethodLength" /> - <module name="ParameterNumber"> - <property name="max" value="9"/> - </module> - - <!-- Checks for whitespace --> - <!-- See http://checkstyle.sf.net/config_whitespace.html --> - <module name="EmptyForIteratorPad" /> - <module name="GenericWhitespace" /> - <module name="MethodParamPad" /> - <module name="NoWhitespaceAfter" /> - <module name="NoWhitespaceBefore" /> - <module name="OperatorWrap" /> - <module name="ParenPad" /> - <module name="TypecastParenPad" /> - <module name="WhitespaceAfter" /> - <module name="WhitespaceAround" /> - - - <!-- Modifier Checks --> - <!-- See http://checkstyle.sf.net/config_modifiers.html --> - <module name="ModifierOrder" /> - <module name="RedundantModifier" /> - - - <!-- Checks for blocks. You know, those {}'s --> - <!-- See http://checkstyle.sf.net/config_blocks.html --> - <module name="AvoidNestedBlocks" /> - <module name="EmptyBlock" /> - <module name="LeftCurly" /> - <module name="NeedBraces" /> - <module name="RightCurly" /> - - - <!-- Checks for common coding problems --> - <!-- See http://checkstyle.sf.net/config_coding.html --> - <module name="AvoidInlineConditionals" /> - <module name="EmptyStatement" /> - <module name="EqualsHashCode" /> - <module name="HiddenField" /> - <module name="IllegalInstantiation" /> - <module name="InnerAssignment" /> - <module name="MagicNumber" /> - <module name="MissingSwitchDefault" /> - <module name="SimplifyBooleanExpression" /> - <module name="SimplifyBooleanReturn" /> - - <!-- Checks for class design --> - <!-- See http://checkstyle.sf.net/config_design.html --> - <module name="DesignForExtension" /> - <module name="FinalClass" /> - <module name="HideUtilityClassConstructor" /> - <module name="InterfaceIsType" /> - <module name="VisibilityModifier" /> - - - <!-- Miscellaneous other checks. --> - <!-- See http://checkstyle.sf.net/config_misc.html --> - <module name="ArrayTypeStyle" /> - <module name="FinalParameters" /> - <module name="TodoComment" /> - <module name="UpperEll" /> - - <!-- Adding to Sun convention: --> - <module name="SuppressWarningsHolder" /> - </module> -</module> diff --git a/verification/config/sun_checks.xml b/verification/config/sun_checks.xml new file mode 120000 index 00000000..63587434 --- /dev/null +++ b/verification/config/sun_checks.xml @@ -0,0 +1 @@ +../../config/sun_checks.xml \ No newline at end of file -- GitLab From d13c1ba5ec4b8021677a9a1408a72f6865a4fe3b Mon Sep 17 00:00:00 2001 From: Olivier Maury <Olivier.Maury@inrae.fr> Date: Wed, 8 Jan 2025 09:49:09 +0100 Subject: [PATCH 18/19] Ne pas lancer mvn site --- .gitlab-ci.yml | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 74eddc00..6bec8911 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -112,25 +112,3 @@ cobertura_job: $CI_PROJECT_DIR/sido-rs/src/main/java/ $CI_PROJECT_DIR/verification/src/main/java/ > target/cobertura.xml -# https://agroclim.pages.mia.inra.fr/Indicators/season -pages: - stage: deploy - extends: .settingsxml - needs: ["checkstyle_job", "pmd_job", "cpd_job"] - script: - - mvn $MAVEN_CLI_OPTS site -DskipTests - - rm -fr target/site/sido-cli target/site/sido-createSchemaTable target/site/sido-eml - - rm -fr target/site/sido-gwt target/site/sido-rs target/site/verification - - mv sido-cli/target/site/ target/site/sido-cli - - mv sido-createSchemaTable/target/site/ target/site/sido-createSchemaTable - - mv sido-eml/target/site/ target/site/sido-eml - - mv sido-gwt/target/site/ target/site/sido-gwt - - mv sido-rs/target/site/ target/site/sido-rs - - mv verification/target/site/ target/site/verification - artifacts: - expire_in: 1 week - when: always - paths: - - target - - "*/target" - publish: target/site -- GitLab From 1d3c103ae00f8d291b52acdd652f41b20c8ceaa0 Mon Sep 17 00:00:00 2001 From: Olivier Maury <Olivier.Maury@inrae.fr> Date: Wed, 8 Jan 2025 09:57:09 +0100 Subject: [PATCH 19/19] Simplification des jobs --- .gitlab-ci.yml | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6bec8911..5311decc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -21,6 +21,7 @@ stages: before_script: - echo "Maven settings.xml" - echo "$M2_SETTINGS_XML" > $CI_PROJECT_DIR/ci_settings.xml + dependencies_job: stage: build extends: .settingsxml @@ -35,13 +36,17 @@ build_job: script: - echo "Maven compile started" - mvn $MAVEN_CLI_OPTS clean compile test-compile + - echo "Maven packaging started" + - mvn $MAVEN_CLI_OPTS install -Dcheckstyle.skip=true -Dcpd.skip=true -Dpmd.skip=true -DskipTests - /usr/bin/tokei --version artifacts: expire_in: 1 week when: always paths: + - .m2/repository - target - "*/target" + test_job: stage: test extends: .settingsxml @@ -61,38 +66,27 @@ test_job: - "*/target/surefire-reports/TEST-*.xml" - "*/target/failsafe-reports/TEST-*.xml" -install_job: - stage: install - extends: .settingsxml - needs: ["test_job"] - script: - - echo "Maven packaging started" - - mvn $MAVEN_CLI_OPTS install -Dcheckstyle.skip=true -Dcpd.skip=true -Dpmd.skip=true -DskipTests - artifacts: - expire_in: 1 week - when: always - paths: - - .m2/repository - - target - - "*/target" checkstyle_job: stage: code-check extends: .settingsxml - needs: ["install_job"] + needs: ["test_job"] script: - mvn $MAVEN_CLI_OPTS checkstyle:checkstyle + pmd_job: stage: code-check extends: .settingsxml - needs: ["install_job"] + needs: ["test_job"] script: - mvn $MAVEN_CLI_OPTS pmd:pmd + cpd_job: stage: code-check extends: .settingsxml - needs: ["install_job"] + needs: ["test_job"] script: - mvn $MAVEN_CLI_OPTS pmd:cpd + cobertura_job: stage: deploy needs: ["test_job"] -- GitLab