diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..058c7850f04ffcd445947ba9b499a28a46f7529c --- /dev/null +++ b/.gitignore @@ -0,0 +1,10 @@ +.checkstyle +.classpath +.factorypath +logs +.pmd +.pmdruleset.xml +pom.xml.versionsBackup +.project +.settings +target \ No newline at end of file diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..5311deccb772d60ae2b3e913dd774c9bbc0cef48 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,108 @@ +# 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 + - 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 + 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" + +checkstyle_job: + stage: code-check + extends: .settingsxml + needs: ["test_job"] + script: + - mvn $MAVEN_CLI_OPTS checkstyle:checkstyle + +pmd_job: + stage: code-check + extends: .settingsxml + needs: ["test_job"] + script: + - mvn $MAVEN_CLI_OPTS pmd:pmd + +cpd_job: + stage: code-check + extends: .settingsxml + needs: ["test_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 diff --git a/DEV_FR.md b/DEV_FR.md index b13366d398d6efb0f26358e5647e0ac30a88619d..33bcfbd0ec0fa2b3b88a4ac0e6e0e6e6b83b7186 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/README.md b/README.md index a3496b104a2bd18168a272ec5b8bc6285742bc12..8a417178a5f8bfe06173ef2b0094e35aca9a06ea 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 8737bc272f9830cf8cda229cfa2f4f1117e749a9..6a75a4c134f359a149a26632892d646e25e9ebba 100644 --- a/codemeta.json +++ b/codemeta.json @@ -1,328 +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", - "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://w3.avignon.inra.fr/svn/sioo/sido", - "contIntegration": "http://agroclimvm45:8080/job/sido/", - "description": "SIDO is a phenological data submission and verification tool.", - "identifier": "fr.soeretempo.sido", - "issueTracker": "https://w3.avignon.inrae.fr/forge/projects/sioo", - "license": "https://www.gnu.org/licenses/gpl-3.0.txt", - "name": "SIDO", - "producer": { - "@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/" - } - }, - "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.git", + "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" +} diff --git a/config/cpd-suppressions.properties b/config/cpd-suppressions.properties index e984f5741fadd9d5dedd98d87b5fdbd232b51456..47f5b1264a32f38611ebd0769159399185202196 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/config/sun_checks.xml b/config/sun_checks.xml index b7e3b1dd3f238140fa2250382e8e1c9159ea8b88..7b7a63d35283292efe876013643b815abdf659f4 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/pom.xml b/pom.xml index 55f5fe96ce68d3774c6a45451f1ca9d77f21ebce..2b1046f2f811d5ca1815992f3421a4bc5fb2c270 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> @@ -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> @@ -142,9 +143,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 +164,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> @@ -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> @@ -278,7 +275,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 +285,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 +350,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 +386,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 +413,28 @@ </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 --> + <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> <plugin> - <artifactId>maven-deploy-plugin</artifactId> - <version>2.8.2</version> + <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> + </plugins> + </pluginManagement> </build> <reporting> @@ -497,8 +506,8 @@ </reportSet> </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 f9a90006473ddbf2f5dc70e988c57a1ff582d81b..006df4cfd14c28de4088584d4194afab569e49de 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/config/sun_checks.xml b/sido-cli/config/sun_checks.xml deleted file mode 100644 index 7b7a63d35283292efe876013643b815abdf659f4..0000000000000000000000000000000000000000 --- 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 0000000000000000000000000000000000000000..63587434cca65d7b02081aca08fc81f82d0446a8 --- /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-cli/src/test/java/fr/soeretempo/sido/cli/MainSidoVerifXLSXTest.java b/sido-cli/src/test/java/fr/soeretempo/sido/cli/MainSidoVerifXLSXTest.java index 51c896529303ccfc956e0d69539802aecaac656b..30ab3e7ea347d285ae7766fa0de65133400e6007 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; @@ -58,7 +59,9 @@ public class MainSidoVerifXLSXTest { @Test public void verifXLSXFileTest() throws JAXBException, 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) { @@ -116,8 +119,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; } } diff --git a/sido-cli/src/test/resources/log4j2.xml b/sido-cli/src/test/resources/log4j2.xml index 68517310faef9a3847e32759da103b6e80e5764a..e720858de6bc83ee375efa702b59bacd21cc808b 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-createSchemaTable/config/sun_checks.xml b/sido-createSchemaTable/config/sun_checks.xml deleted file mode 100644 index 7b7a63d35283292efe876013643b815abdf659f4..0000000000000000000000000000000000000000 --- 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 0000000000000000000000000000000000000000..63587434cca65d7b02081aca08fc81f82d0446a8 --- /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 fe3f27ce6bece57ee1b5042002bed0f54b264bba..0000000000000000000000000000000000000000 --- 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 0000000000000000000000000000000000000000..63587434cca65d7b02081aca08fc81f82d0446a8 --- /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/.gitignore b/sido-gwt/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..4c47ac003ccec0b60a43735dbbbacfc0227cdb5c --- /dev/null +++ b/sido-gwt/.gitignore @@ -0,0 +1 @@ +test_eml.xml \ No newline at end of file diff --git a/sido-gwt/config/cpd-suppressions.properties b/sido-gwt/config/cpd-suppressions.properties index abc97ae4a1b673c51d1942ef583116981cf4d700..2b0e2cd1a560344c635f9fb000b632586ea3e11a 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/config/sun_checks.xml b/sido-gwt/config/sun_checks.xml deleted file mode 100644 index fe3f27ce6bece57ee1b5042002bed0f54b264bba..0000000000000000000000000000000000000000 --- 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 0000000000000000000000000000000000000000..63587434cca65d7b02081aca08fc81f82d0446a8 --- /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-gwt/src/main/config/dev-om/log4j2.xml b/sido-gwt/src/main/config/dev-om/log4j2.xml index 1b17a41abb2f1b70c2bd59c83ba8ba5081737cdd..4588c07437b23168363060059db1824bc753cc9f 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 f4a9b44f96ab863e319d9161b7b72ea551078095..0038fd32b7e35db421bf263a908637d638fe5236 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 dbc039013962ee53089229baaf8f7af62ad0aef7..a17a0922cd4ea9d7b83053523da4aa7573a2b610 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/META-INF/persistence.xml b/sido-gwt/src/main/config/production/META-INF/persistence.xml index f26cae9fc6291252a82e6173d237d70f5c552ade..52a47e0918178339186e79fc75337ce90250e4a7 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/config/production/log4j2.xml b/sido-gwt/src/main/config/production/log4j2.xml index dbb9b3cd7d65d1c2736e8fe305390dd65a8d06f6..4ea5220d161783d9a15ff3edf1f414cc9bc95907 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 58fde3708f3060311a8809878b616f77e03b23c3..fdabdcd71571d26497c1cd6bd59e0d13b2fd2f08 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 5e95ea1ece936e5766c36ab289dd486b7ee8a5b3..f64d3f13d12cbc6522cd34d1cb3ddeecb7baa026 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 4fb3df22b7f111a49f32a31a8652ebc1e9c06d03..330c5020a8c488358feda0903110ecf13bc48b04 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 d64ee8a66c30870a42158feadc7920fbf9ddb677..118b72e234e6fad823e92c822deb6234551cfb2b 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 815d713f9cb3a4d60b3df9627c2e9de2559f9a37..654cd9ee2aef11fa6243413e192f78f2b7d70e2c 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 b3b5a6f9a10ecd05b7510c3966333c6af63e3b21..76e495a8581694431d2d7c52d5f4c704260a72f8 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 04ace3e8bc98742242357a6341aced1320a0a6d8..d973da0f87c6f6f82f0dd6a96b4090dd5f5ed24f 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 f4ae4001fbfa9f9310580ba0595cd50eb458ce40..c34dfcbb5cb28c38f0e330a6417d358d951073cb 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 a606eb4546746f8cf1c7441530b3b6ec6014d6ee..7273bcc7ddd9cc61118bf623ba2a986bf23cd1de 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 5024ce145748e7f2db7c736a89c46181d8a933a8..1dae6c062ef8ad22ff143c9e5604c17c324443dd 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 4b4840a19b25d75b0f3294ac051464f98b7d8764..5c5b242b99ff5ca9c1d4f32d927807aa05268c24 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 8d829b9b3c5fc793e0483173508948e13a09af4b..e23f6cb83e4438d961daebf2c4d0c38e567c09ec 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/scheduled/UserAnonymizer.java b/sido-gwt/src/main/java/fr/soeretempo/sido/gwt/server/scheduled/UserAnonymizer.java index 78352a712f6a47a107f0607896e60961921be85d..734e4ac00d9ac466f6fa939c835e47e48d4fdd65 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/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 25fd3bb79101354c81879164290c1d3e4e0233c9..82bcdf40036b3f1f73918e16e12f4521f332b91c 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 6baeed7a06e9808c7bf599cba0a9a84eb5c34b9c..72a0fcbb3199826994ff999db7dbd1bee4626fe6 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 086936eeb07eb5ca1aa282aeb211da44189503e6..236c2a81e7c3b442a42c483f671abed247ec5f8e 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 17fe94d70e50541117939ce784f34c61e92f0b37..ef3e60b9f981db10c09b6b7cb24fa381e1245967 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 2d39ae9217351b6ef3c19a450309e344988261b0..92bfff5fc26023eeff556b1f2a63a0fefe5310bb 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 363a064802d308a6c1bfc8dd1843f852b105d8fe..f66db7c3dd213f1bd3572efe178f80efd844732c 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 40d6f1f417d1b1b058074aefa04ca65c55e4c9de..825e91c39b6a505b869ba5f2ebd337a86ecb26c7 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 68e7cfdd385f33157365e6e274fca817beb72fc6..5be7277a2c9f1d2244be511016dfe4ea00e64113 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 ee731aafe9051336910ab9abe004c7fbc277bcee..73619af3687156e566903223dfb120be42ac59c0 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 5a9a6fe05d3d4342872b262e0548adc577361c38..48a5f0bf1c9d4fc6d75cb3aca859168e2dcdad48 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 af78c6b0b97265ec6e6cc679655f08319797511a..5981d40724dbb0c250202d6299f7f7a8a607b430 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/SIDO-administration-fr.md b/sido-gwt/src/main/resources/fr/soeretempo/sido/gwt/server/SIDO-administration-fr.md index 3e1f5f19140fe904d5e09a889a019c8e693494a8..0c7130fec49bdb44a89dc55192ec747423152c4d 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/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 fe5db66ae2fcf83fa02099544022dd1874022d66..30f3a39ef28db74ddf3f68bf7cea5c8773a6ed6d 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 fa20af38f64b52d0b769f45478f5ee33a5ba3603..13bd1c70c8a1fb6aefa82b54bc22244f99428301 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 c7097bda9d710d129981a467ab0fbc5e83fc67fd..ca66694434e59a7b130f784efacd896242bee33f 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 d95d2b313acc931753c23b59b85de2ff6d528f3b..eb4f3a627f63298f9b6d6e8f1883da905a0cc382 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 097ddb480a5bfae16980765141dc352055ee4437..a4ba9a24f4757097041dd36cae5be89a18e590e2 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 a3f8df4febeb6cdb86c857742510c244a2f54731..979138624a344389761de870402e701e315ae768 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 b039d9816d5ad972d16ee427f10cd1a96c438218..2dea55ef681f2fb896109150b4a7070455ff11b9 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 1f7b416f4b48a1d1c066d18e2b882ca998b2e1c4..54fe12d814dafa0b018ebbef86bba9591825a0f2 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 021abe90e36c49ca206a6f275092101bfbaa6cee..c6cb5b722116529369d371ce6b89b7c0c4c3b979 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 54fe40247c984d5687e232c26c82b43196c4ba71..3aeca1fd16c5627f49a6ce590d78935db0acffde 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/config/sun_checks.xml b/sido-rs/config/sun_checks.xml deleted file mode 100644 index 7b7a63d35283292efe876013643b815abdf659f4..0000000000000000000000000000000000000000 --- 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 0000000000000000000000000000000000000000..63587434cca65d7b02081aca08fc81f82d0446a8 --- /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/sido-rs/src/main/java/fr/soeretempo/sido/rs/GrantType.java b/sido-rs/src/main/java/fr/soeretempo/sido/rs/GrantType.java index 725a095862d793f76f06198fd4d8b7caec042e9a..0661162e98e57705e1507252232f7b8b975897be 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 a68257be174e27facf9d48e7e50d7ce4b160398d..202ff47b4efd65ae12e3eabe07dbc70f5ec2476c 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 20f5d4410bb503e8be0147b28e09be305f0517b4..89eea4a04e02826c7c7554665e64817eac35d3ca 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 5ed6af491a160a85a21b05c3a8623974497acb8e..4aad3545c589b2d8983cb20e47d4e1aea8947b28 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 fd7f8b8f40584629831b9f74053aa134b66f6776..044785e4308e774372ffb1d3ec722d0893e2a792 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 bc244769ec239f4feca17fa23cdcbd1338deb794..40232ec0a22a797b5778e85da53dc145be557c52 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 9dc8ab160b00ef3eb43f42c60b266ea89a136cf9..8fabb431fc377b88e06abcdf82333c3a85f3c8f1 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 aa0866a858704c60702bb20a05a56ef95de32d8f..82f42897830dcce3208da060e163f15d117dc44b 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 1d6b0a0b7ac1fb695d64190f6fabea92e7738566..054f7ede90f2b778ae4a4ec709c410100541155f 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/config/sun_checks.xml b/verification/config/sun_checks.xml deleted file mode 100644 index 7b7a63d35283292efe876013643b815abdf659f4..0000000000000000000000000000000000000000 --- 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 0000000000000000000000000000000000000000..63587434cca65d7b02081aca08fc81f82d0446a8 --- /dev/null +++ b/verification/config/sun_checks.xml @@ -0,0 +1 @@ +../../config/sun_checks.xml \ No newline at end of file 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 fae4248f7394cb6e983fde25fee1c5391874f8f1..7c4b4bff29a65f03bb5fcb22002a7caec41ef0cb 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/main/java/fr/soeretempo/sido/verification/resources/Resources.java b/verification/src/main/java/fr/soeretempo/sido/verification/resources/Resources.java index de165c3c5eb1730ca3a7a81413b6a02ab77ed51a..66d5ae5168ec317b13a249b5531d7c9d5aacd159 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/main/resources/fr/soeretempo/sido/verification/resources/messages_fr.properties b/verification/src/main/resources/fr/soeretempo/sido/verification/resources/messages_fr.properties index 625e19b726dbb4b14661e9bddbc87a4957557d65..293ac55e990e8e0921bd8475761f5f9ab922bc13 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/OutilsVerifEXCELModelTest.java b/verification/src/test/java/fr/soeretempo/sido/verification/OutilsVerifEXCELModelTest.java index 022292bc3406355e9c9140491ca1c0149e3e9426..815ea9c8860a9d3cb4683dad2558bbdf20a15579 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 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 3c1c943c29f827ca5c1b3b1dfce1046a2a3baf09..d9c0a55fdc9921dcdaabb24d6fb39b8510175073 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/java/fr/soeretempo/sido/verification/resources/I18nTest.java b/verification/src/test/java/fr/soeretempo/sido/verification/resources/I18nTest.java index 3522568c84babbe7a524a448a312435c0b56d613..bcd8ce72ddd025ec2eb24b2425161d292dbcc55c 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); } /** 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 19ffd76c5afcf640b5bebba7c31bacd39e70669e..5e4ea7fe037f3d24a7bac44a6271f5cae216b654 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 { @@ -58,6 +55,30 @@ public class ResourcesTest { assertEquals(expected, actual); } + /** + * Ensure format number is well done. + */ + @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."; + } + assertEquals("Failure with Java version=" + javaVersion, expected, actual); + } + @Test public void formatMissing() { Resources res = new Resources(NAME, Locale.FRENCH); diff --git a/verification/src/test/java/lombok.config b/verification/src/test/java/lombok.config new file mode 100644 index 0000000000000000000000000000000000000000..b15c29c6a5263e47a3053dbe797e65ad6bef02bd --- /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 diff --git a/verification/src/test/resources/log4j2.xml b/verification/src/test/resources/log4j2.xml index e1e4d38f1f25aa8a5b739f788d17a36a82e9860e..cdf9727c9e876d9467640261200ab5fd558611d8 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"> @@ -32,7 +29,7 @@ </Console> </Appenders> <Loggers> - <Root level="trace"> + <Root level="info"> <AppenderRef ref="console" /> </Root> <Logger name="org.apache" level="warn" />