From 834730825bb50d6a5ec1750ab90eb1bb6bf95ce8 Mon Sep 17 00:00:00 2001 From: Omar Ismail Date: Thu, 12 May 2022 19:52:43 +0000 Subject: [PATCH] use license header plugin Change-Id: If37bd3761167e9817720ce6e53180879951c2e02 --- Dockerfile | 2 + build.sh | 2 + docker/hapi-proxy-compose.yaml | 22 +- docker/keycloak/Dockerfile | 23 +- docker/keycloak/config-compose.yaml | 22 +- docker/keycloak/keycloak_setup.sh | 24 +- e2e-test/clients.py | 2 + e2e-test/e2e.py | 2 + e2e-test/e2e.sh | 2 + kokoro/gcp_ubuntu/kokoro_build.sh | 2 + license-header.txt | 28 +- plugins/pom.xml | 17 + pom.xml | 56 +- server/pom.xml | 17 + .../google/fhir/proxy/GenericFhirClient.java | 2 +- .../resources/intellij-java-google-style.xml | 598 ------------------ server/src/main/resources/logback.xml | 17 + server/src/main/webapp/WEB-INF/web.xml | 17 + .../fhir/proxy/GenericFhirClientTest.java | 2 +- 19 files changed, 192 insertions(+), 665 deletions(-) delete mode 100644 server/src/main/resources/intellij-java-google-style.xml diff --git a/Dockerfile b/Dockerfile index a434532e..12f469c0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,4 @@ +# # Copyright 2021-2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -11,6 +12,7 @@ # 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. +# # This image is for the FHIR proxy with configuration knobs as environment vars. diff --git a/build.sh b/build.sh index 495be112..1cc6cb36 100755 --- a/build.sh +++ b/build.sh @@ -1,4 +1,5 @@ #!/bin/bash +# # Copyright 2021-2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -12,6 +13,7 @@ # 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. +# # Fail on any error. set -e diff --git a/docker/hapi-proxy-compose.yaml b/docker/hapi-proxy-compose.yaml index c8bb99e2..30bf74f8 100644 --- a/docker/hapi-proxy-compose.yaml +++ b/docker/hapi-proxy-compose.yaml @@ -1,16 +1,18 @@ -# Copyright 2021-2022 Google LLC # -# 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 +# Copyright 2021-2022 Google LLC # -# http://www.apache.org/licenses/LICENSE-2.0 +# 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. # -# 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. # This is for easy creation and setup of a FHIR Proxy and HAPI FHIR Server diff --git a/docker/keycloak/Dockerfile b/docker/keycloak/Dockerfile index bedcfd03..bfaf6041 100644 --- a/docker/keycloak/Dockerfile +++ b/docker/keycloak/Dockerfile @@ -1,16 +1,19 @@ -# Copyright 2021-2022 Google LLC # -# 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 +# Copyright 2021-2022 Google LLC # -# http://www.apache.org/licenses/LICENSE-2.0 +# 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 # -# 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. +# 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. +# + # This is to craete a docker wrapper around an example configuration script. diff --git a/docker/keycloak/config-compose.yaml b/docker/keycloak/config-compose.yaml index 2ed5d3f4..3238c7ce 100644 --- a/docker/keycloak/config-compose.yaml +++ b/docker/keycloak/config-compose.yaml @@ -1,16 +1,18 @@ -# Copyright 2021-2022 Google LLC # -# 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 +# Copyright 2021-2022 Google LLC # -# http://www.apache.org/licenses/LICENSE-2.0 +# 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. # -# 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. # This is for easy creation and setup of a test Keycloak instance that can # support both a list based access control and a single-patient based diff --git a/docker/keycloak/keycloak_setup.sh b/docker/keycloak/keycloak_setup.sh index e8e6cbad..e444149d 100755 --- a/docker/keycloak/keycloak_setup.sh +++ b/docker/keycloak/keycloak_setup.sh @@ -1,18 +1,20 @@ #!/bin/bash - -# Copyright 2021-2022 Google LLC # -# 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 +# Copyright 2021-2022 Google LLC +# +# 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 +# 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. +# 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. +# + # This is for setting up a test Keycloak server. It is intended to be run as diff --git a/e2e-test/clients.py b/e2e-test/clients.py index 963e372d..217f543f 100644 --- a/e2e-test/clients.py +++ b/e2e-test/clients.py @@ -1,3 +1,4 @@ +# # Copyright 2021-2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -11,6 +12,7 @@ # 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. +# """Clients to make calls to FHIR Proxy, HAPI Server, and AuthZ Server.""" diff --git a/e2e-test/e2e.py b/e2e-test/e2e.py index 515a532f..f9fa9292 100644 --- a/e2e-test/e2e.py +++ b/e2e-test/e2e.py @@ -1,3 +1,4 @@ +# # Copyright 2021-2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -11,6 +12,7 @@ # 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. +# """End-to-end tests using the FHIR Proxy, HAPI Server, and AuthZ Server.""" diff --git a/e2e-test/e2e.sh b/e2e-test/e2e.sh index 81288ac7..c56b4f32 100755 --- a/e2e-test/e2e.sh +++ b/e2e-test/e2e.sh @@ -1,4 +1,5 @@ #!/bin/bash +# # Copyright 2021-2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -12,6 +13,7 @@ # 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. +# # Fail on any error. set -e diff --git a/kokoro/gcp_ubuntu/kokoro_build.sh b/kokoro/gcp_ubuntu/kokoro_build.sh index 7d5b1e37..4e632eca 100755 --- a/kokoro/gcp_ubuntu/kokoro_build.sh +++ b/kokoro/gcp_ubuntu/kokoro_build.sh @@ -1,4 +1,5 @@ #!/bin/bash +# # Copyright 2021-2022 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -12,6 +13,7 @@ # 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. +# # Fail on any error. set -e diff --git a/license-header.txt b/license-header.txt index 062d31d1..edb10158 100644 --- a/license-header.txt +++ b/license-header.txt @@ -1,15 +1,13 @@ -/* - * Copyright $YEAR Google LLC - * - * 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. - */ +Copyright ${license.git.copyrightYears} Google LLC + +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. diff --git a/plugins/pom.xml b/plugins/pom.xml index 74af0dcf..67687226 100644 --- a/plugins/pom.xml +++ b/plugins/pom.xml @@ -1,4 +1,21 @@ + 4.0.0 diff --git a/pom.xml b/pom.xml index 0a6daedd..41f20bdd 100644 --- a/pom.xml +++ b/pom.xml @@ -1,4 +1,21 @@ + 4.0.0 @@ -8,6 +25,7 @@ pom FHIR Access Proxy + 2021 plugins server @@ -21,6 +39,7 @@ 11 11 2.6.6 + 4.1 @@ -84,17 +103,39 @@ + + com.mycila + license-maven-plugin + ${license-maven-plugin.version} + +
${root.basedir}/license-header.txt
+ + .venv/** + **/*.txt + +
+ + + com.mycila + license-maven-plugin-git + ${license-maven-plugin.version} + + + + + first + + format + + process-sources + + +
com.diffplug.spotless spotless-maven-plugin ${spotless.version} - - false @@ -149,9 +190,6 @@ true - - ${root.basedir}/license-header.txt - diff --git a/server/pom.xml b/server/pom.xml index 45f94be8..6cba4041 100644 --- a/server/pom.xml +++ b/server/pom.xml @@ -1,4 +1,21 @@ + 4.0.0 diff --git a/server/src/main/java/com/google/fhir/proxy/GenericFhirClient.java b/server/src/main/java/com/google/fhir/proxy/GenericFhirClient.java index 920738b2..3b110648 100644 --- a/server/src/main/java/com/google/fhir/proxy/GenericFhirClient.java +++ b/server/src/main/java/com/google/fhir/proxy/GenericFhirClient.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 Google LLC + * Copyright 2021-2022 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/server/src/main/resources/intellij-java-google-style.xml b/server/src/main/resources/intellij-java-google-style.xml deleted file mode 100644 index f3a6743e..00000000 --- a/server/src/main/resources/intellij-java-google-style.xml +++ /dev/null @@ -1,598 +0,0 @@ - - - - - - diff --git a/server/src/main/resources/logback.xml b/server/src/main/resources/logback.xml index d6feec4c..8f43c594 100644 --- a/server/src/main/resources/logback.xml +++ b/server/src/main/resources/logback.xml @@ -1,3 +1,20 @@ + diff --git a/server/src/main/webapp/WEB-INF/web.xml b/server/src/main/webapp/WEB-INF/web.xml index 5d2ea7d0..08d2c64d 100644 --- a/server/src/main/webapp/WEB-INF/web.xml +++ b/server/src/main/webapp/WEB-INF/web.xml @@ -1,3 +1,20 @@ + diff --git a/server/src/test/java/com/google/fhir/proxy/GenericFhirClientTest.java b/server/src/test/java/com/google/fhir/proxy/GenericFhirClientTest.java index 85bc2ba9..b80d50b1 100644 --- a/server/src/test/java/com/google/fhir/proxy/GenericFhirClientTest.java +++ b/server/src/test/java/com/google/fhir/proxy/GenericFhirClientTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 Google LLC + * Copyright 2021-2022 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.