From d1e489688df0da9d0f5357ab9c2aab1943f327e2 Mon Sep 17 00:00:00 2001 From: Eric Degenetais Date: Tue, 5 Mar 2024 10:36:10 +0100 Subject: [PATCH 1/8] Auto-check headers from the toplevel. --- pom.xml | 30 ++++++++++++++++++++++++++++++ psc-toggle-manager/pom.xml | 31 +------------------------------ 2 files changed, 31 insertions(+), 30 deletions(-) diff --git a/pom.xml b/pom.xml index 2c23138..2a19a6d 100644 --- a/pom.xml +++ b/pom.xml @@ -38,6 +38,36 @@ org.springframework.boot spring-boot-maven-plugin + + + com.mycila + license-maven-plugin + 2.11 + +
com/mycila/maven/plugin/license/templates/APACHE-2.txt
+ + Agence du Numérique en Santé (ANS) + https://esante.gouv.fr + + + mvnw.cmd + .mvn/** + LICENSE.txt + src/test/resources/** + settings-docker.xml + +
+ + + license-check + + check + + validate + + +
+ diff --git a/psc-toggle-manager/pom.xml b/psc-toggle-manager/pom.xml index 8a03b37..2c6aa49 100644 --- a/psc-toggle-manager/pom.xml +++ b/psc-toggle-manager/pom.xml @@ -29,7 +29,7 @@ 0.0.2-SNAPSHOT psc-toggle-manager Component for toggling PsRef (link from one Ps nationalId to another one) - + 11 11 @@ -98,34 +98,6 @@ org.springframework.boot spring-boot-maven-plugin - - - com.mycila - license-maven-plugin - 2.11 - -
com/mycila/maven/plugin/license/templates/APACHE-2.txt
- - Agence du Numérique en Santé (ANS) - https://esante.gouv.fr - - - LICENSE.txt - Dockerfile - **/README - src/main/packaging/** - src/test/resources/** - src/main/resources/** - src/main/webapp/** - node_modules/** - dist/** - .tmp/** - settings-docker.xml - **/*.properties - -
-
- org.jacoco jacoco-maven-plugin @@ -150,7 +122,6 @@ maven-surefire-plugin false - true once From 3ede12d0b01c59fce3d367cfdbc71b8bb7b3598a Mon Sep 17 00:00:00 2001 From: Eric Degenetais Date: Tue, 5 Mar 2024 10:36:48 +0100 Subject: [PATCH 2/8] Apply headers to relevant top-level files. --- Dockerfile | 16 ++++++++++++++++ pom.xml | 17 +++++++++++++++++ .../src/main/resources/application.properties | 16 ++++++++++++++++ .../src/main/resources/logback-spring.xml | 17 +++++++++++++++++ 4 files changed, 66 insertions(+) diff --git a/Dockerfile b/Dockerfile index 355cc1d..308f306 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,19 @@ +# +# Copyright (C) ${project.inceptionYear} Agence du Numérique en Santé (ANS) (https://esante.gouv.fr) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + FROM maven:3-jdk-11 AS build COPY settings-docker.xml /usr/share/maven/ref/ COPY pom.xml /usr/src/app/pom.xml diff --git a/pom.xml b/pom.xml index 2a19a6d..23a502c 100644 --- a/pom.xml +++ b/pom.xml @@ -1,4 +1,21 @@ + 4.0.0 pom diff --git a/psc-toggle-manager/src/main/resources/application.properties b/psc-toggle-manager/src/main/resources/application.properties index 2ac8450..3e1c1d4 100644 --- a/psc-toggle-manager/src/main/resources/application.properties +++ b/psc-toggle-manager/src/main/resources/application.properties @@ -1,3 +1,19 @@ +# +# Copyright (C) ${project.inceptionYear} Agence du Numérique en Santé (ANS) (https://esante.gouv.fr) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + server.servlet.context-path=v1 api.base.url=http://localhost:9000/api diff --git a/psc-toggle-manager/src/main/resources/logback-spring.xml b/psc-toggle-manager/src/main/resources/logback-spring.xml index 0368156..48616d2 100644 --- a/psc-toggle-manager/src/main/resources/logback-spring.xml +++ b/psc-toggle-manager/src/main/resources/logback-spring.xml @@ -1,4 +1,21 @@ + From 1f723864c60b93c79ed9000a20deb067dbc99b0d Mon Sep 17 00:00:00 2001 From: Eric Degenetais Date: Tue, 5 Mar 2024 10:40:22 +0100 Subject: [PATCH 3/8] Test application properties also support copyright headers. --- pom.xml | 1 - .../test/resources/application-test.properties | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 23a502c..513e61c 100644 --- a/pom.xml +++ b/pom.xml @@ -70,7 +70,6 @@ mvnw.cmd .mvn/** LICENSE.txt - src/test/resources/** settings-docker.xml diff --git a/psc-toggle-manager/src/test/resources/application-test.properties b/psc-toggle-manager/src/test/resources/application-test.properties index 3d57565..c6f23e4 100644 --- a/psc-toggle-manager/src/test/resources/application-test.properties +++ b/psc-toggle-manager/src/test/resources/application-test.properties @@ -1,3 +1,19 @@ +# +# Copyright (C) ${project.inceptionYear} Agence du Numérique en Santé (ANS) (https://esante.gouv.fr) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + server.servlet.context-path=/v1 api.base.url=http://localhost:9000/api From 571b0bd3c09feda317b250a6f3e081f865782944 Mon Sep 17 00:00:00 2001 From: Eric Degenetais Date: Tue, 5 Mar 2024 10:51:11 +0100 Subject: [PATCH 4/8] Waypoint hcl supports copyright headers. --- pom.xml | 3 +++ waypoint.hcl | 15 +++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/pom.xml b/pom.xml index 513e61c..906cbd0 100644 --- a/pom.xml +++ b/pom.xml @@ -72,6 +72,9 @@ LICENSE.txt settings-docker.xml + + SLASHSTAR_STYLE + diff --git a/waypoint.hcl b/waypoint.hcl index 80ccfe3..5193028 100644 --- a/waypoint.hcl +++ b/waypoint.hcl @@ -1,3 +1,18 @@ +/* + * Copyright (C) ${project.inceptionYear} Agence du Numérique en Santé (ANS) (https://esante.gouv.fr) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ project = "prosanteconnect/${workspace.name}/psc-toggle-manager" # Labels can be specified for organizational purposes. From dbb205ec45d12571052662474e5a28f3d0747dd2 Mon Sep 17 00:00:00 2001 From: Eric Degenetais Date: Tue, 5 Mar 2024 10:52:36 +0100 Subject: [PATCH 5/8] Reduce noise by excluding some files. --- pom.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/pom.xml b/pom.xml index 906cbd0..3e6548a 100644 --- a/pom.xml +++ b/pom.xml @@ -67,6 +67,7 @@ https://esante.gouv.fr
+ mvnw mvnw.cmd .mvn/** LICENSE.txt From d539383da5036ecb1c17c6103cd31dc86df95033 Mon Sep 17 00:00:00 2001 From: Eric Degenetais Date: Tue, 5 Mar 2024 10:57:11 +0100 Subject: [PATCH 6/8] HEAders in nomad templates --- pom.xml | 1 + psc-toggle-manager.nomad.tpl | 15 +++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/pom.xml b/pom.xml index 3e6548a..f283bee 100644 --- a/pom.xml +++ b/pom.xml @@ -75,6 +75,7 @@ SLASHSTAR_STYLE + SLASHSTAR_STYLE diff --git a/psc-toggle-manager.nomad.tpl b/psc-toggle-manager.nomad.tpl index 31865d5..9314137 100644 --- a/psc-toggle-manager.nomad.tpl +++ b/psc-toggle-manager.nomad.tpl @@ -1,3 +1,18 @@ +/* + * Copyright (C) ${project.inceptionYear} Agence du Numérique en Santé (ANS) (https://esante.gouv.fr) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ job "psc-toggle-manager" { datacenters = ["${datacenter}"] type = "service" From ea6f360a9f2e24e397f2007e2b27596f03f2c2fa Mon Sep 17 00:00:00 2001 From: Eric Degenetais Date: Tue, 5 Mar 2024 10:57:27 +0100 Subject: [PATCH 7/8] HEAders in git attributes --- .gitattributes | 16 ++++++++++++++++ pom.xml | 1 + 2 files changed, 17 insertions(+) diff --git a/.gitattributes b/.gitattributes index 300e944..bf8ddeb 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1,17 @@ +# +# Copyright (C) ${project.inceptionYear} Agence du Numérique en Santé (ANS) (https://esante.gouv.fr) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + mvnw diff --git a/pom.xml b/pom.xml index f283bee..c4a0a9f 100644 --- a/pom.xml +++ b/pom.xml @@ -74,6 +74,7 @@ settings-docker.xml + SCRIPT_STYLE SLASHSTAR_STYLE SLASHSTAR_STYLE From b0691121f52930d0f6248a5818d841886c09f1a1 Mon Sep 17 00:00:00 2001 From: Eric Degenetais Date: Tue, 5 Mar 2024 10:57:49 +0100 Subject: [PATCH 8/8] No headers in csv files --- pom.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/pom.xml b/pom.xml index c4a0a9f..b8a5f08 100644 --- a/pom.xml +++ b/pom.xml @@ -67,6 +67,7 @@ https://esante.gouv.fr + **/*.csv mvnw mvnw.cmd .mvn/**