diff --git a/.github/workflows/app.adresse-service.yml b/.github/workflows/app.adresse-service.yml index 1d9e5a693fd..5e7048aacaa 100644 --- a/.github/workflows/app.adresse-service.yml +++ b/.github/workflows/app.adresse-service.yml @@ -3,12 +3,13 @@ name: adresse-service on: push: paths: - - libs/data-transfer-objects - - libs/security-core - - libs/servlet-core - - libs/servlet-security - - apps/adresse-service/** - - .github/workflows/app.adresse-service.yml + - "plugins/**" + - "libs/data-transfer-objects/**" + - "libs/security-core/**" + - "libs/servlet-core/**" + - "libs/servlet-security/**" + - "apps/adresse-service/**" + - ".github/workflows/app.adresse-service.yml" jobs: workflow: diff --git a/.github/workflows/app.amelding-service.yml b/.github/workflows/app.amelding-service.yml index 4ca6ecf0943..dccaf511221 100644 --- a/.github/workflows/app.amelding-service.yml +++ b/.github/workflows/app.amelding-service.yml @@ -3,14 +3,15 @@ name: amelding-service on: push: paths: - - libs/avro-schema - - libs/commands - - libs/data-transfer-objects - - libs/reactive-core - - libs/reactive-security - - libs/security-core - - apps/amelding-service/** - - .github/workflows/app.amelding-service.yml + - "plugins/**" + - "libs/avro-schema/**" + - "libs/commands/**" + - "libs/data-transfer-objects/**" + - "libs/reactive-core/**" + - "libs/reactive-security/**" + - "libs/security-core/**" + - "apps/amelding-service/**" + - ".github/workflows/app.amelding-service.yml" jobs: workflow: diff --git a/.github/workflows/app.app-tilgang-analyse-service.yml b/.github/workflows/app.app-tilgang-analyse-service.yml index 3193c80d81f..71950c604b7 100644 --- a/.github/workflows/app.app-tilgang-analyse-service.yml +++ b/.github/workflows/app.app-tilgang-analyse-service.yml @@ -3,11 +3,12 @@ name: app-tilgang-analyse-service on: push: paths: - - libs/data-transfer-objects - - libs/reactive-core - - libs/reactive-security - - apps/app-tilgang-analyse-service/** - - .github/workflows/app.app-tilgang-analyse-service.yml + - "plugins/**" + - "libs/data-transfer-objects/**" + - "libs/reactive-core/**" + - "libs/reactive-security/**" + - "apps/app-tilgang-analyse-service/**" + - ".github/workflows/app.app-tilgang-analyse-service.yml" jobs: workflow: diff --git a/.github/workflows/app.arbeidsforhold-service.yml b/.github/workflows/app.arbeidsforhold-service.yml index fd352934840..169a2330d11 100644 --- a/.github/workflows/app.arbeidsforhold-service.yml +++ b/.github/workflows/app.arbeidsforhold-service.yml @@ -3,14 +3,15 @@ name: arbeidsforhold-service on: push: paths: - - libs/commands - - libs/data-transfer-objects - - libs/reactive-core - - libs/security-core - - libs/servlet-core - - libs/servlet-security - - apps/arbeidsforhold-service/** - - .github/workflows/app.arbeidsforhold-service.yml + - "plugins/**" + - "libs/commands/**" + - "libs/data-transfer-objects/**" + - "libs/reactive-core/**" + - "libs/security-core/**" + - "libs/servlet-core/**" + - "libs/servlet-security/**" + - "apps/arbeidsforhold-service/**" + - ".github/workflows/app.arbeidsforhold-service.yml" jobs: workflow: diff --git a/.github/workflows/app.batch-bestilling-service.yml b/.github/workflows/app.batch-bestilling-service.yml index d2fd49c3391..e4b3e0c1eb6 100644 --- a/.github/workflows/app.batch-bestilling-service.yml +++ b/.github/workflows/app.batch-bestilling-service.yml @@ -3,15 +3,16 @@ name: batch-bestilling-service on: push: paths: - - libs/commands - - libs/data-transfer-objects - - libs/reactive-core - - libs/security-core - - libs/servlet-core - - libs/servlet-insecure-security - - libs/servlet-security - - apps/batch-bestilling-service/** - - .github/workflows/app.batch-bestilling-service.yml + - "plugins/**" + - "libs/commands/**" + - "libs/data-transfer-objects/**" + - "libs/reactive-core/**" + - "libs/security-core/**" + - "libs/servlet-core/**" + - "libs/servlet-insecure-security/**" + - "libs/servlet-security/**" + - "apps/batch-bestilling-service/**" + - ".github/workflows/app.batch-bestilling-service.yml" jobs: workflow: diff --git a/.github/workflows/app.brreg-stub.yml b/.github/workflows/app.brreg-stub.yml index f486b493200..33e66b75a29 100644 --- a/.github/workflows/app.brreg-stub.yml +++ b/.github/workflows/app.brreg-stub.yml @@ -3,10 +3,11 @@ name: brreg-stub on: push: paths: - - libs/database - - libs/servlet-core - - apps/brreg-stub/** - - .github/workflows/app.brreg-stub.yml + - "plugins/**" + - "libs/database/**" + - "libs/servlet-core/**" + - "apps/brreg-stub/**" + - ".github/workflows/app.brreg-stub.yml" jobs: workflow: diff --git a/.github/workflows/app.bruker-service.yml b/.github/workflows/app.bruker-service.yml index fb9dd8ff020..7fd402271e6 100644 --- a/.github/workflows/app.bruker-service.yml +++ b/.github/workflows/app.bruker-service.yml @@ -3,13 +3,14 @@ name: bruker-service on: push: paths: - - libs/data-transfer-objects - - libs/integration-test - - libs/reactive-core - - libs/reactive-security - - libs/security-core - - apps/bruker-service/** - - .github/workflows/app.bruker-service.yml + - "plugins/**" + - "libs/data-transfer-objects/**" + - "libs/integration-test/**" + - "libs/reactive-core/**" + - "libs/reactive-security/**" + - "libs/security-core/**" + - "apps/bruker-service/**" + - ".github/workflows/app.bruker-service.yml" jobs: workflow: diff --git a/.github/workflows/app.budpro-service.yml b/.github/workflows/app.budpro-service.yml index 489c3c21fee..f5f036ab185 100644 --- a/.github/workflows/app.budpro-service.yml +++ b/.github/workflows/app.budpro-service.yml @@ -3,15 +3,16 @@ name: budpro-service on: push: paths: - - libs/commands - - libs/data-transfer-objects - - libs/reactive-core - - libs/security-core - - libs/servlet-core - - libs/servlet-insecure-security - - libs/servlet-security - - apps/budpro-service/** - - .github/workflows/app.budpro-service.yml + - "plugins/**" + - "libs/commands/**" + - "libs/data-transfer-objects/**" + - "libs/reactive-core/**" + - "libs/security-core/**" + - "libs/servlet-core/**" + - "libs/servlet-insecure-security/**" + - "libs/servlet-security/**" + - "apps/budpro-service/**" + - ".github/workflows/app.budpro-service.yml" jobs: workflow: diff --git a/.github/workflows/app.dolly-backend.yml b/.github/workflows/app.dolly-backend.yml index 969eb36be87..d122c632b70 100644 --- a/.github/workflows/app.dolly-backend.yml +++ b/.github/workflows/app.dolly-backend.yml @@ -3,16 +3,17 @@ name: dolly-backend on: push: paths: - - libs/data-transfer-objects/** - - libs/data-transfer-search-objects/** - - libs/database/** - - libs/reactive-core/** - - libs/security-core/** - - libs/servlet-core/** - - libs/servlet-insecure-security/** - - libs/servlet-security/** - - apps/dolly-backend/** - - .github/workflows/app.dolly-backend.yml + - "plugins/**" + - "libs/data-transfer-objects/**" + - "libs/data-transfer-search-objects/**" + - "libs/database/**" + - "libs/reactive-core/**" + - "libs/security-core/**" + - "libs/servlet-core/**" + - "libs/servlet-insecure-security/**" + - "libs/servlet-security/**" + - "apps/dolly-backend/**" + - ".github/workflows/app.dolly-backend.yml" jobs: workflow: diff --git a/.github/workflows/app.dolly-frontend.yml b/.github/workflows/app.dolly-frontend.yml index b67445bb6af..d8dfc7b61ca 100644 --- a/.github/workflows/app.dolly-frontend.yml +++ b/.github/workflows/app.dolly-frontend.yml @@ -3,17 +3,18 @@ name: dolly-frontend on: push: paths: - - libs/data-transfer-objects - - libs/reactive-core - - libs/reactive-frontend - - libs/reactive-proxy - - libs/reactive-security - - libs/reactive-session-security - - libs/security-core - - libs/security-core - - apps/dolly-frontend/** - - .github/workflows/app.dolly-frontend.yml - - .github/workflows/common.playwright.yml + - "plugins/**" + - "libs/data-transfer-objects/**" + - "libs/reactive-core/**" + - "libs/reactive-frontend/**" + - "libs/reactive-proxy/**" + - "libs/reactive-security/**" + - "libs/reactive-session-security/**" + - "libs/security-core/**" + - "libs/security-core/**" + - "apps/dolly-frontend/**" + - ".github/workflows/app.dolly-frontend.yml" + - ".github/workflows/common.playwright.yml" jobs: playwright: diff --git a/.github/workflows/app.dollystatus.yml b/.github/workflows/app.dollystatus.yml index d4d4d53546c..5b788efac5b 100644 --- a/.github/workflows/app.dollystatus.yml +++ b/.github/workflows/app.dollystatus.yml @@ -3,8 +3,9 @@ name: dollystatus on: push: paths: - - apps/dollystatus/** - - .github/workflows/app.dollystatus.yml + - "plugins/**" + - "apps/dollystatus/**" + - ".github/workflows/app.dollystatus.yml" jobs: workflow: diff --git a/.github/workflows/app.endringsmelding-frontend.yml b/.github/workflows/app.endringsmelding-frontend.yml index 0e2feae5349..b034be702fe 100644 --- a/.github/workflows/app.endringsmelding-frontend.yml +++ b/.github/workflows/app.endringsmelding-frontend.yml @@ -3,12 +3,13 @@ name: endringsmelding-frontend on: push: paths: - - libs/reactive-core - - libs/reactive-frontend - - libs/reactive-session-security - - libs/security-core - - apps/endringsmelding-frontend/** - - .github/workflows/app.endringsmelding-frontend.yml + - "plugins/**" + - "libs/reactive-core/**" + - "libs/reactive-frontend/**" + - "libs/reactive-session-security/**" + - "libs/security-core/**" + - "apps/endringsmelding-frontend/**" + - ".github/workflows/app.endringsmelding-frontend.yml" jobs: workflow: diff --git a/.github/workflows/app.endringsmelding-service.yml b/.github/workflows/app.endringsmelding-service.yml index f413c732a1e..6334f480fdb 100644 --- a/.github/workflows/app.endringsmelding-service.yml +++ b/.github/workflows/app.endringsmelding-service.yml @@ -3,13 +3,14 @@ name: endringsmelding-service on: push: paths: - - libs/data-transfer-objects - - libs/data-transfer-search-objects - - libs/reactive-core - - libs/reactive-security - - libs/security-core - - apps/endringsmelding-service/** - - .github/workflows/app.endringsmelding-service.yml + - "plugins/**" + - "libs/data-transfer-objects/**" + - "libs/data-transfer-search-objects/**" + - "libs/reactive-core/**" + - "libs/reactive-security/**" + - "libs/security-core/**" + - "apps/endringsmelding-service/**" + - ".github/workflows/app.endringsmelding-service.yml" jobs: workflow: diff --git a/.github/workflows/app.ereg-batch-status-service.yml b/.github/workflows/app.ereg-batch-status-service.yml index 3547091010a..750485f41f1 100644 --- a/.github/workflows/app.ereg-batch-status-service.yml +++ b/.github/workflows/app.ereg-batch-status-service.yml @@ -3,12 +3,13 @@ name: ereg-batch-status-service on: push: paths: - - libs/data-transfer-objects - - libs/reactive-core - - libs/servlet-core - - libs/servlet-security - - apps/ereg-batch-status-service/** - - .github/workflows/app.ereg-batch-status-service.yml + - "plugins/**" + - "libs/data-transfer-objects/**" + - "libs/reactive-core/**" + - "libs/servlet-core/**" + - "libs/servlet-security/**" + - "apps/ereg-batch-status-service/**" + - ".github/workflows/app.ereg-batch-status-service.yml" jobs: workflow: diff --git a/.github/workflows/app.faste-data-frontend.yml b/.github/workflows/app.faste-data-frontend.yml index 9b70f555e74..80820cd1ca5 100644 --- a/.github/workflows/app.faste-data-frontend.yml +++ b/.github/workflows/app.faste-data-frontend.yml @@ -3,12 +3,13 @@ name: faste-data-frontend on: push: paths: - - libs/reactive-core - - libs/reactive-frontend - - libs/reactive-session-security - - libs/security-core - - apps/faste-data-frontend/** - - .github/workflows/app.faste-data-frontend.yml + - "plugins/**" + - "libs/reactive-core/**" + - "libs/reactive-frontend/**" + - "libs/reactive-session-security/**" + - "libs/security-core/**" + - "apps/faste-data-frontend/**" + - ".github/workflows/app.faste-data-frontend.yml" jobs: workflow: diff --git a/.github/workflows/app.generer-arbeidsforhold-populasjon-service.yml b/.github/workflows/app.generer-arbeidsforhold-populasjon-service.yml index b3c6e0ae6ae..16dbf65c2b0 100644 --- a/.github/workflows/app.generer-arbeidsforhold-populasjon-service.yml +++ b/.github/workflows/app.generer-arbeidsforhold-populasjon-service.yml @@ -3,13 +3,14 @@ name: generer-arbeidsforhold-populasjon-service on: push: paths: - - libs/commands - - libs/data-transfer-objects - - libs/security-core - - libs/servlet-core - - libs/servlet-insecure-security - - apps/generer-arbeidsforhold-populasjon-service/** - - .github/workflows/app.generer-arbeidsforhold-populasjon-service.yml + - "plugins/**" + - "libs/commands/**" + - "libs/data-transfer-objects/**" + - "libs/security-core/**" + - "libs/servlet-core/**" + - "libs/servlet-insecure-security/**" + - "apps/generer-arbeidsforhold-populasjon-service/**" + - ".github/workflows/app.generer-arbeidsforhold-populasjon-service.yml" jobs: workflow: diff --git a/.github/workflows/app.generer-navn-service.yml b/.github/workflows/app.generer-navn-service.yml index 49c9f19449d..d7847ed949d 100644 --- a/.github/workflows/app.generer-navn-service.yml +++ b/.github/workflows/app.generer-navn-service.yml @@ -3,14 +3,15 @@ name: generer-navn-service on: push: paths: - - libs/commands - - libs/data-transfer-objects - - libs/security-core - - libs/servlet-core - - libs/servlet-security - - libs/testing - - apps/generer-navn-service/** - - .github/workflows/app.generer-navn-service.yml + - "plugins/**" + - "libs/commands/**" + - "libs/data-transfer-objects/**" + - "libs/security-core/**" + - "libs/servlet-core/**" + - "libs/servlet-security/**" + - "libs/testing/**" + - "apps/generer-navn-service/**" + - ".github/workflows/app.generer-navn-service.yml" jobs: workflow: diff --git a/.github/workflows/app.generer-organisasjon-populasjon-service.yml b/.github/workflows/app.generer-organisasjon-populasjon-service.yml index 9f8acf25d08..11a39629df1 100644 --- a/.github/workflows/app.generer-organisasjon-populasjon-service.yml +++ b/.github/workflows/app.generer-organisasjon-populasjon-service.yml @@ -3,18 +3,19 @@ name: generer-organisasjon-populasjon-service on: push: paths: - - libs/avro-schema - - libs/commands - - libs/data-transfer-objects - - libs/database - - libs/kafka-config - - libs/kafka-producers - - libs/reactive-core - - libs/security-core - - libs/servlet-core - - libs/servlet-security - - apps/generer-organisasjon-populasjon-service/** - - .github/workflows/app.generer-organisasjon-populasjon-service.yml + - "plugins/**" + - "libs/avro-schema/**" + - "libs/commands/**" + - "libs/data-transfer-objects/**" + - "libs/database/**" + - "libs/kafka-config/**" + - "libs/kafka-producers/**" + - "libs/reactive-core/**" + - "libs/security-core/**" + - "libs/servlet-core/**" + - "libs/servlet-security/**" + - "apps/generer-organisasjon-populasjon-service/**" + - ".github/workflows/app.generer-organisasjon-populasjon-service.yml" jobs: workflow: diff --git a/.github/workflows/app.generer-synt-amelding-service.yml b/.github/workflows/app.generer-synt-amelding-service.yml index 07a4959b9f4..744c6b22715 100644 --- a/.github/workflows/app.generer-synt-amelding-service.yml +++ b/.github/workflows/app.generer-synt-amelding-service.yml @@ -3,13 +3,14 @@ name: generer-synt-amelding-service on: push: paths: - - libs/domain - - libs/reactive-core - - libs/security-core - - libs/servlet-core - - libs/servlet-security - - apps/generer-synt-amelding-service/** - - .github/workflows/app.generer-synt-amelding-service.yml + - "plugins/**" + - "libs/domain/**" + - "libs/reactive-core/**" + - "libs/security-core/**" + - "libs/servlet-core/**" + - "libs/servlet-security/**" + - "apps/generer-synt-amelding-service/**" + - ".github/workflows/app.generer-synt-amelding-service.yml" jobs: workflow: diff --git a/.github/workflows/app.helsepersonell-service.yml b/.github/workflows/app.helsepersonell-service.yml index 0d6ef0d170d..5e6979f34a9 100644 --- a/.github/workflows/app.helsepersonell-service.yml +++ b/.github/workflows/app.helsepersonell-service.yml @@ -3,14 +3,15 @@ name: helsepersonell-service on: push: paths: - - libs/data-transfer-objects - - libs/reactive-core - - libs/security-core - - libs/servlet-core - - libs/servlet-security - - libs/testing - - apps/helsepersonell-service/** - - .github/workflows/app.helsepersonell-service.yml + - "plugins/**" + - "libs/data-transfer-objects/**" + - "libs/reactive-core/**" + - "libs/security-core/**" + - "libs/servlet-core/**" + - "libs/servlet-security/**" + - "libs/testing/**" + - "apps/helsepersonell-service/**" + - ".github/workflows/app.helsepersonell-service.yml" jobs: workflow: diff --git a/.github/workflows/app.inntektsmelding-generator-service.yml b/.github/workflows/app.inntektsmelding-generator-service.yml index e635b582b95..0eb7df2cdee 100644 --- a/.github/workflows/app.inntektsmelding-generator-service.yml +++ b/.github/workflows/app.inntektsmelding-generator-service.yml @@ -3,11 +3,12 @@ name: inntektsmelding-generator-service on: push: paths: - - libs/data-transfer-objects - - libs/servlet-core - - libs/servlet-security - - apps/inntektsmelding-generator-service/** - - .github/workflows/app.inntektsmelding-generator-service.yml + - "plugins/**" + - "libs/data-transfer-objects/**" + - "libs/servlet-core/**" + - "libs/servlet-security/**" + - "apps/inntektsmelding-generator-service/**" + - ".github/workflows/app.inntektsmelding-generator-service.yml" jobs: workflow: diff --git a/.github/workflows/app.inntektsmelding-service.yml b/.github/workflows/app.inntektsmelding-service.yml index 5055dd43a71..55d5d01bf5a 100644 --- a/.github/workflows/app.inntektsmelding-service.yml +++ b/.github/workflows/app.inntektsmelding-service.yml @@ -3,12 +3,13 @@ name: inntektsmelding-service on: push: paths: - - libs/data-transfer-objects - - libs/security-core - - libs/servlet-core - - libs/servlet-security - - apps/inntektsmelding-service/** - - .github/workflows/app.inntektsmelding-service.yml + - "plugins/**" + - "libs/data-transfer-objects/**" + - "libs/security-core/**" + - "libs/servlet-core/**" + - "libs/servlet-security/**" + - "apps/inntektsmelding-service/**" + - ".github/workflows/app.inntektsmelding-service.yml" jobs: workflow: diff --git a/.github/workflows/app.jenkins-batch-status-service.yml b/.github/workflows/app.jenkins-batch-status-service.yml index abfdf4f8402..74b7bf874a8 100644 --- a/.github/workflows/app.jenkins-batch-status-service.yml +++ b/.github/workflows/app.jenkins-batch-status-service.yml @@ -3,14 +3,15 @@ name: jenkins-batch-status-service on: push: paths: - - libs/commands - - libs/data-transfer-objects - - libs/reactive-core - - libs/security-core - - libs/servlet-core - - libs/servlet-security - - apps/jenkins-batch-status-service/** - - .github/workflows/app.jenkins-batch-status-service.yml + - "plugins/**" + - "libs/commands/**" + - "libs/data-transfer-objects/**" + - "libs/reactive-core/**" + - "libs/security-core/**" + - "libs/servlet-core/**" + - "libs/servlet-security/**" + - "apps/jenkins-batch-status-service/**" + - ".github/workflows/app.jenkins-batch-status-service.yml" jobs: workflow: diff --git a/.github/workflows/app.joark-dokument-service.yml b/.github/workflows/app.joark-dokument-service.yml index 8cee3172ca2..abe89263f1b 100644 --- a/.github/workflows/app.joark-dokument-service.yml +++ b/.github/workflows/app.joark-dokument-service.yml @@ -3,14 +3,15 @@ name: joark-dokument-service on: push: paths: - - libs/data-transfer-objects - - libs/domain - - libs/reactive-core - - libs/security-core - - libs/servlet-core - - libs/servlet-security - - apps/joark-dokument-service/** - - .github/workflows/app.joark-dokument-service.yml + - "plugins/**" + - "libs/data-transfer-objects/**" + - "libs/domain/**" + - "libs/reactive-core/**" + - "libs/security-core/**" + - "libs/servlet-core/**" + - "libs/servlet-security/**" + - "apps/joark-dokument-service/**" + - ".github/workflows/app.joark-dokument-service.yml" jobs: workflow: diff --git a/.github/workflows/app.kodeverk-service.yml b/.github/workflows/app.kodeverk-service.yml index eafe4803772..a94ff4a4ac7 100644 --- a/.github/workflows/app.kodeverk-service.yml +++ b/.github/workflows/app.kodeverk-service.yml @@ -3,12 +3,13 @@ name: kodeverk-service on: push: paths: - - libs/security-core - - libs/reactive-core - - libs/reactive-security - - libs/data-transfer-objects - - apps/kodeverk-service/** - - .github/workflows/app.kodeverk-service.yml + - "plugins/**" + - "libs/security-core/**" + - "libs/reactive-core/**" + - "libs/reactive-security/**" + - "libs/data-transfer-objects/**" + - "apps/kodeverk-service/**" + - ".github/workflows/app.kodeverk-service.yml" jobs: workflow: diff --git a/.github/workflows/app.miljoer-service.yml b/.github/workflows/app.miljoer-service.yml index 3f74924820b..dda2c9dd734 100644 --- a/.github/workflows/app.miljoer-service.yml +++ b/.github/workflows/app.miljoer-service.yml @@ -3,13 +3,14 @@ name: miljoer-service on: push: paths: - - libs/commands - - libs/data-transfer-objects - - libs/security-core - - libs/servlet-core - - libs/servlet-security - - apps/miljoer-service/** - - .github/workflows/app.miljoer-service.yml + - "plugins/**" + - "libs/commands/**" + - "libs/data-transfer-objects/**" + - "libs/security-core/**" + - "libs/servlet-core/**" + - "libs/servlet-security/**" + - "apps/miljoer-service/**" + - ".github/workflows/app.miljoer-service.yml" jobs: workflow: diff --git a/.github/workflows/app.oppsummeringsdokument-service.yml b/.github/workflows/app.oppsummeringsdokument-service.yml index 1a6f227bfb8..7d482e83f9c 100644 --- a/.github/workflows/app.oppsummeringsdokument-service.yml +++ b/.github/workflows/app.oppsummeringsdokument-service.yml @@ -3,13 +3,14 @@ name: oppsummeringsdokument-service on: push: paths: - - libs/data-transfer-objects - - libs/security-core - - libs/servlet-core - - libs/servlet-security - - xsd/arbeidsforhold-xsd - - apps/oppsummeringsdokument-service/** - - .github/workflows/app.oppsummeringsdokument-service.yml + - "plugins/**" + - "libs/data-transfer-objects/**" + - "libs/security-core/**" + - "libs/servlet-core/**" + - "libs/servlet-security/**" + - "xsd/arbeidsforhold-xsd/**" + - "apps/oppsummeringsdokument-service/**" + - ".github/workflows/app.oppsummeringsdokument-service.yml" jobs: workflow: diff --git a/.github/workflows/app.organisasjon-bestilling-service.yml b/.github/workflows/app.organisasjon-bestilling-service.yml index 903d696dda7..b797c98491c 100644 --- a/.github/workflows/app.organisasjon-bestilling-service.yml +++ b/.github/workflows/app.organisasjon-bestilling-service.yml @@ -3,14 +3,15 @@ name: organisasjon-bestilling-service on: push: paths: - - libs/commands - - libs/data-transfer-objects - - libs/reactive-core - - libs/security-core - - libs/servlet-core - - libs/servlet-security - - apps/organisasjon-bestilling-service/** - - .github/workflows/app.organisasjon-bestilling-service.yml + - "plugins/**" + - "libs/commands/**" + - "libs/data-transfer-objects/**" + - "libs/reactive-core/**" + - "libs/security-core/**" + - "libs/servlet-core/**" + - "libs/servlet-security/**" + - "apps/organisasjon-bestilling-service/**" + - ".github/workflows/app.organisasjon-bestilling-service.yml" jobs: workflow: diff --git a/.github/workflows/app.organisasjon-faste-data-service.yml b/.github/workflows/app.organisasjon-faste-data-service.yml index fdfa1bc0257..a1b3e6186d3 100644 --- a/.github/workflows/app.organisasjon-faste-data-service.yml +++ b/.github/workflows/app.organisasjon-faste-data-service.yml @@ -3,18 +3,19 @@ name: organisasjon-faste-data-service on: push: paths: - - libs/avro-schema - - libs/commands - - libs/data-transfer-objects - - libs/database - - libs/kafka-config - - libs/kafka-producers - - libs/reactive-core - - libs/security-core - - libs/servlet-core - - libs/servlet-security - - apps/organisasjon-faste-data-service/** - - .github/workflows/app.organisasjon-faste-data-service.yml + - "plugins/**" + - "libs/avro-schema/**" + - "libs/commands/**" + - "libs/data-transfer-objects/**" + - "libs/database/**" + - "libs/kafka-config/**" + - "libs/kafka-producers/**" + - "libs/reactive-core/**" + - "libs/security-core/**" + - "libs/servlet-core/**" + - "libs/servlet-security/**" + - "apps/organisasjon-faste-data-service/**" + - ".github/workflows/app.organisasjon-faste-data-service.yml" jobs: workflow: diff --git a/.github/workflows/app.organisasjon-forvalter.yml b/.github/workflows/app.organisasjon-forvalter.yml index fc9acfc26ff..cc2d3fbfc92 100644 --- a/.github/workflows/app.organisasjon-forvalter.yml +++ b/.github/workflows/app.organisasjon-forvalter.yml @@ -3,18 +3,19 @@ name: organisasjon-forvalter on: push: paths: - - libs/avro-schema - - libs/commands - - libs/data-transfer-objects - - libs/database - - libs/kafka-config - - libs/kafka-producers - - libs/security-core - - libs/servlet-core - - libs/servlet-security - - libs/testing - - apps/organisasjon-forvalter/** - - .github/workflows/app.organisasjon-forvalter.yml + - "plugins/**" + - "libs/avro-schema/**" + - "libs/commands/**" + - "libs/data-transfer-objects/**" + - "libs/database/**" + - "libs/kafka-config/**" + - "libs/kafka-producers/**" + - "libs/security-core/**" + - "libs/servlet-core/**" + - "libs/servlet-security/**" + - "libs/testing/**" + - "apps/organisasjon-forvalter/**" + - ".github/workflows/app.organisasjon-forvalter.yml" jobs: workflow: diff --git a/.github/workflows/app.organisasjon-mottak-service.yml b/.github/workflows/app.organisasjon-mottak-service.yml index 00ade707220..230c1d6215f 100644 --- a/.github/workflows/app.organisasjon-mottak-service.yml +++ b/.github/workflows/app.organisasjon-mottak-service.yml @@ -3,17 +3,18 @@ name: organisasjon-mottak-service on: push: paths: - - libs/avro-schema - - libs/commands - - libs/data-transfer-objects - - libs/kafka-config - - libs/kafka-producers - - libs/reactive-core - - libs/security-core - - libs/servlet-core - - libs/servlet-insecure-security - - apps/organisasjon-mottak-service/** - - .github/workflows/app.organisasjon-mottak-service.yml + - "plugins/**" + - "libs/avro-schema/**" + - "libs/commands/**" + - "libs/data-transfer-objects/**" + - "libs/kafka-config/**" + - "libs/kafka-producers/**" + - "libs/reactive-core/**" + - "libs/security-core/**" + - "libs/servlet-core/**" + - "libs/servlet-insecure-security/**" + - "apps/organisasjon-mottak-service/**" + - ".github/workflows/app.organisasjon-mottak-service.yml" jobs: workflow: diff --git a/.github/workflows/app.organisasjon-service.yml b/.github/workflows/app.organisasjon-service.yml index 98e04c2185f..04bda6d8b40 100644 --- a/.github/workflows/app.organisasjon-service.yml +++ b/.github/workflows/app.organisasjon-service.yml @@ -3,15 +3,16 @@ name: organisasjon-service on: push: paths: - - libs/commands - - libs/data-transfer-objects - - libs/reactive-core - - libs/security-core - - libs/servlet-core - - libs/servlet-security - - libs/testing - - apps/organisasjon-service/** - - .github/workflows/app.organisasjon-service.yml + - "plugins/**" + - "libs/commands/**" + - "libs/data-transfer-objects/**" + - "libs/reactive-core/**" + - "libs/security-core/**" + - "libs/servlet-core/**" + - "libs/servlet-security/**" + - "libs/testing/**" + - "apps/organisasjon-service/**" + - ".github/workflows/app.organisasjon-service.yml" jobs: workflow: diff --git a/.github/workflows/app.organisasjon-tilgang-frontend.yml b/.github/workflows/app.organisasjon-tilgang-frontend.yml index eb94f433f93..18ab3a96315 100644 --- a/.github/workflows/app.organisasjon-tilgang-frontend.yml +++ b/.github/workflows/app.organisasjon-tilgang-frontend.yml @@ -3,12 +3,13 @@ name: organisasjon-tilgang-frontend on: push: paths: - - libs/reactive-core - - libs/reactive-frontend - - libs/reactive-session-security - - libs/security-core - - apps/organisasjon-tilgang-frontend/** - - .github/workflows/app.organisasjon-tilgang-frontend.yml + - "plugins/**" + - "libs/reactive-core/**" + - "libs/reactive-frontend/**" + - "libs/reactive-session-security/**" + - "libs/security-core/**" + - "apps/organisasjon-tilgang-frontend/**" + - ".github/workflows/app.organisasjon-tilgang-frontend.yml" jobs: workflow: diff --git a/.github/workflows/app.organisasjon-tilgang-service.yml b/.github/workflows/app.organisasjon-tilgang-service.yml index 2057885c7ff..229fcbb1fcd 100644 --- a/.github/workflows/app.organisasjon-tilgang-service.yml +++ b/.github/workflows/app.organisasjon-tilgang-service.yml @@ -3,10 +3,11 @@ name: organisasjon-tilgang-service on: push: paths: - - libs/reactive-core - - libs/reactive-security - - apps/organisasjon-tilgang-service/** - - .github/workflows/app.organisasjon-tilgang-service.yml + - "plugins/**" + - "libs/reactive-core/**" + - "libs/reactive-security/**" + - "apps/organisasjon-tilgang-service/**" + - ".github/workflows/app.organisasjon-tilgang-service.yml" jobs: workflow: diff --git a/.github/workflows/app.orgnummer-service.yml b/.github/workflows/app.orgnummer-service.yml index d0b77ea9709..adf569410be 100644 --- a/.github/workflows/app.orgnummer-service.yml +++ b/.github/workflows/app.orgnummer-service.yml @@ -3,15 +3,16 @@ name: orgnummer-service on: push: paths: - - libs/commands - - libs/data-transfer-objects - - libs/database - - libs/reactive-core - - libs/security-core - - libs/servlet-core - - libs/servlet-security - - apps/orgnummer-service/** - - .github/workflows/app.orgnummer-service.yml + - "plugins/**" + - "libs/commands/**" + - "libs/data-transfer-objects/**" + - "libs/database/**" + - "libs/reactive-core/**" + - "libs/security-core/**" + - "libs/servlet-core/**" + - "libs/servlet-security/**" + - "apps/orgnummer-service/**" + - ".github/workflows/app.orgnummer-service.yml" jobs: workflow: diff --git a/.github/workflows/app.oversikt-frontend.yml b/.github/workflows/app.oversikt-frontend.yml index 7523948aa0c..2c96950bc1b 100644 --- a/.github/workflows/app.oversikt-frontend.yml +++ b/.github/workflows/app.oversikt-frontend.yml @@ -3,12 +3,13 @@ name: oversikt-frontend on: push: paths: - - libs/reactive-core - - libs/reactive-frontend - - libs/reactive-security - - libs/security-core - - apps/oversikt-frontend/** - - .github/workflows/app.oversikt-frontend.yml + - "plugins/**" + - "libs/reactive-core/**" + - "libs/reactive-frontend/**" + - "libs/reactive-security/**" + - "libs/security-core/**" + - "apps/oversikt-frontend/**" + - ".github/workflows/app.oversikt-frontend.yml" jobs: workflow: diff --git a/.github/workflows/app.pdl-forvalter.yml b/.github/workflows/app.pdl-forvalter.yml index ef8aa2bc3eb..177601a64ea 100644 --- a/.github/workflows/app.pdl-forvalter.yml +++ b/.github/workflows/app.pdl-forvalter.yml @@ -3,15 +3,16 @@ name: pdl-forvalter on: push: paths: - - libs/data-transfer-objects - - libs/data-transfer-search-objects - - libs/database - - libs/security-core - - libs/servlet-core - - libs/servlet-security - - libs/testing - - apps/pdl-forvalter/** - - .github/workflows/app.pdl-forvalter.yml + - "plugins/**" + - "libs/data-transfer-objects/**" + - "libs/data-transfer-search-objects/**" + - "libs/database/**" + - "libs/security-core/**" + - "libs/servlet-core/**" + - "libs/servlet-security/**" + - "libs/testing/**" + - "apps/pdl-forvalter/**" + - ".github/workflows/app.pdl-forvalter.yml" jobs: workflow: diff --git a/.github/workflows/app.person-faste-data-service.yml b/.github/workflows/app.person-faste-data-service.yml index 27a4f546098..f18c3a7a16f 100644 --- a/.github/workflows/app.person-faste-data-service.yml +++ b/.github/workflows/app.person-faste-data-service.yml @@ -3,11 +3,12 @@ name: person-faste-data-service on: push: paths: - - libs/data-transfer-objects - - libs/reactive-core - - libs/reactive-security - - apps/person-faste-data-service/** - - .github/workflows/app.person-faste-data-service.yml + - "plugins/**" + - "libs/data-transfer-objects/**" + - "libs/reactive-core/**" + - "libs/reactive-security/**" + - "apps/person-faste-data-service/**" + - ".github/workflows/app.person-faste-data-service.yml" jobs: workflow: diff --git a/.github/workflows/app.person-organisasjon-tilgang-service.yml b/.github/workflows/app.person-organisasjon-tilgang-service.yml index e5976bee414..1b084267e6c 100644 --- a/.github/workflows/app.person-organisasjon-tilgang-service.yml +++ b/.github/workflows/app.person-organisasjon-tilgang-service.yml @@ -3,12 +3,13 @@ name: person-organisasjon-tilgang-service on: push: paths: - - libs/integration-test - - libs/reactive-core - - libs/reactive-security - - libs/security-core - - apps/person-organisasjon-tilgang-service/** - - .github/workflows/app.person-organisasjon-tilgang-service.yml + - "plugins/**" + - "libs/integration-test/**" + - "libs/reactive-core/**" + - "libs/reactive-security/**" + - "libs/security-core/**" + - "apps/person-organisasjon-tilgang-service/**" + - ".github/workflows/app.person-organisasjon-tilgang-service.yml" jobs: workflow: diff --git a/.github/workflows/app.person-search-service.yml b/.github/workflows/app.person-search-service.yml index f62702c4f0d..698519acab6 100644 --- a/.github/workflows/app.person-search-service.yml +++ b/.github/workflows/app.person-search-service.yml @@ -3,13 +3,14 @@ name: person-search-service on: push: paths: - - libs/data-transfer-objects - - libs/reactive-core - - libs/security-core - - libs/servlet-core - - libs/servlet-security - - apps/person-search-service/** - - .github/workflows/app.person-search-service.yml + - "plugins/**" + - "libs/data-transfer-objects/**" + - "libs/reactive-core/**" + - "libs/security-core/**" + - "libs/servlet-core/**" + - "libs/servlet-security/**" + - "apps/person-search-service/**" + - ".github/workflows/app.person-search-service.yml" jobs: workflow: diff --git a/.github/workflows/app.person-service.yml b/.github/workflows/app.person-service.yml index 5ca03046837..5b67b219091 100644 --- a/.github/workflows/app.person-service.yml +++ b/.github/workflows/app.person-service.yml @@ -3,14 +3,15 @@ name: person-service on: push: paths: - - libs/commands - - libs/data-transfer-objects - - libs/reactive-core - - libs/security-core - - libs/servlet-core - - libs/servlet-security - - apps/person-service/** - - .github/workflows/app.person-service.yml + - "plugins/**" + - "libs/commands/**" + - "libs/data-transfer-objects/**" + - "libs/reactive-core/**" + - "libs/security-core/**" + - "libs/servlet-core/**" + - "libs/servlet-security/**" + - "apps/person-service/**" + - ".github/workflows/app.person-service.yml" jobs: workflow: diff --git a/.github/workflows/app.profil-api.yml b/.github/workflows/app.profil-api.yml index 52be5e8d0f2..a7340986b6f 100644 --- a/.github/workflows/app.profil-api.yml +++ b/.github/workflows/app.profil-api.yml @@ -3,13 +3,14 @@ name: profil-api on: push: paths: - - libs/data-transfer-objects - - libs/reactive-core - - libs/security-core - - libs/servlet-core - - libs/servlet-security - - apps/profil-api/** - - .github/workflows/app.profil-api.yml + - "plugins/**" + - "libs/data-transfer-objects/**" + - "libs/reactive-core/**" + - "libs/security-core/**" + - "libs/servlet-core/**" + - "libs/servlet-security/**" + - "apps/profil-api/**" + - ".github/workflows/app.profil-api.yml" jobs: workflow: diff --git a/.github/workflows/app.skattekort-service.yml b/.github/workflows/app.skattekort-service.yml index 363346f819b..62d3b5ea777 100644 --- a/.github/workflows/app.skattekort-service.yml +++ b/.github/workflows/app.skattekort-service.yml @@ -3,12 +3,13 @@ name: skattekort-service on: push: paths: - - libs/reactive-core - - libs/reactive-security - - libs/security-core - - libs/data-transfer-objects - - apps/skattekort-service/** - - .github/workflows/app.skattekort-service.yml + - "plugins/**" + - "libs/reactive-core/**" + - "libs/reactive-security/**" + - "libs/security-core/**" + - "libs/data-transfer-objects/**" + - "apps/skattekort-service/**" + - ".github/workflows/app.skattekort-service.yml" jobs: workflow: diff --git a/.github/workflows/app.sykemelding-api.yml b/.github/workflows/app.sykemelding-api.yml index e0c753fa319..13b32b61caa 100644 --- a/.github/workflows/app.sykemelding-api.yml +++ b/.github/workflows/app.sykemelding-api.yml @@ -3,11 +3,12 @@ name: sykemelding-api on: push: paths: - - libs/avro-schema - - libs/data-transfer-objects - - libs/servlet-core - - apps/sykemelding-api/** - - .github/workflows/app.sykemelding-api.yml + - "plugins/**" + - "libs/avro-schema/**" + - "libs/data-transfer-objects/**" + - "libs/servlet-core/**" + - "apps/sykemelding-api/**" + - ".github/workflows/app.sykemelding-api.yml" jobs: workflow: diff --git a/.github/workflows/app.synt-sykemelding-api.yml b/.github/workflows/app.synt-sykemelding-api.yml index 02c11f0cf9c..a9dd896a2d1 100644 --- a/.github/workflows/app.synt-sykemelding-api.yml +++ b/.github/workflows/app.synt-sykemelding-api.yml @@ -3,14 +3,15 @@ name: synt-sykemelding-api on: push: paths: - - libs/commands - - libs/data-transfer-objects - - libs/reactive-core - - libs/servlet-core - - libs/servlet-security - - libs/testing - - apps/synt-sykemelding-api/** - - .github/workflows/app.synt-sykemelding-api.yml + - "plugins/**" + - "libs/commands/**" + - "libs/data-transfer-objects/**" + - "libs/reactive-core/**" + - "libs/servlet-core/**" + - "libs/servlet-security/**" + - "libs/testing/**" + - "apps/synt-sykemelding-api/**" + - ".github/workflows/app.synt-sykemelding-api.yml" jobs: workflow: diff --git a/.github/workflows/app.synt-vedtakshistorikk-service.yml b/.github/workflows/app.synt-vedtakshistorikk-service.yml index 6859c17f98f..d9ec5a49d8b 100644 --- a/.github/workflows/app.synt-vedtakshistorikk-service.yml +++ b/.github/workflows/app.synt-vedtakshistorikk-service.yml @@ -3,14 +3,15 @@ name: synt-vedtakshistorikk-service on: push: paths: - - libs/data-transfer-objects - - libs/domain - - libs/security-core - - libs/servlet-core - - libs/servlet-insecure-security - - libs/servlet-security - - apps/synt-vedtakshistorikk-service/** - - .github/workflows/app.synt-vedtakshistorikk-service.yml + - "plugins/**" + - "libs/data-transfer-objects/**" + - "libs/domain/**" + - "libs/security-core/**" + - "libs/servlet-core/**" + - "libs/servlet-insecure-security/**" + - "libs/servlet-security/**" + - "apps/synt-vedtakshistorikk-service/**" + - ".github/workflows/app.synt-vedtakshistorikk-service.yml" jobs: workflow: diff --git a/.github/workflows/app.team-dolly-lokal-app.yml b/.github/workflows/app.team-dolly-lokal-app.yml index e773ca59994..ad84bfd3851 100644 --- a/.github/workflows/app.team-dolly-lokal-app.yml +++ b/.github/workflows/app.team-dolly-lokal-app.yml @@ -3,8 +3,9 @@ name: team-dolly-lokal-app on: push: paths: - - .nais/team-dolly-lokal-app.yml - - .github/workflows/app.team-dolly-lokal-app.yml + - "plugins/**" + - ".nais/team-dolly-lokal-app.yml" + - ".github/workflows/app.team-dolly-lokal-app.yml" jobs: deploy: diff --git a/.github/workflows/app.tenor-search-service.yml b/.github/workflows/app.tenor-search-service.yml index 0daf67eb2f2..605fb49954d 100644 --- a/.github/workflows/app.tenor-search-service.yml +++ b/.github/workflows/app.tenor-search-service.yml @@ -3,12 +3,13 @@ name: tenor-search-service on: push: paths: - - libs/integration-test - - libs/reactive-core - - libs/reactive-security - - libs/security-core - - apps/tenor-search-service/** - - .github/workflows/app.tenor-search-service.yml + - "plugins/**" + - "libs/integration-test/**" + - "libs/reactive-core/**" + - "libs/reactive-security/**" + - "libs/security-core/**" + - "apps/tenor-search-service/**" + - ".github/workflows/app.tenor-search-service.yml" jobs: workflow: diff --git a/.github/workflows/app.testnav-ident-pool.yml b/.github/workflows/app.testnav-ident-pool.yml index dbe8b61277d..7515d6b8b31 100644 --- a/.github/workflows/app.testnav-ident-pool.yml +++ b/.github/workflows/app.testnav-ident-pool.yml @@ -3,14 +3,15 @@ name: testnav-ident-pool on: push: paths: - - libs/database - - libs/security-core - - libs/servlet-core - - libs/servlet-insecure-security - - libs/servlet-security - - libs/testing - - apps/testnav-ident-pool/** - - .github/workflows/app.testnav-ident-pool.yml + - "plugins/**" + - "libs/database/**" + - "libs/security-core/**" + - "libs/servlet-core/**" + - "libs/servlet-insecure-security/**" + - "libs/servlet-security/**" + - "libs/testing/**" + - "apps/testnav-ident-pool/**" + - ".github/workflows/app.testnav-ident-pool.yml" jobs: workflow: diff --git a/.github/workflows/app.testnorge-statisk-data-forvalter.yml b/.github/workflows/app.testnorge-statisk-data-forvalter.yml index aa71a077e87..da24fffbf50 100644 --- a/.github/workflows/app.testnorge-statisk-data-forvalter.yml +++ b/.github/workflows/app.testnorge-statisk-data-forvalter.yml @@ -3,19 +3,20 @@ name: testnorge-statisk-data-forvalter on: push: paths: - - libs/avro-schema - - libs/commands - - libs/csv-converter - - libs/data-transfer-objects - - libs/database - - libs/kafka-config - - libs/kafka-producers - - libs/security-core - - libs/servlet-core - - libs/servlet-security - - libs/testing - - apps/testnorge-statisk-data-forvalter/** - - .github/workflows/app.testnorge-statisk-data-forvalter.yml + - "plugins/**" + - "libs/avro-schema/**" + - "libs/commands/**" + - "libs/csv-converter/**" + - "libs/data-transfer-objects/**" + - "libs/database/**" + - "libs/kafka-config/**" + - "libs/kafka-producers/**" + - "libs/security-core/**" + - "libs/servlet-core/**" + - "libs/servlet-security/**" + - "libs/testing/**" + - "apps/testnorge-statisk-data-forvalter/**" + - ".github/workflows/app.testnorge-statisk-data-forvalter.yml" jobs: workflow: diff --git a/.github/workflows/app.tilbakemelding-api.yml b/.github/workflows/app.tilbakemelding-api.yml index 3797097f960..eed207fbb99 100644 --- a/.github/workflows/app.tilbakemelding-api.yml +++ b/.github/workflows/app.tilbakemelding-api.yml @@ -3,14 +3,15 @@ name: tilbakemelding-api on: push: paths: - - libs/data-transfer-objects - - libs/reactive-core - - libs/security-core - - libs/servlet-core - - libs/servlet-security - - libs/slack - - apps/tilbakemelding-api/** - - .github/workflows/app.tilbakemelding-api.yml + - "plugins/**" + - "libs/data-transfer-objects/**" + - "libs/reactive-core/**" + - "libs/security-core/**" + - "libs/servlet-core/**" + - "libs/servlet-security/**" + - "libs/slack/**" + - "apps/tilbakemelding-api/**" + - ".github/workflows/app.tilbakemelding-api.yml" jobs: workflow: diff --git a/.github/workflows/app.tps-messaging-service.yml b/.github/workflows/app.tps-messaging-service.yml index b360d30d016..050e30682e1 100644 --- a/.github/workflows/app.tps-messaging-service.yml +++ b/.github/workflows/app.tps-messaging-service.yml @@ -3,13 +3,14 @@ name: tps-messaging-service on: push: paths: - - libs/data-transfer-objects - - libs/data-transfer-search-objects - - libs/security-core - - libs/servlet-core - - libs/servlet-security - - apps/tps-messaging-service/** - - .github/workflows/app.tps-messaging-service.yml + - "plugins/**" + - "libs/data-transfer-objects/**" + - "libs/data-transfer-search-objects/**" + - "libs/security-core/**" + - "libs/servlet-core/**" + - "libs/servlet-security/**" + - "apps/tps-messaging-service/**" + - ".github/workflows/app.tps-messaging-service.yml" jobs: workflow: diff --git a/.github/workflows/app.udi-stub.yml b/.github/workflows/app.udi-stub.yml index c88b7a6f023..839be1717ae 100644 --- a/.github/workflows/app.udi-stub.yml +++ b/.github/workflows/app.udi-stub.yml @@ -3,12 +3,13 @@ name: testnav-udi-stub on: push: paths: - - libs/data-transfer-objects - - libs/database - - libs/servlet-core - - libs/servlet-security - - apps/udi-stub/** - - .github/workflows/app.udi-stub.yml + - "plugins/**" + - "libs/data-transfer-objects/**" + - "libs/database/**" + - "libs/servlet-core/**" + - "libs/servlet-security/**" + - "apps/udi-stub/**" + - ".github/workflows/app.udi-stub.yml" jobs: workflow: diff --git a/.github/workflows/app.varslinger-service.yml b/.github/workflows/app.varslinger-service.yml index f4a5ce1f473..c49f1803c97 100644 --- a/.github/workflows/app.varslinger-service.yml +++ b/.github/workflows/app.varslinger-service.yml @@ -3,13 +3,14 @@ name: varslinger-service on: push: paths: - - libs/data-transfer-objects - - libs/database - - libs/security-core - - libs/servlet-core - - libs/servlet-security - - apps/varslinger-service/** - - .github/workflows/app.varslinger-service.yml + - "plugins/**" + - "libs/data-transfer-objects/**" + - "libs/database/**" + - "libs/security-core/**" + - "libs/servlet-core/**" + - "libs/servlet-security/**" + - "apps/varslinger-service/**" + - ".github/workflows/app.varslinger-service.yml" jobs: workflow: diff --git a/.github/workflows/lib.commands.yml b/.github/workflows/lib.commands.yml index 024386b48f7..7115336e368 100644 --- a/.github/workflows/lib.commands.yml +++ b/.github/workflows/lib.commands.yml @@ -3,8 +3,9 @@ name: commands on: push: paths: - - libs/commands/** - - .github/workflows/lib.commands.yml + - "plugins/**" + - "libs/commands/**" + - ".github/workflows/lib.commands.yml" jobs: workflow: diff --git a/.github/workflows/lib.csv-converter.yml b/.github/workflows/lib.csv-converter.yml index cd135c78b2e..898d42e0dc8 100644 --- a/.github/workflows/lib.csv-converter.yml +++ b/.github/workflows/lib.csv-converter.yml @@ -3,8 +3,9 @@ name: csv-converter on: push: paths: - - libs/csv-converter/** - - .github/workflows/lib.csv-converter.yml + - "plugins/**" + - "libs/csv-converter/**" + - ".github/workflows/lib.csv-converter.yml" jobs: workflow: diff --git a/.github/workflows/lib.data-transfer-objects.yml b/.github/workflows/lib.data-transfer-objects.yml index 34cb149eca6..d7283b39865 100644 --- a/.github/workflows/lib.data-transfer-objects.yml +++ b/.github/workflows/lib.data-transfer-objects.yml @@ -3,8 +3,9 @@ name: data-transfer-objects on: push: paths: - - libs/data-transfer-objects/** - - .github/workflows/lib.data-transfer-objects.yml + - "plugins/**" + - "libs/data-transfer-objects/**" + - ".github/workflows/lib.data-transfer-objects.yml" jobs: workflow: diff --git a/.github/workflows/lib.domain.yml b/.github/workflows/lib.domain.yml index c0accda3d06..422aa567082 100644 --- a/.github/workflows/lib.domain.yml +++ b/.github/workflows/lib.domain.yml @@ -3,8 +3,9 @@ name: domain on: push: paths: - - libs/domain/** - - .github/workflows/lib.domain.yml + - "plugins/**" + - "libs/domain/**" + - ".github/workflows/lib.domain.yml" jobs: workflow: diff --git a/.github/workflows/lib.frontend.dolly-assets.yml b/.github/workflows/lib.frontend.dolly-assets.yml index d918815ada6..604ffdf93c4 100644 --- a/.github/workflows/lib.frontend.dolly-assets.yml +++ b/.github/workflows/lib.frontend.dolly-assets.yml @@ -3,8 +3,9 @@ name: dolly-assets on: push: paths: - - navikt/dolly-assets/** - - .github/workflows/lib.frontend.dolly-assets.yml + - "plugins/**" + - "navikt/dolly-assets/**" + - ".github/workflows/lib.frontend.dolly-assets.yml" jobs: workflow: diff --git a/.github/workflows/lib.frontend.dolly-komponenter.yml b/.github/workflows/lib.frontend.dolly-komponenter.yml index 4ada60ac058..45096b00099 100644 --- a/.github/workflows/lib.frontend.dolly-komponenter.yml +++ b/.github/workflows/lib.frontend.dolly-komponenter.yml @@ -3,8 +3,9 @@ name: dolly-komponenter on: push: paths: - - navikt/dolly-komponenter/** - - .github/workflows/lib.frontend.dolly-komponenter.yml + - "plugins/**" + - "navikt/dolly-komponenter/**" + - ".github/workflows/lib.frontend.dolly-komponenter.yml" jobs: workflow: diff --git a/.github/workflows/lib.frontend.dolly-lib.yml b/.github/workflows/lib.frontend.dolly-lib.yml index 674fb2d881c..eda40519a67 100644 --- a/.github/workflows/lib.frontend.dolly-lib.yml +++ b/.github/workflows/lib.frontend.dolly-lib.yml @@ -3,8 +3,9 @@ name: dolly-lib on: push: paths: - - navikt/dolly-lib/** - - .github/workflows/lib.frontend.dolly-lib.yml + - "plugins/**" + - "navikt/dolly-lib/**" + - ".github/workflows/lib.frontend.dolly-lib.yml" jobs: workflow: diff --git a/.github/workflows/lib.integration-test.yml b/.github/workflows/lib.integration-test.yml index 479fc9cefcd..73a09e6dfe2 100644 --- a/.github/workflows/lib.integration-test.yml +++ b/.github/workflows/lib.integration-test.yml @@ -3,8 +3,9 @@ name: integration-test on: push: paths: - - libs/integration-test/** - - .github/workflows/lib.reactive-core.yml + - "plugins/**" + - "libs/integration-test/**" + - ".github/workflows/lib.reactive-core.yml" jobs: workflow: diff --git a/.github/workflows/lib.kafka-config.yml b/.github/workflows/lib.kafka-config.yml index 542bb5ece3b..be268145d34 100644 --- a/.github/workflows/lib.kafka-config.yml +++ b/.github/workflows/lib.kafka-config.yml @@ -3,8 +3,9 @@ name: kafka-config on: push: paths: - - libs/kafka-config/** - - .github/workflows/lib.kafka-config.yml + - "plugins/**" + - "libs/kafka-config/**" + - ".github/workflows/lib.kafka-config.yml" jobs: workflow: diff --git a/.github/workflows/lib.kafka-producers.yml b/.github/workflows/lib.kafka-producers.yml index cc8ccb27a49..dc44a2b2ca0 100644 --- a/.github/workflows/lib.kafka-producers.yml +++ b/.github/workflows/lib.kafka-producers.yml @@ -3,8 +3,9 @@ name: kafka-producers on: push: paths: - - libs/kafka-producers/** - - .github/workflows/lib.kafka-producers.yml + - "plugins/**" + - "libs/kafka-producers/**" + - ".github/workflows/lib.kafka-producers.yml" jobs: workflow: diff --git a/.github/workflows/lib.reactive-core.yml b/.github/workflows/lib.reactive-core.yml index b9a701d1e43..64947e77919 100644 --- a/.github/workflows/lib.reactive-core.yml +++ b/.github/workflows/lib.reactive-core.yml @@ -3,8 +3,9 @@ name: reactive-core on: push: paths: - - libs/reactive-core/** - - .github/workflows/lib.reactive-core.yml + - "plugins/**" + - "libs/reactive-core/**" + - ".github/workflows/lib.reactive-core.yml" jobs: workflow: diff --git a/.github/workflows/lib.reactive-frontend.yml b/.github/workflows/lib.reactive-frontend.yml index 4f92ae87e1b..a5382a0a6b4 100644 --- a/.github/workflows/lib.reactive-frontend.yml +++ b/.github/workflows/lib.reactive-frontend.yml @@ -3,8 +3,9 @@ name: reactive-frontend on: push: paths: - - libs/reactive-frontend/** - - .github/workflows/lib.reactive-frontend.yml + - "plugins/**" + - "libs/reactive-frontend/**" + - ".github/workflows/lib.reactive-frontend.yml" jobs: workflow: diff --git a/.github/workflows/lib.reactive-proxy.yml b/.github/workflows/lib.reactive-proxy.yml index e01b695b0fc..83dc7f8aeaf 100644 --- a/.github/workflows/lib.reactive-proxy.yml +++ b/.github/workflows/lib.reactive-proxy.yml @@ -3,8 +3,9 @@ name: reactive-proxy on: push: paths: - - libs/reactive-proxy/** - - .github/workflows/lib.reactive-proxy.yml + - "plugins/**" + - "libs/reactive-proxy/**" + - ".github/workflows/lib.reactive-proxy.yml" jobs: workflow: diff --git a/.github/workflows/lib.reactive-security.yml b/.github/workflows/lib.reactive-security.yml index 3c287c5ad0a..346382bdffb 100644 --- a/.github/workflows/lib.reactive-security.yml +++ b/.github/workflows/lib.reactive-security.yml @@ -3,8 +3,9 @@ name: reactive-security on: push: paths: - - libs/reactive-security/** - - .github/workflows/lib.reactive-security.yml + - "plugins/**" + - "libs/reactive-security/**" + - ".github/workflows/lib.reactive-security.yml" jobs: workflow: diff --git a/.github/workflows/lib.reactive-session-security.yml b/.github/workflows/lib.reactive-session-security.yml index f9a633266bb..901b2a4782a 100644 --- a/.github/workflows/lib.reactive-session-security.yml +++ b/.github/workflows/lib.reactive-session-security.yml @@ -3,8 +3,9 @@ name: reactive-session-security on: push: paths: - - libs/reactive-session-security/** - - .github/workflows/lib.reactive-session-security.yml + - "plugins/**" + - "libs/reactive-session-security/**" + - ".github/workflows/lib.reactive-session-security.yml" jobs: workflow: diff --git a/.github/workflows/lib.security-core.yml b/.github/workflows/lib.security-core.yml index 7a5faa7cb11..648ef119ad6 100644 --- a/.github/workflows/lib.security-core.yml +++ b/.github/workflows/lib.security-core.yml @@ -3,8 +3,9 @@ name: security-core on: push: paths: - - libs/security-core/** - - .github/workflows/lib.security-core.yml + - "plugins/**" + - "libs/security-core/**" + - ".github/workflows/lib.security-core.yml" jobs: workflow: diff --git a/.github/workflows/lib.security-token-service.yml b/.github/workflows/lib.security-token-service.yml index ed95e46fb93..cc2e0c51e4e 100644 --- a/.github/workflows/lib.security-token-service.yml +++ b/.github/workflows/lib.security-token-service.yml @@ -3,8 +3,9 @@ name: security-token-service on: push: paths: - - libs/security-token-service/** - - .github/workflows/lib.security-token-service.yml + - "plugins/**" + - "libs/security-token-service/**" + - ".github/workflows/lib.security-token-service.yml" jobs: workflow: diff --git a/.github/workflows/lib.servlet-core.yml b/.github/workflows/lib.servlet-core.yml index ec24d7bc64c..0ac58e20331 100644 --- a/.github/workflows/lib.servlet-core.yml +++ b/.github/workflows/lib.servlet-core.yml @@ -3,8 +3,9 @@ name: servlet-core on: push: paths: - - libs/servlet-core/** - - .github/workflows/lib.servlet-core.yml + - "plugins/**" + - "libs/servlet-core/**" + - ".github/workflows/lib.servlet-core.yml" jobs: workflow: diff --git a/.github/workflows/lib.servlet-insecure-security.yml b/.github/workflows/lib.servlet-insecure-security.yml index a1f69cfa306..7d1765056a9 100644 --- a/.github/workflows/lib.servlet-insecure-security.yml +++ b/.github/workflows/lib.servlet-insecure-security.yml @@ -3,8 +3,9 @@ name: servlet-insecure-security on: push: paths: - - libs/servlet-insecure-security/** - - .github/workflows/lib.servlet-insecure-security.yml + - "plugins/**" + - "libs/servlet-insecure-security/**" + - ".github/workflows/lib.servlet-insecure-security.yml" jobs: workflow: diff --git a/.github/workflows/lib.servlet-security.yml b/.github/workflows/lib.servlet-security.yml index 534b8bd2364..9d33fe1daa1 100644 --- a/.github/workflows/lib.servlet-security.yml +++ b/.github/workflows/lib.servlet-security.yml @@ -3,8 +3,9 @@ name: servlet-security on: push: paths: - - libs/servlet-security/** - - .github/workflows/lib.commanservlet-securityds.yml + - "plugins/**" + - "libs/servlet-security/**" + - ".github/workflows/lib.commanservlet-securityds.yml" jobs: workflow: diff --git a/.github/workflows/lib.testing.yml b/.github/workflows/lib.testing.yml index 14f45d07c62..b36dadd3207 100644 --- a/.github/workflows/lib.testing.yml +++ b/.github/workflows/lib.testing.yml @@ -3,8 +3,9 @@ name: testing on: push: paths: - - libs/testing/** - - .github/workflows/lib.testing.yml + - "plugins/**" + - "libs/testing/**" + - ".github/workflows/lib.testing.yml" jobs: workflow: diff --git a/.github/workflows/proxy.aareg-proxy.yml b/.github/workflows/proxy.aareg-proxy.yml index 632e76c7e4a..310feaaf51e 100644 --- a/.github/workflows/proxy.aareg-proxy.yml +++ b/.github/workflows/proxy.aareg-proxy.yml @@ -3,12 +3,13 @@ name: aareg-proxy on: push: paths: - - libs/reactive-core - - libs/reactive-proxy - - libs/reactive-security - - libs/security-core - - proxies/aareg-proxy/** - - .github/workflows/proxy.aareg-proxy.yml + - "plugins/**" + - "libs/reactive-core/**" + - "libs/reactive-proxy/**" + - "libs/reactive-security/**" + - "libs/security-core/**" + - "proxies/aareg-proxy/**" + - ".github/workflows/proxy.aareg-proxy.yml" jobs: workflow: diff --git a/.github/workflows/proxy.aareg-synt-services-proxy.yml b/.github/workflows/proxy.aareg-synt-services-proxy.yml index 0e22fc20172..b20b48512a8 100644 --- a/.github/workflows/proxy.aareg-synt-services-proxy.yml +++ b/.github/workflows/proxy.aareg-synt-services-proxy.yml @@ -3,10 +3,11 @@ name: aareg-synt-services-proxy on: push: paths: - - libs/reactive-core - - libs/reactive-proxy - - proxies/aareg-synt-services-proxy/** - - .github/workflows/proxy.aareg-synt-services-proxy.yml + - "plugins/**" + - "libs/reactive-core/**" + - "libs/reactive-proxy/**" + - "proxies/aareg-synt-services-proxy/**" + - ".github/workflows/proxy.aareg-synt-services-proxy.yml" jobs: workflow: diff --git a/.github/workflows/proxy.arbeidsplassencv-proxy.yml b/.github/workflows/proxy.arbeidsplassencv-proxy.yml index e77751fec2b..4db4cf9de2b 100644 --- a/.github/workflows/proxy.arbeidsplassencv-proxy.yml +++ b/.github/workflows/proxy.arbeidsplassencv-proxy.yml @@ -3,12 +3,13 @@ name: arbeidsplassencv-proxy on: push: paths: - - libs/reactive-core - - libs/reactive-proxy - - libs/reactive-security - - libs/security-core - - proxies/arbeidsplassencv-proxy/** - - .github/workflows/proxy.arbeidsplassencv-proxy.yml + - "plugins/**" + - "libs/reactive-core/**" + - "libs/reactive-proxy/**" + - "libs/reactive-security/**" + - "libs/security-core/**" + - "proxies/arbeidsplassencv-proxy/**" + - ".github/workflows/proxy.arbeidsplassencv-proxy.yml" jobs: workflow: diff --git a/.github/workflows/proxy.arena-forvalteren-proxy.yml b/.github/workflows/proxy.arena-forvalteren-proxy.yml index 4331b3f2b5f..a3e53ad65a2 100644 --- a/.github/workflows/proxy.arena-forvalteren-proxy.yml +++ b/.github/workflows/proxy.arena-forvalteren-proxy.yml @@ -3,10 +3,11 @@ name: arena-forvalteren-proxy on: push: paths: - - libs/reactive-core - - libs/reactive-proxy - - proxies/arena-forvalteren-proxy/** - - .github/workflows/proxy.arena-forvalteren-proxy.yml + - "plugins/**" + - "libs/reactive-core/**" + - "libs/reactive-proxy/**" + - "proxies/arena-forvalteren-proxy/**" + - ".github/workflows/proxy.arena-forvalteren-proxy.yml" jobs: workflow: diff --git a/.github/workflows/proxy.batch-adeo-proxy.yml b/.github/workflows/proxy.batch-adeo-proxy.yml index 9d791c38e8c..c7c2952893d 100644 --- a/.github/workflows/proxy.batch-adeo-proxy.yml +++ b/.github/workflows/proxy.batch-adeo-proxy.yml @@ -3,10 +3,11 @@ name: batch-adeo-proxy on: push: paths: - - libs/reactive-core - - libs/reactive-proxy - - proxies/batch-adeo-proxy/** - - .github/workflows/proxy.batch-adeo-proxy.yml + - "plugins/**" + - "libs/reactive-core/**" + - "libs/reactive-proxy/**" + - "proxies/batch-adeo-proxy/**" + - ".github/workflows/proxy.batch-adeo-proxy.yml" jobs: workflow: diff --git a/.github/workflows/proxy.brregstub-proxy.yml b/.github/workflows/proxy.brregstub-proxy.yml index ab04f705939..00473425265 100644 --- a/.github/workflows/proxy.brregstub-proxy.yml +++ b/.github/workflows/proxy.brregstub-proxy.yml @@ -3,10 +3,11 @@ name: brregstub-proxy on: push: paths: - - libs/reactive-core - - libs/reactive-proxy - - proxies/brregstub-proxy/** - - .github/workflows/proxy.brregstub-proxy.yml + - "plugins/**" + - "libs/reactive-core/**" + - "libs/reactive-proxy/**" + - "proxies/brregstub-proxy/**" + - ".github/workflows/proxy.brregstub-proxy.yml" jobs: workflow: diff --git a/.github/workflows/proxy.dokarkiv-proxy.yml b/.github/workflows/proxy.dokarkiv-proxy.yml index 80ee3cc0234..e3ff33da84b 100644 --- a/.github/workflows/proxy.dokarkiv-proxy.yml +++ b/.github/workflows/proxy.dokarkiv-proxy.yml @@ -3,12 +3,13 @@ name: dokarkiv-proxy on: push: paths: - - libs/reactive-core - - libs/reactive-proxy - - libs/reactive-security - - libs/security-core - - proxies/dokarkiv-proxy/** - - .github/workflows/proxy.dokarkiv-proxy.yml + - "plugins/**" + - "libs/reactive-core/**" + - "libs/reactive-proxy/**" + - "libs/reactive-security/**" + - "libs/security-core/**" + - "proxies/dokarkiv-proxy/**" + - ".github/workflows/proxy.dokarkiv-proxy.yml" jobs: workflow: diff --git a/.github/workflows/proxy.ereg-proxy.yml b/.github/workflows/proxy.ereg-proxy.yml index a197a017fe1..bd107d2487a 100644 --- a/.github/workflows/proxy.ereg-proxy.yml +++ b/.github/workflows/proxy.ereg-proxy.yml @@ -3,10 +3,11 @@ name: ereg-proxy on: push: paths: - - libs/reactive-core - - libs/reactive-proxy - - proxies/ereg-proxy/** - - .github/workflows/proxy.ereg-proxy.yml + - "plugins/**" + - "libs/reactive-core/**" + - "libs/reactive-proxy/**" + - "proxies/ereg-proxy/**" + - ".github/workflows/proxy.ereg-proxy.yml" jobs: workflow: diff --git a/.github/workflows/proxy.histark-proxy.yml b/.github/workflows/proxy.histark-proxy.yml index 046bc8be64e..0bdd1bef3d7 100644 --- a/.github/workflows/proxy.histark-proxy.yml +++ b/.github/workflows/proxy.histark-proxy.yml @@ -3,10 +3,11 @@ name: histark-proxy on: push: paths: - - libs/reactive-core - - libs/reactive-proxy - - proxies/histark-proxy/** - - .github/workflows/proxy.histark-proxy.yml + - "plugins/**" + - "libs/reactive-core/**" + - "libs/reactive-proxy/**" + - "proxies/histark-proxy/**" + - ".github/workflows/proxy.histark-proxy.yml" jobs: workflow: diff --git a/.github/workflows/proxy.inntektstub-proxy.yml b/.github/workflows/proxy.inntektstub-proxy.yml index e73bfc8e7c9..14da83bedaf 100644 --- a/.github/workflows/proxy.inntektstub-proxy.yml +++ b/.github/workflows/proxy.inntektstub-proxy.yml @@ -3,10 +3,11 @@ name: inntektstub-proxy on: push: paths: - - libs/reactive-core - - libs/reactive-proxy - - proxies/inntektstub-proxy/** - - .github/workflows/proxy.inntektstub-proxy.yml + - "plugins/**" + - "libs/reactive-core/**" + - "libs/reactive-proxy/**" + - "proxies/inntektstub-proxy/**" + - ".github/workflows/proxy.inntektstub-proxy.yml" jobs: workflow: diff --git a/.github/workflows/proxy.inst-proxy.yml b/.github/workflows/proxy.inst-proxy.yml index 39cbe07c379..f16a905983e 100644 --- a/.github/workflows/proxy.inst-proxy.yml +++ b/.github/workflows/proxy.inst-proxy.yml @@ -3,10 +3,11 @@ name: inst-proxy on: push: paths: - - libs/reactive-core - - libs/reactive-proxy - - proxies/inst-proxy/** - - .github/workflows/proxy.inst-proxy.yml + - "plugins/**" + - "libs/reactive-core/**" + - "libs/reactive-proxy/**" + - "proxies/inst-proxy/**" + - ".github/workflows/proxy.inst-proxy.yml" jobs: workflow: diff --git a/.github/workflows/proxy.kontoregister-person-proxy.yml b/.github/workflows/proxy.kontoregister-person-proxy.yml index d2290ff5e0f..920ddc0d4f3 100644 --- a/.github/workflows/proxy.kontoregister-person-proxy.yml +++ b/.github/workflows/proxy.kontoregister-person-proxy.yml @@ -3,12 +3,13 @@ name: kontoregister-person-proxy on: push: paths: - - libs/reactive-core - - libs/reactive-proxy - - libs/reactive-security - - libs/security-core - - proxies/kontoregister-person-proxy/** - - .github/workflows/proxy.kontoregister-person-proxy.yml + - "plugins/**" + - "libs/reactive-core/**" + - "libs/reactive-proxy/**" + - "libs/reactive-security/**" + - "libs/security-core/**" + - "proxies/kontoregister-person-proxy/**" + - ".github/workflows/proxy.kontoregister-person-proxy.yml" jobs: workflow: diff --git a/.github/workflows/proxy.krrstub-proxy.yml b/.github/workflows/proxy.krrstub-proxy.yml index 3ede6c3da23..c76a656f36f 100644 --- a/.github/workflows/proxy.krrstub-proxy.yml +++ b/.github/workflows/proxy.krrstub-proxy.yml @@ -3,12 +3,13 @@ name: krrstub-proxy on: push: paths: - - libs/reactive-core - - libs/reactive-proxy - - libs/reactive-security - - libs/security-core - - proxies/krrstub-proxy/** - - .github/workflows/proxy.krrstub-proxy.yml + - "plugins/**" + - "libs/reactive-core/**" + - "libs/reactive-proxy/**" + - "libs/reactive-security/**" + - "libs/security-core/**" + - "proxies/krrstub-proxy/**" + - ".github/workflows/proxy.krrstub-proxy.yml" jobs: workflow: diff --git a/.github/workflows/proxy.medl-proxy.yml b/.github/workflows/proxy.medl-proxy.yml index 43ec423a15e..837b047ee19 100644 --- a/.github/workflows/proxy.medl-proxy.yml +++ b/.github/workflows/proxy.medl-proxy.yml @@ -3,14 +3,15 @@ name: medl-proxy on: push: paths: - - proxies/medl-proxy/** - - libs/servlet-core - - libs/servlet-security - - libs/servlet-insecure-security - - libs/security-core - - libs/database - - libs/data-transfer-objects - - .github/workflows/proxy.medl-proxy.yml + - "plugins/**" + - "proxies/medl-proxy/**" + - "libs/servlet-core/**" + - "libs/servlet-security/**" + - "libs/servlet-insecure-security/**" + - "libs/security-core/**" + - "libs/database/**" + - "libs/data-transfer-objects/**" + - ".github/workflows/proxy.medl-proxy.yml" jobs: workflow: diff --git a/.github/workflows/proxy.modapp-ereg-proxy.yml b/.github/workflows/proxy.modapp-ereg-proxy.yml index ec4b0b6bdb9..51cc7d2df5a 100644 --- a/.github/workflows/proxy.modapp-ereg-proxy.yml +++ b/.github/workflows/proxy.modapp-ereg-proxy.yml @@ -3,12 +3,13 @@ name: modapp-ereg-proxy on: push: paths: - - libs/reactive-core - - libs/reactive-proxy - - libs/reactive-security - - libs/security-core - - proxies/modapp-ereg-proxy/** - - .github/workflows/proxy.modapp-ereg-proxy.yml + - "plugins/**" + - "libs/reactive-core/**" + - "libs/reactive-proxy/**" + - "libs/reactive-security/**" + - "libs/security-core/**" + - "proxies/modapp-ereg-proxy/**" + - ".github/workflows/proxy.modapp-ereg-proxy.yml" jobs: workflow: diff --git a/.github/workflows/proxy.norg2-proxy.yml b/.github/workflows/proxy.norg2-proxy.yml index 8e2af7ab410..9a77d1713d7 100644 --- a/.github/workflows/proxy.norg2-proxy.yml +++ b/.github/workflows/proxy.norg2-proxy.yml @@ -3,10 +3,11 @@ name: norg2-proxy on: push: paths: - - libs/reactive-core - - libs/reactive-proxy - - proxies/norg2-proxy/** - - .github/workflows/proxy.norg2-proxy.yml + - "plugins/**" + - "libs/reactive-core/**" + - "libs/reactive-proxy/**" + - "proxies/norg2-proxy/**" + - ".github/workflows/proxy.norg2-proxy.yml" jobs: workflow: diff --git a/.github/workflows/proxy.pdl-proxy.yml b/.github/workflows/proxy.pdl-proxy.yml index d04ca65f557..ae2f5c5668e 100644 --- a/.github/workflows/proxy.pdl-proxy.yml +++ b/.github/workflows/proxy.pdl-proxy.yml @@ -3,12 +3,13 @@ name: pdl-proxy on: push: paths: - - libs/reactive-core - - libs/reactive-proxy - - libs/reactive-security - - libs/security-core - - proxies/pdl-proxy/** - - .github/workflows/proxy.pdl-proxy.yml + - "plugins/**" + - "libs/reactive-core/**" + - "libs/reactive-proxy/**" + - "libs/reactive-security/**" + - "libs/security-core/**" + - "proxies/pdl-proxy/**" + - ".github/workflows/proxy.pdl-proxy.yml" jobs: workflow: diff --git a/.github/workflows/proxy.pensjon-testdata-facade-proxy.yml b/.github/workflows/proxy.pensjon-testdata-facade-proxy.yml index 9b4fbacd883..a1c18aaf72a 100644 --- a/.github/workflows/proxy.pensjon-testdata-facade-proxy.yml +++ b/.github/workflows/proxy.pensjon-testdata-facade-proxy.yml @@ -3,12 +3,13 @@ name: pensjon-testdata-facade-proxy on: push: paths: - - libs/reactive-core - - libs/reactive-proxy - - libs/reactive-security - - libs/security-core - - proxies/pensjon-testdata-facade-proxy/** - - .github/workflows/proxy.pensjon-testdata-facade-proxy.yml + - "plugins/**" + - "libs/reactive-core/**" + - "libs/reactive-proxy/**" + - "libs/reactive-security/**" + - "libs/security-core/**" + - "proxies/pensjon-testdata-facade-proxy/**" + - ".github/workflows/proxy.pensjon-testdata-facade-proxy.yml" jobs: workflow: diff --git a/.github/workflows/proxy.saf-proxy.yml b/.github/workflows/proxy.saf-proxy.yml index 1b391d20770..689ccb6591b 100644 --- a/.github/workflows/proxy.saf-proxy.yml +++ b/.github/workflows/proxy.saf-proxy.yml @@ -3,12 +3,13 @@ name: saf-proxy on: push: paths: - - libs/reactive-core - - libs/reactive-proxy - - libs/reactive-security - - libs/security-core - - proxies/saf-proxy/** - - .github/workflows/proxy.saf-proxy.yml + - "plugins/**" + - "libs/reactive-core/**" + - "libs/reactive-proxy/**" + - "libs/reactive-security/**" + - "libs/security-core/**" + - "proxies/saf-proxy/**" + - ".github/workflows/proxy.saf-proxy.yml" jobs: workflow: diff --git a/.github/workflows/proxy.sigrunstub-proxy.yml b/.github/workflows/proxy.sigrunstub-proxy.yml index bf1c3192427..aef377a2530 100644 --- a/.github/workflows/proxy.sigrunstub-proxy.yml +++ b/.github/workflows/proxy.sigrunstub-proxy.yml @@ -3,10 +3,11 @@ name: sigrunstub-proxy on: push: paths: - - libs/reactive-core - - libs/reactive-proxy - - proxies/sigrunstub-proxy/** - - .github/workflows/proxy.sigrunstub-proxy.yml + - "plugins/**" + - "libs/reactive-core/**" + - "libs/reactive-proxy/**" + - "proxies/sigrunstub-proxy/**" + - ".github/workflows/proxy.sigrunstub-proxy.yml" jobs: workflow: diff --git a/.github/workflows/proxy.skjermingsregister-proxy.yml b/.github/workflows/proxy.skjermingsregister-proxy.yml index 75f5ee4bc6e..ddf9fbfbbf8 100644 --- a/.github/workflows/proxy.skjermingsregister-proxy.yml +++ b/.github/workflows/proxy.skjermingsregister-proxy.yml @@ -3,11 +3,12 @@ name: skjermingsregister-proxy on: push: paths: - - libs/reactive-core - - libs/reactive-proxy - - libs/security-token-service - - proxies/skjermingsregister-proxy/** - - .github/workflows/proxy.skjermingsregister-proxy.yml + - "plugins/**" + - "libs/reactive-core/**" + - "libs/reactive-proxy/**" + - "libs/security-token-service/**" + - "proxies/skjermingsregister-proxy/**" + - ".github/workflows/proxy.skjermingsregister-proxy.yml" jobs: workflow: diff --git a/.github/workflows/proxy.synthdata-meldekort-proxy.yml b/.github/workflows/proxy.synthdata-meldekort-proxy.yml index d4c0203c9b9..7e36fb74ef3 100644 --- a/.github/workflows/proxy.synthdata-meldekort-proxy.yml +++ b/.github/workflows/proxy.synthdata-meldekort-proxy.yml @@ -3,12 +3,13 @@ name: synthdata-meldekort-proxy on: push: paths: - - libs/reactive-core - - libs/reactive-proxy - - libs/reactive-security - - libs/security-core - - proxies/synthdata-meldekort-proxy/** - - .github/workflows/proxy.synthdata-meldekort-proxy.yml + - "plugins/**" + - "libs/reactive-core/**" + - "libs/reactive-proxy/**" + - "libs/reactive-security/**" + - "libs/security-core/**" + - "proxies/synthdata-meldekort-proxy/**" + - ".github/workflows/proxy.synthdata-meldekort-proxy.yml" jobs: workflow: diff --git a/.github/workflows/proxy.udistub-proxy.yml b/.github/workflows/proxy.udistub-proxy.yml index 030f7c9c4bd..79c313e5149 100644 --- a/.github/workflows/proxy.udistub-proxy.yml +++ b/.github/workflows/proxy.udistub-proxy.yml @@ -3,12 +3,13 @@ name: udistub-proxy on: push: paths: - - libs/reactive-core - - libs/reactive-proxy - - libs/reactive-security - - libs/security-core - - proxies/udistub-proxy/** - - .github/workflows/proxy.udistub-proxy.yml + - "plugins/**" + - "libs/reactive-core/**" + - "libs/reactive-proxy/**" + - "libs/reactive-security/**" + - "libs/security-core/**" + - "proxies/udistub-proxy/**" + - ".github/workflows/proxy.udistub-proxy.yml" jobs: workflow: diff --git a/.github/workflows/redis-dev.yml b/.github/workflows/redis-dev.yml index 1b457f1f5f9..039c73e4ee5 100644 --- a/.github/workflows/redis-dev.yml +++ b/.github/workflows/redis-dev.yml @@ -3,7 +3,7 @@ name: Deploy redis on: push: paths: - - '.nais/redis-dev.yml' + - ".nais/redis-dev.yml" workflow_dispatch: jobs: diff --git a/apps/adresse-service/build.gradle b/apps/adresse-service/build.gradle index 92af5f5116b..a7c60fde2e8 100644 --- a/apps/adresse-service/build.gradle +++ b/apps/adresse-service/build.gradle @@ -1,47 +1,14 @@ plugins { - id 'java' - id "org.sonarqube" version "5.0.0.4638" - id 'org.springframework.boot' version "3.2.6" - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" -} - -test { - useJUnitPlatform() - jvmArgs '--add-opens', 'java.base/java.lang=ALL-UNNAMED' + id "dolly-apps" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "navit_testnorge_adresse_service" property "sonar.projectName", "testnav-adresse-service" - property "sonar.sourceEncoding", "UTF-8" - } -} - -bootJar { - archiveFileName = "app.jar" -} - -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1' } } -repositories { - mavenCentral() - mavenLocal() -} - dependencies { implementation 'no.nav.testnav.libs:security-core' implementation 'no.nav.testnav.libs:servlet-core' @@ -50,28 +17,11 @@ dependencies { implementation 'org.springframework.boot:spring-boot-starter-security' implementation 'org.springframework.boot:spring-boot-starter-web' - implementation 'org.springframework.boot:spring-boot-starter-webflux' implementation 'org.springframework.boot:spring-boot-starter-oauth2-client' - implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' - - implementation 'io.micrometer:micrometer-registry-prometheus' - implementation 'ma.glasnost.orika:orika-core:1.5.4' - implementation 'org.hibernate.validator:hibernate-validator' - implementation 'org.aspectj:aspectjweaver:1.9.7' - - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.3.0' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.20' + implementation "ma.glasnost.orika:orika-core:$versions.orika" + implementation "org.aspectj:aspectjweaver:$versions.jweaver" - testImplementation 'org.springframework.boot:spring-boot-starter-test' - - implementation 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' -} -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } + implementation "org.springdoc:springdoc-openapi-starter-webmvc-ui:$versions.springdoc" + implementation "io.swagger.core.v3:swagger-annotations-jakarta:$versions.swagger" } diff --git a/apps/adresse-service/settings.gradle b/apps/adresse-service/settings.gradle index 53ed006ac5e..6a2058d2d50 100644 --- a/apps/adresse-service/settings.gradle +++ b/apps/adresse-service/settings.gradle @@ -4,11 +4,12 @@ plugins { rootProject.name = 'adresse-service' +includeBuild "../../plugins/java" + +includeBuild '../../libs/data-transfer-objects' includeBuild '../../libs/security-core' includeBuild '../../libs/servlet-core' includeBuild '../../libs/servlet-security' -includeBuild '../../libs/data-transfer-objects' - develocity { buildScan { diff --git a/apps/amelding-service/build.gradle b/apps/amelding-service/build.gradle index ce6f4eac045..c2a4bbf4d5f 100644 --- a/apps/amelding-service/build.gradle +++ b/apps/amelding-service/build.gradle @@ -1,47 +1,14 @@ plugins { - id 'java' - id "org.sonarqube" version "5.0.0.4638" - id 'org.springframework.boot' version "3.2.6" - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" -} - -test { - useJUnitPlatform() + id "dolly-apps" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "navit_testnorge_amelding_service" property "sonar.projectName", "testnav-amelding-service" - property "sonar.sourceEncoding", "UTF-8" - } -} - - -bootJar { - archiveFileName = "app.jar" -} - -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1' } } -repositories { - mavenCentral() - mavenLocal() -} - dependencies { implementation 'no.nav.testnav.libs:security-core' @@ -52,31 +19,13 @@ dependencies { implementation 'no.nav.testnav.libs:avro-schema' implementation 'no.nav.testnav.libs:data-transfer-objects' - implementation 'org.springframework.boot:spring-boot-starter-webflux' implementation 'org.springframework.boot:spring-boot-starter-security' implementation 'org.springframework.boot:spring-boot-starter-oauth2-client' - implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' - implementation 'org.springframework.cloud:spring-cloud-starter-bootstrap' // TODO remove legacy bootstrap config - implementation 'org.springframework.boot:spring-boot-starter-actuator' - - implementation 'io.micrometer:micrometer-registry-prometheus' - implementation 'org.hibernate.validator:hibernate-validator' - implementation 'org.springdoc:springdoc-openapi-starter-webflux-ui:2.3.0' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.20' - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' + implementation "org.springdoc:springdoc-openapi-starter-webflux-ui:$versions.springdoc" + implementation "io.swagger.core.v3:swagger-annotations-jakarta:$versions.swagger" - testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' - - implementation 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' -} -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } } diff --git a/apps/amelding-service/settings.gradle b/apps/amelding-service/settings.gradle index f895b524d00..09582fbd408 100644 --- a/apps/amelding-service/settings.gradle +++ b/apps/amelding-service/settings.gradle @@ -4,12 +4,14 @@ plugins { rootProject.name = 'amelding-service' -includeBuild '../../libs/security-core' -includeBuild '../../libs/reactive-core' -includeBuild '../../libs/reactive-security' -includeBuild '../../libs/commands' +includeBuild "../../plugins/java" + includeBuild '../../libs/avro-schema' +includeBuild '../../libs/commands' includeBuild '../../libs/data-transfer-objects' +includeBuild '../../libs/reactive-core' +includeBuild '../../libs/reactive-security' +includeBuild '../../libs/security-core' develocity { buildScan { diff --git a/apps/app-tilgang-analyse-service/build.gradle b/apps/app-tilgang-analyse-service/build.gradle index 868286dcb51..88d3ffe411e 100644 --- a/apps/app-tilgang-analyse-service/build.gradle +++ b/apps/app-tilgang-analyse-service/build.gradle @@ -1,46 +1,14 @@ plugins { - id 'java' - id "org.sonarqube" version "5.0.0.4638" - id 'org.springframework.boot' version "3.2.6" - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" -} - -test { - useJUnitPlatform() + id "dolly-apps" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "navit_testnorge_app_tilgang_analyse_service" property "sonar.projectName", "testnav-app-tilgang-analyse-service" - property "sonar.sourceEncoding", "UTF-8" - } -} - -bootJar { - archiveFileName = "app.jar" -} - -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1' } } -repositories { - mavenCentral() - mavenLocal() -} - dependencies { implementation 'no.nav.testnav.libs:reactive-core' implementation 'no.nav.testnav.libs:reactive-security' @@ -48,12 +16,8 @@ dependencies { implementation 'org.springframework.boot:spring-boot-starter-data-r2dbc' implementation 'org.springframework.boot:spring-boot-starter-security' - implementation 'org.springframework.boot:spring-boot-starter-webflux' implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server' - implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' - - implementation 'io.micrometer:micrometer-registry-prometheus' runtimeOnly 'com.h2database:h2' runtimeOnly 'org.postgresql:postgresql' implementation 'io.r2dbc:r2dbc-h2' @@ -61,19 +25,8 @@ dependencies { implementation 'org.flywaydb:flyway-core' implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-yaml' - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' - implementation 'org.springdoc:springdoc-openapi-starter-webflux-ui:2.3.0' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.20' + implementation "org.springdoc:springdoc-openapi-starter-webflux-ui:$versions.springdoc" + implementation "io.swagger.core.v3:swagger-annotations-jakarta:$versions.swagger" - testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' - - implementation 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' -} -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } } diff --git a/apps/app-tilgang-analyse-service/settings.gradle b/apps/app-tilgang-analyse-service/settings.gradle index acb9fa44e3c..9dbb9e11e77 100644 --- a/apps/app-tilgang-analyse-service/settings.gradle +++ b/apps/app-tilgang-analyse-service/settings.gradle @@ -4,9 +4,11 @@ plugins { rootProject.name = 'app-tilgang-analyse-service' +includeBuild "../../plugins/java" + +includeBuild '../../libs/data-transfer-objects' includeBuild '../../libs/reactive-core' includeBuild '../../libs/reactive-security' -includeBuild '../../libs/data-transfer-objects' develocity { buildScan { diff --git a/apps/arbeidsforhold-service/build.gradle b/apps/arbeidsforhold-service/build.gradle index 57c2b724379..089e3d8c9fc 100644 --- a/apps/arbeidsforhold-service/build.gradle +++ b/apps/arbeidsforhold-service/build.gradle @@ -1,53 +1,20 @@ plugins { - id 'java' - id "org.sonarqube" version "5.0.0.4638" - id 'org.springframework.boot' version "3.2.6" - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" -} - -test { - useJUnitPlatform() + id "dolly-apps" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnav-arbeidsforhold-service" property "sonar.projectName", "testnav-arbeidsforhold-service" - property "sonar.sourceEncoding", "UTF-8" - } -} - - -bootJar { - archiveFileName = "app.jar" -} - -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1' } } -repositories { - mavenCentral() - mavenLocal() -} - dependencies { - implementation 'com.google.guava:guava:33.2.0-jre' - implementation 'jakarta.xml.bind:jakarta.xml.bind-api:4.0.2' - implementation 'javax.activation:activation:1.1.1' - implementation 'org.glassfish.jaxb:jaxb-runtime' + implementation "com.google.guava:guava:$versions.guava" + implementation "jakarta.xml.bind:jakarta.xml.bind-api:$versions.jakartaXmlBindApi" + implementation "javax.activation:activation:$versions.javaxActivation" + implementation "org.glassfish.jaxb:jaxb-runtime:$versions.jaxb" implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-xml' implementation 'no.nav.testnav.libs:commands' @@ -57,33 +24,14 @@ dependencies { implementation 'no.nav.testnav.libs:servlet-core' implementation 'no.nav.testnav.libs:servlet-security' - implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' - implementation 'org.springframework.boot:spring-boot-starter-web' - implementation 'org.springframework.boot:spring-boot-starter-webflux' implementation 'org.springframework.boot:spring-boot-starter-oauth2-client' implementation 'org.springframework.boot:spring-boot-starter-security' implementation 'org.springframework.cloud:spring-cloud-starter-bootstrap' // TODO remove legacy bootstrap config - implementation 'org.springframework.boot:spring-boot-starter-actuator' - - implementation 'io.micrometer:micrometer-registry-prometheus' - implementation 'javax.annotation:javax.annotation-api:1.3.2' - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.3.0' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.21' - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' + implementation "javax.annotation:javax.annotation-api:$versions.javaxAnnotation" + implementation "org.springdoc:springdoc-openapi-starter-webmvc-ui:$versions.springdoc" + implementation "io.swagger.core.v3:swagger-annotations-jakarta:$versions.swagger" - implementation 'org.hibernate.validator:hibernate-validator' - - testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' - - implementation 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' -} -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } } diff --git a/apps/arbeidsforhold-service/settings.gradle b/apps/arbeidsforhold-service/settings.gradle index 645d8dbf9a0..936af046ee4 100644 --- a/apps/arbeidsforhold-service/settings.gradle +++ b/apps/arbeidsforhold-service/settings.gradle @@ -4,6 +4,8 @@ plugins { rootProject.name = 'arbeidsforhold-service' +includeBuild "../../plugins/java" + includeBuild '../../libs/commands' includeBuild '../../libs/data-transfer-objects' includeBuild '../../libs/reactive-core' diff --git a/apps/batch-bestilling-service/build.gradle b/apps/batch-bestilling-service/build.gradle index d2244bf707e..5cfd5693cab 100644 --- a/apps/batch-bestilling-service/build.gradle +++ b/apps/batch-bestilling-service/build.gradle @@ -1,44 +1,13 @@ plugins { - id 'java' - id "org.sonarqube" version "5.0.0.4638" - id 'org.springframework.boot' version "3.2.6" - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" -} - -test { - useJUnitPlatform() + id "dolly-apps" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnav-batch-bestilling-service" property "sonar.projectName", "testnav-batch-bestilling-service" - property "sonar.sourceEncoding", "UTF-8" } } -bootJar { - archiveFileName = "app.jar" -} - -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1' - } -} - -repositories { - mavenCentral() - mavenLocal() -} dependencies { @@ -50,31 +19,12 @@ dependencies { implementation 'no.nav.testnav.libs:data-transfer-objects' implementation 'no.nav.testnav.libs:servlet-security' - implementation 'org.springframework.boot:spring-boot-starter-webflux' implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'org.springframework.boot:spring-boot-starter-oauth2-client' implementation 'org.springframework.boot:spring-boot-starter-security' - - implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' - implementation 'org.springframework.boot:spring-boot-starter-actuator' - - implementation 'io.micrometer:micrometer-registry-prometheus' - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.3.0' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.21' - - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' - implementation 'org.hibernate.validator:hibernate-validator' + implementation "org.springdoc:springdoc-openapi-starter-webmvc-ui:$versions.springdoc" + implementation "io.swagger.core.v3:swagger-annotations-jakarta:$versions.swagger" - testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' - - implementation 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' -} -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } } diff --git a/apps/batch-bestilling-service/settings.gradle b/apps/batch-bestilling-service/settings.gradle index 83c20b8635b..c3664eb2a8d 100644 --- a/apps/batch-bestilling-service/settings.gradle +++ b/apps/batch-bestilling-service/settings.gradle @@ -4,13 +4,15 @@ plugins { rootProject.name = 'batch-bestilling-service' +includeBuild "../../plugins/java" + +includeBuild '../../libs/commands' +includeBuild '../../libs/data-transfer-objects' includeBuild '../../libs/reactive-core' includeBuild '../../libs/security-core' includeBuild '../../libs/servlet-core' -includeBuild '../../libs/data-transfer-objects' -includeBuild '../../libs/servlet-security' includeBuild '../../libs/servlet-insecure-security' -includeBuild '../../libs/commands' +includeBuild '../../libs/servlet-security' develocity { buildScan { diff --git a/apps/brreg-stub/build.gradle b/apps/brreg-stub/build.gradle index d3a672cb909..48e8a1d39ae 100644 --- a/apps/brreg-stub/build.gradle +++ b/apps/brreg-stub/build.gradle @@ -1,68 +1,23 @@ plugins { - id 'java' - id "org.sonarqube" version "5.0.0.4638" - id "uk.co.boothen.gradle.wsimport" version "0.21" - id 'org.springframework.boot' version "3.2.6" - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" - id("org.openrewrite.rewrite") version("6.6.4") -} + id "dolly-apps" -test { - useJUnitPlatform() + id "uk.co.boothen.gradle.wsimport" version "0.21" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "brreg-stub" property "sonar.projectName", "brreg-stub" - property "sonar.sourceEncoding", "UTF-8" - } -} - -rewrite { - activeRecipe("org.openrewrite.java.spring.boot3.UpgradeSpringBoot_3_2") -} - - -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1' - } } -bootJar { - duplicatesStrategy(DuplicatesStrategy.INCLUDE) - archiveFileName = "app.jar" -} - wsimport { wsdl("Grunndata.wsdl") { packageName("no.nav.brregstub.tjenestekontrakter.ws") } } - -repositories { - mavenCentral() - maven { url "https://github-package-registry-mirror.gc.nav.no/cached/maven-release" } - maven { url "https://build.shibboleth.net/maven/releases/" } - mavenLocal() -} - dependencies { - - rewrite('org.openrewrite.recipe:rewrite-spring:5.10.0') - implementation('io.dropwizard:dropwizard-jackson:4.0.7') { exclude group: "com.google.code.findbugs" } @@ -71,18 +26,12 @@ dependencies { implementation 'no.nav.testnav.libs:servlet-core' implementation 'org.springframework.boot:spring-boot-starter-web' - implementation 'org.springframework.boot:spring-boot-starter-webflux' implementation 'org.springframework.boot:spring-boot-starter-web-services' implementation 'org.springframework.boot:spring-boot-starter-data-jpa' - implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' implementation 'org.springframework.cloud:spring-cloud-vault-config-databases' - implementation 'org.springframework.boot:spring-boot-starter-actuator' implementation 'org.springframework.boot:spring-boot-starter-validation' - implementation 'io.micrometer:micrometer-registry-prometheus' - - implementation 'org.apache.cxf:cxf-rt-bindings-soap' implementation 'org.apache.cxf:cxf-rt-ws-policy' implementation 'org.apache.cxf:cxf-core' @@ -98,30 +47,17 @@ dependencies { implementation 'com.h2database:h2' implementation 'wsdl4j:wsdl4j' - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.3.0' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.21' + implementation "org.springdoc:springdoc-openapi-starter-webmvc-ui:$versions.springdoc" + implementation "io.swagger.core.v3:swagger-annotations-jakarta:$versions.swagger" implementation 'no.nav.common:auth' implementation 'no.nav.common:util' implementation 'no.nav.common:cxf:3.2023.10.17_06.55-4e30d96bba05' implementation 'com.h2database:h2' - implementation "com.sun.xml.ws:jaxws-rt:4.0.2" + implementation "com.sun.xml.ws:jaxws-rt:$versions.jaxws" testImplementation 'org.testcontainers:junit-jupiter' testImplementation 'org.testcontainers:postgresql' implementation 'jakarta.jws:jakarta.jws-api:3.0.0' //TODO upgrade to JUnit5 testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' - testImplementation 'org.springframework.boot:spring-boot-starter-test' - - implementation 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' - - testImplementation 'org.junit.jupiter:junit-jupiter:5.10.2' -} -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } } diff --git a/apps/brreg-stub/settings.gradle b/apps/brreg-stub/settings.gradle index ceb67c0a896..2126bfa8ba8 100644 --- a/apps/brreg-stub/settings.gradle +++ b/apps/brreg-stub/settings.gradle @@ -4,6 +4,8 @@ plugins { rootProject.name = 'brreg-stub' +includeBuild "../../plugins/java" + includeBuild '../../libs/database' includeBuild '../../libs/servlet-core' diff --git a/apps/bruker-service/build.gradle b/apps/bruker-service/build.gradle index 5dec71beac0..d2d3a9c73f0 100644 --- a/apps/bruker-service/build.gradle +++ b/apps/bruker-service/build.gradle @@ -1,9 +1,5 @@ plugins { - id 'java' - id "org.sonarqube" version "5.0.0.4638" - id 'org.springframework.boot' version "3.2.6" - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" + id "dolly-apps" } def test = tasks.named("test") { @@ -21,57 +17,26 @@ def iTest = tasks.register("iTest", Test) { sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnav-bruker-service" property "sonar.projectName", "testnav-bruker-service" - property "sonar.sourceEncoding", "UTF-8" } } -bootJar { - archiveFileName = "app.jar" -} - -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1' - } -} - -repositories { - mavenCentral() - mavenLocal() -} - dependencies { - implementation 'com.auth0:java-jwt:4.4.0' + implementation "com.auth0:java-jwt:$versions.jwt" implementation 'no.nav.testnav.libs:security-core' implementation 'no.nav.testnav.libs:reactive-core' implementation 'no.nav.testnav.libs:reactive-security' implementation 'no.nav.testnav.libs:data-transfer-objects' - implementation 'org.springframework.boot:spring-boot-starter-webflux' implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server' implementation 'org.springframework.boot:spring-boot-starter-data-r2dbc' implementation 'org.springframework.cloud:spring-cloud-starter-bootstrap' // TODO remove legacy bootstrap config - implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' - - implementation 'org.springframework.boot:spring-boot-starter-actuator' - implementation 'io.micrometer:micrometer-registry-prometheus' - implementation 'org.springdoc:springdoc-openapi-starter-webflux-ui:2.5.0' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.21' - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' - implementation 'org.hibernate.validator:hibernate-validator' + implementation "org.springdoc:springdoc-openapi-starter-webflux-ui:$versions.springdoc" + implementation "io.swagger.core.v3:swagger-annotations-jakarta:$versions.swagger" implementation 'io.r2dbc:r2dbc-h2' implementation 'org.postgresql:r2dbc-postgresql' @@ -80,21 +45,10 @@ dependencies { runtimeOnly 'org.postgresql:postgresql' runtimeOnly 'com.h2database:h2' - testImplementation 'io.projectreactor:reactor-test' - testImplementation 'org.springframework.boot:spring-boot-starter-test' + testImplementation "io.projectreactor:reactor-test:$versions.reactorTest" testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' - testImplementation 'org.assertj:assertj-core:3.26.0' + testImplementation "org.assertj:assertj-core:$versions.assertj" testImplementation 'no.nav.testnav.libs:integration-test' - testImplementation 'com.squareup.okhttp3:okhttp:4.10.0' - testImplementation 'com.squareup.okhttp3:mockwebserver:4.10.0' - - - implementation 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' -} -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } + testImplementation "com.squareup.okhttp3:okhttp:$versions.okhttp" + testImplementation "com.squareup.okhttp3:mockwebserver:$versions.okhttp" } diff --git a/apps/bruker-service/settings.gradle b/apps/bruker-service/settings.gradle index 7612ac852e7..dabd186654a 100644 --- a/apps/bruker-service/settings.gradle +++ b/apps/bruker-service/settings.gradle @@ -4,11 +4,13 @@ plugins { rootProject.name = 'bruker-service' +includeBuild "../../plugins/java" + +includeBuild '../../libs/data-transfer-objects' +includeBuild '../../libs/integration-test' includeBuild '../../libs/reactive-core' includeBuild '../../libs/reactive-security' includeBuild '../../libs/security-core' -includeBuild '../../libs/data-transfer-objects' -includeBuild '../../libs/integration-test' develocity { buildScan { diff --git a/apps/budpro-service/build.gradle b/apps/budpro-service/build.gradle index d7c43b73561..ca5df53ed97 100644 --- a/apps/budpro-service/build.gradle +++ b/apps/budpro-service/build.gradle @@ -1,31 +1,22 @@ plugins { - id "dolly-java-conventions" - id("org.openrewrite.rewrite") version("6.6.4") -} - -rewrite { - activeRecipe("org.openrewrite.java.spring.boot3.UpgradeSpringBoot_3_2") + id "dolly-apps" } dependencies { - rewrite('org.openrewrite.recipe:rewrite-spring:5.10.0') - - implementation 'no.nav.testnav.libs:commands' - implementation 'no.nav.testnav.libs:data-transfer-objects' - implementation 'no.nav.testnav.libs:reactive-core' - implementation 'no.nav.testnav.libs:security-core' - implementation 'no.nav.testnav.libs:servlet-core' - implementation 'no.nav.testnav.libs:servlet-insecure-security' - implementation 'no.nav.testnav.libs:servlet-security' - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.3.0' - implementation 'org.springframework.boot:spring-boot-starter-oauth2-client' - implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server' - implementation 'org.springframework.boot:spring-boot-starter-security' - implementation 'org.springframework.boot:spring-boot-starter-web' - implementation 'org.springframework.boot:spring-boot-starter-webflux' - implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' + implementation "no.nav.testnav.libs:commands" + implementation "no.nav.testnav.libs:data-transfer-objects" + implementation "no.nav.testnav.libs:reactive-core" + implementation "no.nav.testnav.libs:security-core" + implementation "no.nav.testnav.libs:servlet-core" + implementation "no.nav.testnav.libs:servlet-insecure-security" + implementation "no.nav.testnav.libs:servlet-security" + implementation "org.springdoc:springdoc-openapi-starter-webmvc-ui:$versions.springdoc" + implementation "org.springframework.boot:spring-boot-starter-oauth2-client" + implementation "org.springframework.boot:spring-boot-starter-oauth2-resource-server" + implementation "org.springframework.boot:spring-boot-starter-security" + implementation "org.springframework.boot:spring-boot-starter-web" - testImplementation 'org.testcontainers:junit-jupiter' + testImplementation "org.testcontainers:junit-jupiter" } sonarqube { diff --git a/apps/budpro-service/settings.gradle b/apps/budpro-service/settings.gradle index fcf71e60808..1c99b24ef24 100644 --- a/apps/budpro-service/settings.gradle +++ b/apps/budpro-service/settings.gradle @@ -4,7 +4,7 @@ plugins { rootProject.name = 'budpro-service' -includeBuild '../../plugins/java' +includeBuild "../../plugins/java" includeBuild '../../libs/commands' includeBuild '../../libs/data-transfer-objects' diff --git a/apps/dolly-backend/build.gradle b/apps/dolly-backend/build.gradle index 926feba0ff5..2adde405cba 100644 --- a/apps/dolly-backend/build.gradle +++ b/apps/dolly-backend/build.gradle @@ -1,58 +1,11 @@ plugins { - id 'java' - id "org.sonarqube" version "5.0.0.4638" - id 'org.springframework.boot' version "3.2.6" - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" -} - -test { - useJUnitPlatform() - jvmArgs '--add-opens', 'java.base/java.lang=ALL-UNNAMED' + id "dolly-apps" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnav-dolly-backend" property "sonar.projectName", "testnav-dolly-backend" - property "sonar.sourceEncoding", "UTF-8" - } -} - -bootJar { - archiveFileName = "app.jar" - mainClass = 'no.nav.dolly.DollyBackendApplicationStarter' -} - -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1' - } -} - -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } -} - -repositories { - mavenCentral() - maven { - name = "GitHubPackages" - url = uri('https://maven.pkg.github.com/navikt/maven-release') - credentials(PasswordCredentials) { - password System.getenv("NAV_TOKEN") - username 'token' - } } } @@ -67,54 +20,45 @@ dependencies { implementation 'no.nav.testnav.libs:data-transfer-search-objects' implementation 'no.nav.testnav.libs:reactive-core' - implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' implementation 'org.springframework.cloud:spring-cloud-vault-config-databases' - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.3.0' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.21' + implementation "org.springdoc:springdoc-openapi-starter-webmvc-ui:$versions.springdoc" + implementation "io.swagger.core.v3:swagger-annotations-jakarta:$versions.swagger" implementation 'org.springframework.boot:spring-boot-starter-web' - implementation 'org.springframework.boot:spring-boot-starter-webflux' implementation 'org.springframework.boot:spring-boot-starter-oauth2-client' implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server' implementation 'org.springframework.boot:spring-boot-starter-data-jpa' implementation 'org.springframework.boot:spring-boot-starter-security' implementation 'org.springframework.boot:spring-boot-starter-validation' - implementation 'org.springframework.retry:spring-retry:2.0.6' + implementation 'org.springframework.retry:spring-retry' implementation 'org.springframework.boot:spring-boot-starter-data-elasticsearch' - implementation 'org.opensearch.client:spring-data-opensearch:1.4.0' + implementation "org.opensearch.client:spring-data-opensearch:$versions.opensearch" - implementation 'org.apache.commons:commons-lang3:3.14.0' + implementation 'org.apache.commons:commons-lang3' implementation 'org.springframework.boot:spring-boot-starter-cache' implementation 'com.github.ben-manes.caffeine:caffeine' implementation 'org.ehcache:ehcache:3.10.8' - implementation 'com.fasterxml.jackson.core:jackson-core:2.17.1' + implementation "com.fasterxml.jackson.core:jackson-core:$versions.jackson" implementation 'org.postgresql:postgresql' implementation 'org.flywaydb:flyway-core' - implementation 'io.micrometer:micrometer-registry-prometheus' - implementation 'ma.glasnost.orika:orika-core:1.5.4' + implementation "ma.glasnost.orika:orika-core:$versions.orika" implementation 'org.codehaus.jettison:jettison:1.5.4' - implementation 'org.apache.poi:poi:5.2.5' - implementation 'org.apache.poi:poi-ooxml:5.2.5' + implementation "org.apache.poi:poi:$versions.apachePoi" + implementation "org.apache.poi:poi-ooxml:$versions.apachePoi" - testImplementation "org.springframework.boot:spring-boot-starter-test" testImplementation 'org.opensearch:opensearch-testcontainers:2.0.1' testImplementation 'org.springframework.security:spring-security-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' testImplementation 'com.h2database:h2' - testImplementation 'io.projectreactor:reactor-test:3.6.5' + testImplementation "io.projectreactor:reactor-test:$versions.reactorTest" testImplementation 'org.testcontainers:junit-jupiter' testImplementation 'org.testcontainers:postgresql' testImplementation 'org.bitbucket.b_c:jose4j:0.9.6' implementation 'net.java.dev.jna:jna:5.14.0' - - annotationProcessor 'org.projectlombok:lombok' - implementation 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' } \ No newline at end of file diff --git a/apps/dolly-backend/settings.gradle b/apps/dolly-backend/settings.gradle index 7799b717abe..ceeb7716ddc 100644 --- a/apps/dolly-backend/settings.gradle +++ b/apps/dolly-backend/settings.gradle @@ -4,15 +4,17 @@ plugins { rootProject.name = 'dolly-backend' +includeBuild "../../plugins/java" + +includeBuild '../../.github/workflows' +includeBuild '../../libs/data-transfer-objects' +includeBuild '../../libs/data-transfer-search-objects' +includeBuild '../../libs/database' includeBuild '../../libs/reactive-core' +includeBuild '../../libs/security-core' includeBuild '../../libs/servlet-core' -includeBuild '../../libs/servlet-security' includeBuild '../../libs/servlet-insecure-security' -includeBuild '../../libs/security-core' -includeBuild '../../libs/database' -includeBuild '../../libs/data-transfer-objects' -includeBuild '../../libs/data-transfer-search-objects' -includeBuild '../../.github/workflows' +includeBuild '../../libs/servlet-security' develocity { buildScan { diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/inntektsmelding/mapper/InntektsmeldingMappingStrategy.java b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/inntektsmelding/mapper/InntektsmeldingMappingStrategy.java index 18216f80b23..e60fb258c34 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/inntektsmelding/mapper/InntektsmeldingMappingStrategy.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/inntektsmelding/mapper/InntektsmeldingMappingStrategy.java @@ -26,6 +26,7 @@ import java.time.LocalDate; import java.time.LocalDateTime; +import java.util.Optional; import static java.util.Objects.isNull; import static java.util.Objects.nonNull; @@ -104,15 +105,36 @@ public void mapAtoB(RsInntektsmelding.Inntektsmelding rsInntektsmelding, inntektsmelding.setStartdatoForeldrepengeperiode(toLocalDateTime(rsInntektsmelding.getStartdatoForeldrepengeperiode())); inntektsmelding.setArbeidsforhold(mapperFacade.map(rsInntektsmelding.getArbeidsforhold(), RsArbeidsforhold.class)); - inntektsmelding.setGjenopptakelseNaturalytelseListe(rsInntektsmelding.getGjenopptakelseNaturalytelseListe().stream() - .map(ytelse -> mapperFacade.map(ytelse, RsNaturalytelseDetaljer.class)) - .toList()); inntektsmelding.setNaerRelasjon(isTrue(rsInntektsmelding.getNaerRelasjon())); inntektsmelding.setOmsorgspenger(mapperFacade.map(rsInntektsmelding.getOmsorgspenger(), RsOmsorgspenger.class)); - inntektsmelding.setOpphoerAvNaturalytelseListe(rsInntektsmelding.getOpphoerAvNaturalytelseListe().stream() - .map(ytelse -> mapperFacade.map(ytelse, RsNaturalytelseDetaljer.class)) - .toList()); + + inntektsmelding.setOpphoerAvNaturalytelseListe( + rsInntektsmelding + .getOpphoerAvNaturalytelseListe() + .stream() + .map(ytelse -> { + var mapped = mapperFacade.map(ytelse, RsNaturalytelseDetaljer.class); + Optional + .ofNullable(ytelse.getNaturalytelseType()) + .ifPresent(type -> mapped.setNaturalytelseType(type.getJsonValue())); + return mapped; + }) + .toList() + ); + inntektsmelding.setGjenopptakelseNaturalytelseListe( + rsInntektsmelding + .getGjenopptakelseNaturalytelseListe() + .stream() + .map(ytelse -> { + var mapped = mapperFacade.map(ytelse, RsNaturalytelseDetaljer.class); + Optional + .ofNullable(ytelse.getNaturalytelseType()) + .ifPresent(type -> mapped.setNaturalytelseType(type.getJsonValue())); + return mapped; + }) + .toList() + ); inntektsmelding.setPleiepengerPerioder(rsInntektsmelding.getPleiepengerPerioder().stream() .map(periode -> mapperFacade.map(periode, RsPeriode.class)) diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/skattekort/SkattekortClient.java b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/skattekort/SkattekortClient.java new file mode 100644 index 00000000000..6ba64ea112d --- /dev/null +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/skattekort/SkattekortClient.java @@ -0,0 +1,60 @@ +package no.nav.dolly.bestilling.skattekort; + +import lombok.RequiredArgsConstructor; +import ma.glasnost.orika.MapperFacade; +import no.nav.dolly.bestilling.ClientFuture; +import no.nav.dolly.bestilling.ClientRegister; +import no.nav.dolly.domain.jpa.BestillingProgress; +import no.nav.dolly.domain.resultset.RsDollyUtvidetBestilling; +import no.nav.dolly.domain.resultset.dolly.DollyPerson; +import no.nav.dolly.util.TransactionHelperService; +import no.nav.testnav.libs.dto.skattekortservice.v1.SkattekortRequestDTO; +import org.springframework.stereotype.Service; +import reactor.core.publisher.Flux; + +import java.util.List; +import java.util.stream.Collectors; + +import static java.util.Objects.nonNull; + +@Service +@RequiredArgsConstructor +public class SkattekortClient implements ClientRegister { + + private final SkattekortConsumer skattekortConsumer; + private final MapperFacade mapperFacade; + private final TransactionHelperService transactionHelperService; + + @Override + public Flux gjenopprett(RsDollyUtvidetBestilling bestilling, DollyPerson dollyPerson, + BestillingProgress progress, boolean isOpprettEndre) { + + return Flux.just(bestilling) + .filter(bestilling1 -> nonNull(bestilling1.getSkattekort())) + .map(bestilling1 -> mapperFacade.map(bestilling1.getSkattekort(), SkattekortRequestDTO.class)) + .doOnNext(skattekort -> + skattekort.getArbeidsgiver() + .forEach(arbeidsgiver -> arbeidsgiver.getArbeidstaker() + .forEach(arbeidstaker -> arbeidstaker.setArbeidstakeridentifikator(dollyPerson.getIdent())))) + .flatMap(skattkort -> Flux.fromIterable(skattkort.getArbeidsgiver()) + .map(arbeidsgiver -> SkattekortRequestDTO.builder() + .arbeidsgiver(List.of(arbeidsgiver)) + .build()) + .flatMap(skattekortConsumer::sendSkattekort) + .collect(Collectors.joining(","))) + .map(status -> futurePersist(progress, status)); + } + + private ClientFuture futurePersist(BestillingProgress progress, String status) { + + return () -> { + transactionHelperService.persister(progress, BestillingProgress::setSkattekortStatus, status); + return progress; + }; + } + + @Override + public void release(List identer) { + // Deletion is not yet supported + } +} diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/skattekort/SkattekortConsumer.java b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/skattekort/SkattekortConsumer.java new file mode 100644 index 00000000000..08006dbe42a --- /dev/null +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/skattekort/SkattekortConsumer.java @@ -0,0 +1,33 @@ +package no.nav.dolly.bestilling.skattekort; + +import no.nav.dolly.bestilling.skattekort.command.SkattekortPostCommand; +import no.nav.dolly.config.Consumers; +import no.nav.testnav.libs.dto.skattekortservice.v1.SkattekortRequestDTO; +import no.nav.testnav.libs.securitycore.domain.ServerProperties; +import no.nav.testnav.libs.standalone.servletsecurity.exchange.TokenExchange; +import org.springframework.stereotype.Service; +import org.springframework.web.reactive.function.client.WebClient; +import reactor.core.publisher.Flux; + +@Service +public class SkattekortConsumer { + + private final WebClient webClient; + private final ServerProperties serverProperties; + private final TokenExchange tokenExchange; + + public SkattekortConsumer(WebClient.Builder webClientBuilder, Consumers consumers, TokenExchange tokenExchange) { + + this.serverProperties = consumers.getTestnavSkattekortService(); + this.webClient = webClientBuilder + .baseUrl(serverProperties.getUrl()) + .build(); + this.tokenExchange = tokenExchange; + } + + public Flux sendSkattekort(SkattekortRequestDTO skattekortRequestDTO) { + + return tokenExchange.exchange(serverProperties) + .flatMapMany(token -> new SkattekortPostCommand(webClient, skattekortRequestDTO, token.getTokenValue()).call()); + } +} diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/skattekort/command/SkattekortPostCommand.java b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/skattekort/command/SkattekortPostCommand.java new file mode 100644 index 00000000000..0c67bd2a771 --- /dev/null +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/skattekort/command/SkattekortPostCommand.java @@ -0,0 +1,78 @@ +package no.nav.dolly.bestilling.skattekort.command; + +import lombok.RequiredArgsConstructor; +import no.nav.dolly.errorhandling.ErrorStatusDecoder; +import no.nav.dolly.util.RequestHeaderUtil; +import no.nav.testnav.libs.dto.skattekortservice.v1.IdentifikatorForEnhetEllerPerson; +import no.nav.testnav.libs.dto.skattekortservice.v1.SkattekortRequestDTO; +import no.nav.testnav.libs.reactivecore.utils.WebClientFilter; +import no.nav.testnav.libs.securitycore.config.UserConstant; +import org.springframework.web.reactive.function.client.WebClient; +import org.springframework.web.reactive.function.client.WebClientResponseException; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.util.retry.Retry; + +import java.time.Duration; +import java.util.concurrent.Callable; + +import static no.nav.dolly.domain.CommonKeysAndUtils.HEADER_NAV_CALL_ID; +import static no.nav.dolly.domain.CommonKeysAndUtils.HEADER_NAV_CONSUMER_ID; +import static no.nav.dolly.util.TokenXUtil.getUserJwt; +import static org.apache.commons.lang3.StringUtils.isNotBlank; +import static org.springframework.http.HttpHeaders.ACCEPT; +import static org.springframework.http.HttpHeaders.AUTHORIZATION; +import static org.springframework.http.MediaType.APPLICATION_JSON_VALUE; + +@RequiredArgsConstructor +public class SkattekortPostCommand implements Callable> { + + private static final String SKATTEKORT_URL = "/api/v1/skattekort"; + private static final String CONSUMER = "Dolly"; + + private final WebClient webClient; + private final SkattekortRequestDTO request; + private final String token; + + @Override + public Flux call() { + + return webClient.post().uri(uriBuilder -> uriBuilder + .path(SKATTEKORT_URL) + .build()) + .header(ACCEPT, APPLICATION_JSON_VALUE) + .header(HEADER_NAV_CALL_ID, RequestHeaderUtil.getNavCallId()) + .header(HEADER_NAV_CONSUMER_ID, CONSUMER) + .header(AUTHORIZATION, "Bearer " + token) + .header(UserConstant.USER_HEADER_JWT, getUserJwt()) + .bodyValue(request) + .retrieve() + .bodyToFlux(String.class) + .map(status -> getArbeidsgiverAndYear(request) + ErrorStatusDecoder.encodeStatus(status)) + .doOnError(WebClientFilter::logErrorMessage) + .retryWhen(Retry.backoff(3, Duration.ofSeconds(5)) + .filter(WebClientFilter::is5xxException)) + .onErrorResume(throwable -> throwable instanceof WebClientResponseException.NotFound, + throwable -> Mono.empty()); + } + + private static String getArbeidsgiverAndYear(SkattekortRequestDTO skattekort) { + + return skattekort.getArbeidsgiver().stream() + .findFirst() + .map(arbeidsgiver -> String.format("%s+%s:", + getArbeidsgiver(arbeidsgiver.getArbeidsgiveridentifikator()), + arbeidsgiver.getArbeidstaker().stream() + .findFirst() + .map(arbeidstaker -> arbeidstaker.getInntektsaar().toString()) + .orElse("inntektsår"))) + .orElse("organisasjonsnummer+inntektsår:"); + } + + private static String getArbeidsgiver(IdentifikatorForEnhetEllerPerson identifikator) { + + return isNotBlank(identifikator.getOrganisasjonsnummer()) ? + identifikator.getOrganisasjonsnummer() : + identifikator.getPersonidentifikator(); + } +} diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/skattekort/mapper/SkattekortMappingStrategy.java b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/skattekort/mapper/SkattekortMappingStrategy.java new file mode 100644 index 00000000000..1d61ece0da8 --- /dev/null +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/skattekort/mapper/SkattekortMappingStrategy.java @@ -0,0 +1,18 @@ +package no.nav.dolly.bestilling.skattekort.mapper; + +import ma.glasnost.orika.MapperFactory; +import no.nav.dolly.domain.resultset.skattekort.SkattekortRequestDTO; +import no.nav.dolly.mapper.MappingStrategy; +import org.springframework.stereotype.Component; + +@Component +public class SkattekortMappingStrategy implements MappingStrategy { + + @Override + public void register(MapperFactory factory) { + factory.classMap(SkattekortRequestDTO.class, no.nav.testnav.libs.dto.skattekortservice.v1.SkattekortRequestDTO.class) + .mapNulls(false) + .field("arbeidsgiverSkatt", "arbeidsgiver") + .register(); + } +} diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/config/Consumers.java b/apps/dolly-backend/src/main/java/no/nav/dolly/config/Consumers.java index 971e4b2caec..13ff48fa4e2 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/config/Consumers.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/config/Consumers.java @@ -44,4 +44,5 @@ public class Consumers { private ServerProperties testnavSyntSykemeldingApi; private ServerProperties testnavTpsMessagingService; private ServerProperties testnavUdistubProxy; + private ServerProperties testnavSkattekortService; } diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/jpa/BestillingProgress.java b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/jpa/BestillingProgress.java index 57498aa2ac0..aa5ead29790 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/jpa/BestillingProgress.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/jpa/BestillingProgress.java @@ -118,6 +118,9 @@ public class BestillingProgress implements Serializable { @Column(name = "ARBEIDSPLASSENCV_STATUS") private String arbeidsplassenCVStatus; + @Column(name = "SKATTEKORT_STATUS") + private String skattekortStatus; + @Column(name = "master") @Enumerated(EnumType.STRING) private Master master; diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/BestilteKriterier.java b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/BestilteKriterier.java index a831e69ed00..21369fd65a2 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/BestilteKriterier.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/BestilteKriterier.java @@ -21,6 +21,7 @@ import no.nav.dolly.domain.resultset.pensjon.PensjonData; import no.nav.dolly.domain.resultset.sigrunstub.RsLignetInntekt; import no.nav.dolly.domain.resultset.sigrunstub.RsPensjonsgivendeForFolketrygden; +import no.nav.dolly.domain.resultset.skattekort.SkattekortRequestDTO; import no.nav.dolly.domain.resultset.skjerming.RsSkjerming; import no.nav.dolly.domain.resultset.sykemelding.RsSykemelding; import no.nav.dolly.domain.resultset.tpsmessagingservice.RsTpsMessaging; @@ -59,4 +60,5 @@ public class BestilteKriterier { private RsSkjerming skjerming; private RsSykemelding sykemelding; private ArbeidsplassenCVDTO arbeidsplassenCV; + private SkattekortRequestDTO skattekort; } diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/RsDollyBestilling.java b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/RsDollyBestilling.java index 9bf2874f112..50c44963069 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/RsDollyBestilling.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/RsDollyBestilling.java @@ -22,6 +22,7 @@ import no.nav.dolly.domain.resultset.pensjon.PensjonData; import no.nav.dolly.domain.resultset.sigrunstub.RsLignetInntekt; import no.nav.dolly.domain.resultset.sigrunstub.RsPensjonsgivendeForFolketrygden; +import no.nav.dolly.domain.resultset.skattekort.SkattekortRequestDTO; import no.nav.dolly.domain.resultset.skjerming.RsSkjerming; import no.nav.dolly.domain.resultset.sykemelding.RsSykemelding; import no.nav.dolly.domain.resultset.tpsmessagingservice.RsTpsMessaging; @@ -75,6 +76,7 @@ public class RsDollyBestilling { private BankkontoData bankkonto; private RsSkjerming skjerming; private ArbeidsplassenCVDTO arbeidsplassenCV; + private SkattekortRequestDTO skattekort; public List getAareg() { if (isNull(aareg)) { diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/SystemTyper.java b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/SystemTyper.java index 04e8dfad626..20381dbac04 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/SystemTyper.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/SystemTyper.java @@ -37,6 +37,7 @@ public enum SystemTyper { SIGRUNSTUB("Skatteinntekt grunnlag (SIGRUN)"), SIGRUN_LIGNET("Lignet skatteinntekt (Sigrunstub)"), SIGRUN_PENSJONSGIVENDE("Pensjonsgivende inntekt (Sigrunstub)"), + SKATTEKORT("Skattekort (SOKOS)"), SKJERMINGSREGISTER("Skjermingsregisteret"), SYKEMELDING("NAV sykemelding"), TPS_MESSAGING("Meldinger til TPS"), diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/inntektsmeldingstub/NaturalytelseType.java b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/inntektsmeldingstub/NaturalytelseType.java index c482013e88e..69d568b1546 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/inntektsmeldingstub/NaturalytelseType.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/inntektsmeldingstub/NaturalytelseType.java @@ -1,24 +1,35 @@ package no.nav.dolly.domain.resultset.inntektsmeldingstub; +import com.fasterxml.jackson.annotation.JsonValue; +import lombok.AccessLevel; +import lombok.Getter; +import lombok.RequiredArgsConstructor; + +@RequiredArgsConstructor(access = AccessLevel.PRIVATE) +@Getter public enum NaturalytelseType { - AKSJER_GRUNNFONDSBEVIS_TIL_UNDERKURS, - LOSJI, - KOST_DOEGN, - BESOEKSREISER_HJEMMET_ANNET, - KOSTBESPARELSE_I_HJEMMET, - RENTEFORDEL_LAAN, - BIL, - KOST_DAGER, - BOLIG, - SKATTEPLIKTIG_DEL_FORSIKRINGER, - FRI_TRANSPORT, - OPSJONER, - TILSKUDD_BARNEHAGEPLASS, - ANNET, - BEDRIFTSBARNEHAGEPLASS, - YRKEBIL_TJENESTLIGBEHOV_KILOMETER, - YRKEBIL_TJENESTLIGBEHOV_LISTEPRIS, - INNBETALING_TIL_UTENLANDSK_PENSJONSORDNING, - ELEKTRONISK_KOMMUNIKASJON + AKSJER_GRUNNFONDSBEVIS_TIL_UNDERKURS("aksjerGrunnfondsbevisTilUnderkurs"), + LOSJI("losji"), + KOST_DOEGN("kostDoegn"), + BESOEKSREISER_HJEMMET_ANNET("besoeksreiserHjemmetAnnet"), + KOSTBESPARELSE_I_HJEMMET("kostbesparelseIHjemmet"), + RENTEFORDEL_LAAN("rentefordelLaan"), + BIL("bil"), + KOST_DAGER("kostDager"), + BOLIG("bolig"), + SKATTEPLIKTIG_DEL_FORSIKRINGER("skattepliktigDelForsikringer"), + FRI_TRANSPORT("friTransport"), + OPSJONER("opsjoner"), + TILSKUDD_BARNEHAGEPLASS("tilskuddBarnehageplass"), + ANNET("annet"), + BEDRIFTSBARNEHAGEPLASS("bedriftsbarnehageplass"), + YRKEBIL_TJENESTLIGBEHOV_KILOMETER("yrkebilTjenestligbehovKilometer"), + YRKEBIL_TJENESTLIGBEHOV_LISTEPRIS("yrkebilTjenestligbehovListepris"), + INNBETALING_TIL_UTENLANDSK_PENSJONSORDNING("innbetalingTilUtenlandskPensjonsordning"), + ELEKTRONISK_KOMMUNIKASJON("elektroniskKommunikasjon"); + + @JsonValue + private final String jsonValue; + } diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/skattekort/SkattekortRequestDTO.java b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/skattekort/SkattekortRequestDTO.java new file mode 100644 index 00000000000..8f6485aa6c7 --- /dev/null +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/skattekort/SkattekortRequestDTO.java @@ -0,0 +1,30 @@ +package no.nav.dolly.domain.resultset.skattekort; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import no.nav.testnav.libs.dto.skattekortservice.v1.ArbeidsgiverSkatt; + +import java.util.ArrayList; +import java.util.List; + +import static java.util.Objects.isNull; + +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class SkattekortRequestDTO { + + private List arbeidsgiverSkatt; + + public List getArbeidsgiverSkatt() { + + if (isNull(arbeidsgiverSkatt)) { + + arbeidsgiverSkatt = new ArrayList<>(); + } + return arbeidsgiverSkatt; + } +} diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/elastic/ElasticBestilling.java b/apps/dolly-backend/src/main/java/no/nav/dolly/elastic/ElasticBestilling.java index 91d2b13de6a..b4a8a33ca60 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/elastic/ElasticBestilling.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/elastic/ElasticBestilling.java @@ -25,6 +25,7 @@ import no.nav.dolly.domain.resultset.sykemelding.RsSykemelding; import no.nav.dolly.domain.resultset.udistub.model.RsUdiPerson; import no.nav.testnav.libs.data.arbeidsplassencv.v1.ArbeidsplassenCVDTO; +import no.nav.testnav.libs.dto.skattekortservice.v1.SkattekortRequestDTO; import org.springframework.data.annotation.Id; import org.springframework.data.annotation.Transient; import org.springframework.data.domain.Persistable; @@ -94,6 +95,8 @@ public boolean isNew() { @Field private ArbeidsplassenCVDTO arbeidsplassenCV; @Field + private SkattekortRequestDTO skattekort; + @Field private List identer; @Transient diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/mapper/BestillingSkattekortStatusMapper.java b/apps/dolly-backend/src/main/java/no/nav/dolly/mapper/BestillingSkattekortStatusMapper.java new file mode 100644 index 00000000000..fdce4ceee6a --- /dev/null +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/mapper/BestillingSkattekortStatusMapper.java @@ -0,0 +1,95 @@ +package no.nav.dolly.mapper; + +import lombok.AccessLevel; +import lombok.NoArgsConstructor; +import no.nav.dolly.domain.jpa.BestillingProgress; +import no.nav.dolly.domain.resultset.RsStatusRapport; + +import java.util.Collection; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import static java.util.Collections.emptyList; +import static no.nav.dolly.domain.resultset.SystemTyper.SKATTEKORT; +import static no.nav.dolly.mapper.AbstractRsStatusMiljoeIdentForhold.decodeMsg; +import static org.apache.commons.lang3.StringUtils.isNotBlank; + +@NoArgsConstructor(access = AccessLevel.PRIVATE) +public final class BestillingSkattekortStatusMapper { + + public static List buildSkattekortStatusMap(List progressList) { + + // status org+year ident + Map>> errorEnvIdents = new HashMap<>(); + + progressList.forEach(progress -> { + if (isNotBlank(progress.getSkattekortStatus()) && isNotBlank(progress.getIdent())) { + var entries = progress.getSkattekortStatus().split(","); + for (var entry : entries) { + var orgYear = entry.split(":")[0]; + var status = entry.split(":")[1]; + if (errorEnvIdents.containsKey(status)) { + if (errorEnvIdents.get(status).containsKey(orgYear)) { + errorEnvIdents.get(status).get(orgYear).add(progress.getIdent()); + } else { + errorEnvIdents.get(status).put(orgYear, new HashSet<>(Set.of(progress.getIdent()))); + } + } else { + errorEnvIdents.put(status, new HashMap<>(Map.of(orgYear, new HashSet<>(Set.of(progress.getIdent()))))); + } + } + } + }); + + if (errorEnvIdents.isEmpty()) { + return emptyList(); + + } else { + if (errorEnvIdents.entrySet().stream() + .allMatch(entry -> entry.getKey().equals("Skattekort lagret"))) { + + return errorEnvIdents.values().stream() + .map(entry -> RsStatusRapport.builder() + .id(SKATTEKORT) + .navn(SKATTEKORT.getBeskrivelse()) + .statuser(List.of(RsStatusRapport.Status.builder() + .melding("OK") + .identer(entry.values().stream() + .map(orgYear -> orgYear.stream().toList()) + .flatMap(Collection::stream) + .distinct() + .toList()) + .build())) + .build()) + .toList(); + + } else { + + return errorEnvIdents.entrySet().stream() + .filter(entry -> !entry.getKey().equals("Skattekort lagret")) + .map(entry -> RsStatusRapport.builder() + .id(SKATTEKORT) + .navn(SKATTEKORT.getBeskrivelse()) + .statuser(entry.getValue().entrySet().stream() + .map(orgYear -> RsStatusRapport.Status.builder() + .melding(formatMelding(orgYear.getKey(), entry.getKey())) + .identer(orgYear.getValue().stream().toList()) + .build()) + .toList()) + .build()) + .toList(); + } + } + } + + private static String formatMelding(String orgYear, String melding) { + + return "FEIL: organisasjon:%s, inntektsår:%s, melding:%s".formatted( + orgYear.split("\\+")[0], + orgYear.split("\\+")[1], + decodeMsg(melding)); + } +} diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/mapper/strategy/BestillingStatusMappingStrategy.java b/apps/dolly-backend/src/main/java/no/nav/dolly/mapper/strategy/BestillingStatusMappingStrategy.java index 8c0eee3b0fc..07ed467b33b 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/mapper/strategy/BestillingStatusMappingStrategy.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/mapper/strategy/BestillingStatusMappingStrategy.java @@ -38,6 +38,7 @@ import static no.nav.dolly.mapper.BestillingPdlPersonStatusMapper.buildPdlPersonStatusMap; import static no.nav.dolly.mapper.BestillingPensjonforvalterStatusMapper.buildPensjonforvalterStatusMap; import static no.nav.dolly.mapper.BestillingSigrunStubStatusMapper.buildSigrunStubStatusMap; +import static no.nav.dolly.mapper.BestillingSkattekortStatusMapper.buildSkattekortStatusMap; import static no.nav.dolly.mapper.BestillingSkjermingsRegisterStatusMapper.buildSkjermingsRegisterStatusMap; import static no.nav.dolly.mapper.BestillingSykemeldingStatusMapper.buildSykemeldingStatusMap; import static no.nav.dolly.mapper.BestillingTpsMessagingStatusMapper.buildTpsMessagingStatusMap; @@ -103,6 +104,7 @@ public void mapAtoB(Bestilling bestilling, RsBestillingStatus bestillingStatus, bestillingStatus.getStatus().addAll(buildSkjermingsRegisterStatusMap(progresser)); bestillingStatus.getStatus().addAll(buildKontoregisterStatusMap(progresser)); bestillingStatus.getStatus().addAll(buildArbeidsplassenCVStatusMap(progresser)); + bestillingStatus.getStatus().addAll(buildSkattekortStatusMap(progresser)); bestillingStatus.getStatus().addAll(buildAnnenFeilStatusMap(progresser)); } }) diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/mapper/strategy/DollyRequest2MalBestillingMappingStrategy.java b/apps/dolly-backend/src/main/java/no/nav/dolly/mapper/strategy/DollyRequest2MalBestillingMappingStrategy.java index 97617aee455..5d4c0403d8c 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/mapper/strategy/DollyRequest2MalBestillingMappingStrategy.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/mapper/strategy/DollyRequest2MalBestillingMappingStrategy.java @@ -14,8 +14,11 @@ import no.nav.dolly.mapper.MappingStrategy; import no.nav.testnav.libs.data.arbeidsplassencv.v1.ArbeidsplassenCVDTO; import no.nav.testnav.libs.data.pdlforvalter.v1.PersonDTO; +import no.nav.testnav.libs.dto.skattekortservice.v1.SkattekortRequestDTO; import org.springframework.stereotype.Component; +import static java.util.Objects.isNull; + @Component public class DollyRequest2MalBestillingMappingStrategy implements MappingStrategy { @@ -53,6 +56,22 @@ public void mapAtoB(RsDollyUtvidetBestilling request, RsDollyUtvidetBestilling a akkumulert.getInstdata().addAll(request.getInstdata()); akkumulert.getSigrunstub().addAll(request.getSigrunstub()); akkumulert.getSigrunstubPensjonsgivende().addAll(request.getSigrunstubPensjonsgivende()); + if (isNull(akkumulert.getSkattekort())) { + akkumulert.setSkattekort(request.getSkattekort()); + } else { + akkumulert.getSkattekort().getArbeidsgiverSkatt() + .addAll(request.getSkattekort().getArbeidsgiverSkatt()); + } + } + }) + .register(); + + factory.classMap(SkattekortRequestDTO.class, SkattekortRequestDTO.class) + .mapNulls(false) + .customize(new CustomMapper<>() { + @Override + public void mapAtoB(SkattekortRequestDTO skattekort, SkattekortRequestDTO akkumulert, MappingContext context) { + akkumulert.getArbeidsgiver().addAll(skattekort.getArbeidsgiver()); } }) .register(); diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/service/BestillingService.java b/apps/dolly-backend/src/main/java/no/nav/dolly/service/BestillingService.java index 5066ec21607..5164bcb4f63 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/service/BestillingService.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/service/BestillingService.java @@ -422,6 +422,7 @@ public String getBestKriterier(RsDollyBestilling request) { .skjerming(request.getSkjerming()) .sykemelding(request.getSykemelding()) .arbeidsplassenCV(request.getArbeidsplassenCV()) + .skattekort(request.getSkattekort()) .build()); } diff --git a/apps/dolly-backend/src/main/resources/application-local.yaml b/apps/dolly-backend/src/main/resources/application-local.yaml index f013a7344f9..cba61bd629b 100644 --- a/apps/dolly-backend/src/main/resources/application-local.yaml +++ b/apps/dolly-backend/src/main/resources/application-local.yaml @@ -70,4 +70,6 @@ consumers: testnav-arbeidsplassencv-proxy: url: https://testnav-arbeidsplassencv-proxy.intern.dev.nav.no testnav-kodeverk-service: - url: https://testnav-kodeverk-service.intern.dev.nav.no \ No newline at end of file + url: https://testnav-kodeverk-service.intern.dev.nav.no + testnav-skattekort-service: + url: https://testnav-skattekort-service.intern.dev.nav.no \ No newline at end of file diff --git a/apps/dolly-backend/src/main/resources/application.yaml b/apps/dolly-backend/src/main/resources/application.yaml index b7143d8e865..f2bb53a8d5d 100644 --- a/apps/dolly-backend/src/main/resources/application.yaml +++ b/apps/dolly-backend/src/main/resources/application.yaml @@ -236,4 +236,9 @@ consumers: namespace: dolly url: http://testnav-arbeidsplassencv-proxy.dolly.svc.cluster.local cluster: dev-gcp + testnavSkattekortService: + name: testnav-skattekort-service + namespace: dolly + url: http://testnav-skattekort-service.dolly.svc.cluster.local + cluster: dev-gcp \ No newline at end of file diff --git a/apps/dolly-backend/src/main/resources/db/migration/V1.7.24__AlterBestillingProgressSkattekort.sql b/apps/dolly-backend/src/main/resources/db/migration/V1.7.24__AlterBestillingProgressSkattekort.sql new file mode 100644 index 00000000000..79de07a3fa0 --- /dev/null +++ b/apps/dolly-backend/src/main/resources/db/migration/V1.7.24__AlterBestillingProgressSkattekort.sql @@ -0,0 +1,6 @@ +----------------------------- +-- A L T E R T A B L E S -- +----------------------------- + +alter table bestilling_progress +add column skattekort_status varchar(2048); \ No newline at end of file diff --git a/apps/dolly-backend/src/test/java/no/nav/dolly/bestilling/inntektsmelding/domain/InntektsmeldingRequestTest.java b/apps/dolly-backend/src/test/java/no/nav/dolly/bestilling/inntektsmelding/domain/InntektsmeldingRequestTest.java new file mode 100644 index 00000000000..458c40a315f --- /dev/null +++ b/apps/dolly-backend/src/test/java/no/nav/dolly/bestilling/inntektsmelding/domain/InntektsmeldingRequestTest.java @@ -0,0 +1,28 @@ +package no.nav.dolly.bestilling.inntektsmelding.domain; + +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import no.nav.dolly.domain.resultset.inntektsmeldingstub.NaturalytelseType; +import org.junit.jupiter.api.Test; + +import static org.assertj.core.api.AssertionsForClassTypes.assertThat; + +class InntektsmeldingRequestTest { + + private final ObjectMapper objectMapper = new ObjectMapper(); + + @Test + void testJsonSerializationOfNaturalYtelseDetaljer() + throws JsonProcessingException { + + for (NaturalytelseType type : NaturalytelseType.values()) { + var detail = new InntektsmeldingRequest.NaturalYtelseDetaljer(); + detail.setNaturalytelseType(type); + var json = objectMapper.writeValueAsString(detail); + assertThat(json) + .contains("\"naturalytelseType\":\"" + type.getJsonValue() + "\""); + } + + } + +} diff --git a/apps/dolly-backend/src/test/java/no/nav/dolly/bestilling/inntektsmelding/mapper/InntektsmeldingMappingStrategyTest.java b/apps/dolly-backend/src/test/java/no/nav/dolly/bestilling/inntektsmelding/mapper/InntektsmeldingMappingStrategyTest.java index d4a57c7e8ae..657a4006b14 100644 --- a/apps/dolly-backend/src/test/java/no/nav/dolly/bestilling/inntektsmelding/mapper/InntektsmeldingMappingStrategyTest.java +++ b/apps/dolly-backend/src/test/java/no/nav/dolly/bestilling/inntektsmelding/mapper/InntektsmeldingMappingStrategyTest.java @@ -187,14 +187,35 @@ void mapJoarkdataEmptyyMedIdent() { @Test void mapInntektsmeldingSjekkeEnumFelter() { - var target = mapperFacade.map(populateRsInntektsmelding(), InntektsmeldingRequest.class).getInntekter().getFirst(); - assertThat(target.getAarsakTilInnsending(), is(equalTo(AarsakInnsendingKodeListe.NY))); - assertThat(target.getArbeidsforhold().getBeregnetInntekt().getAarsakVedEndring(), is(equalTo("TARIFFENDRING"))); - assertThat(target.getArbeidsforhold().getUtsettelseAvForeldrepengerListe().getFirst().getAarsakTilUtsettelse(), is(equalTo("LOVBESTEMT_FERIE"))); - assertThat(target.getSykepengerIArbeidsgiverperioden().getBegrunnelseForReduksjonEllerIkkeUtbetalt(), is(equalTo("BETVILER_ARBEIDSUFOERHET"))); - assertThat(target.getYtelse(), is(equalTo(YtelseKodeListe.OPPLAERINGSPENGER))); - assertThat(target.getOpphoerAvNaturalytelseListe().getFirst().getNaturalytelseType(), is(equalTo("BEDRIFTSBARNEHAGEPLASS"))); - assertThat(target.getGjenopptakelseNaturalytelseListe().getFirst().getNaturalytelseType(), is(equalTo("BEDRIFTSBARNEHAGEPLASS"))); + var original = populateRsInntektsmelding(); + var mapped = mapperFacade.map(original, InntektsmeldingRequest.class).getInntekter().getFirst(); + assertThat(mapped.getAarsakTilInnsending(), is(equalTo(AarsakInnsendingKodeListe.NY))); + assertThat(mapped.getArbeidsforhold().getBeregnetInntekt().getAarsakVedEndring(), is(equalTo("TARIFFENDRING"))); + assertThat(mapped.getArbeidsforhold().getUtsettelseAvForeldrepengerListe().getFirst().getAarsakTilUtsettelse(), is(equalTo("LOVBESTEMT_FERIE"))); + assertThat(mapped.getSykepengerIArbeidsgiverperioden().getBegrunnelseForReduksjonEllerIkkeUtbetalt(), is(equalTo("BETVILER_ARBEIDSUFOERHET"))); + assertThat(mapped.getYtelse(), is(equalTo(YtelseKodeListe.OPPLAERINGSPENGER))); + + for (NaturalytelseType originalNaturalytelseType : NaturalytelseType.values()) { + original.getInntekter().getFirst().getGjenopptakelseNaturalytelseListe().getFirst().setNaturalytelseType(originalNaturalytelseType); + original.getInntekter().getFirst().getOpphoerAvNaturalytelseListe().getFirst().setNaturalytelseType(originalNaturalytelseType); + mapped = mapperFacade.map(original, InntektsmeldingRequest.class).getInntekter().getFirst(); + var mappedNaturalytelseType = mapped + .getOpphoerAvNaturalytelseListe() + .getFirst() + .getNaturalytelseType(); + assertThat(mappedNaturalytelseType, is(equalTo(originalNaturalytelseType.getJsonValue()))); + originalNaturalytelseType = original + .getInntekter() + .getFirst() + .getGjenopptakelseNaturalytelseListe() + .getFirst() + .getNaturalytelseType(); + mappedNaturalytelseType = mapped + .getGjenopptakelseNaturalytelseListe() + .getFirst() + .getNaturalytelseType(); + assertThat(mappedNaturalytelseType, is(equalTo(originalNaturalytelseType.getJsonValue()))); + } } @Test @@ -254,4 +275,5 @@ void mapArbeidsforhold() { assertThat(target.getUtsettelseAvForeldrepengerListe().getFirst().getPeriode().getFom(), is(equalTo(START_DATO.atStartOfDay()))); assertThat(target.getUtsettelseAvForeldrepengerListe().getFirst().getPeriode().getTom(), is(equalTo(SLUTT_DATO.atStartOfDay()))); } + } diff --git a/apps/dolly-frontend/build.gradle b/apps/dolly-frontend/build.gradle index 18c9cfef1b8..92c4a4dae0e 100644 --- a/apps/dolly-frontend/build.gradle +++ b/apps/dolly-frontend/build.gradle @@ -1,60 +1,21 @@ plugins { - id "org.sonarqube" version "5.0.0.4638" - id 'java' - id 'org.springframework.boot' version "3.2.6" - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" -} - -test { - useJUnitPlatform() + id "dolly-apps" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "dolly-frontend" property "sonar.projectName", "dolly-frontend" - property "sonar.sourceEncoding", "UTF-8" property 'sonar.sources', 'src/main/java,src/main/js' } } -bootJar { - archiveFileName = "app.jar" -} -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1' - mavenBom 'org.springframework.session:spring-session-bom:2021.2.3' - - } -} - -repositories { - mavenCentral() - mavenLocal() -} - configurations { configureEach { exclude group: 'org.springframework.boot', module: 'spring-boot-starter-actuator' } } -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } -} - dependencies { implementation 'no.nav.testnav.libs:security-core' implementation 'no.nav.testnav.libs:reactive-core' @@ -69,22 +30,12 @@ dependencies { implementation 'org.springframework.session:spring-session-core' implementation 'org.springframework.session:spring-session-data-redis' - implementation 'org.springframework.boot:spring-boot-starter-webflux' implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server' implementation 'org.springframework.boot:spring-boot-starter-oauth2-client' implementation 'org.springframework.boot:spring-boot-starter-security' implementation 'org.springframework.boot:spring-boot-starter-data-redis' - implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' implementation 'org.springframework.cloud:spring-cloud-starter-gateway' - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' - implementation 'org.hibernate.validator:hibernate-validator' - - testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' - - implementation 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' } \ No newline at end of file diff --git a/apps/dolly-frontend/settings.gradle b/apps/dolly-frontend/settings.gradle index a9afc681dd0..aff0f7d00e4 100644 --- a/apps/dolly-frontend/settings.gradle +++ b/apps/dolly-frontend/settings.gradle @@ -4,15 +4,17 @@ plugins { rootProject.name = 'dolly-frontend' +includeBuild "../../plugins/java" + +includeBuild '../../.github/workflows' +includeBuild '../../libs/data-transfer-objects' includeBuild '../../libs/reactive-core' +includeBuild '../../libs/reactive-frontend' +includeBuild '../../libs/reactive-proxy' includeBuild '../../libs/reactive-security' includeBuild '../../libs/reactive-session-security' includeBuild '../../libs/security-core' -includeBuild '../../libs/reactive-frontend' -includeBuild '../../libs/reactive-proxy' -includeBuild '../../libs/data-transfer-objects' includeBuild '../../libs/security-core' -includeBuild '../../.github/workflows' develocity { buildScan { diff --git a/apps/dolly-frontend/src/main/java/no/nav/dolly/web/DollyFrontendApplicationStarter.java b/apps/dolly-frontend/src/main/java/no/nav/dolly/web/DollyFrontendApplicationStarter.java index 1250d63cceb..06c00ec7121 100644 --- a/apps/dolly-frontend/src/main/java/no/nav/dolly/web/DollyFrontendApplicationStarter.java +++ b/apps/dolly-frontend/src/main/java/no/nav/dolly/web/DollyFrontendApplicationStarter.java @@ -131,4 +131,4 @@ private Function> createRoute(String segment, St .filters(filter, addUserJwtHeaderFilter()) ).uri(host); } -} +} \ No newline at end of file diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdl/visning/partials/relasjoner/PdlForeldreansvar.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdl/visning/partials/relasjoner/PdlForeldreansvar.tsx index 7132640215d..8ebf394a467 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdl/visning/partials/relasjoner/PdlForeldreansvar.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdl/visning/partials/relasjoner/PdlForeldreansvar.tsx @@ -19,6 +19,7 @@ const PdlForeldreansvarVisning = ({ data, idx }: VisningProps) => { return (
+ {data.ansvarligUtenIdentifikator && (
diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/familierelasjoner/foreldreansvar/Foreldreansvar.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/familierelasjoner/foreldreansvar/Foreldreansvar.tsx index e60867dfe81..5275e65456d 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/familierelasjoner/foreldreansvar/Foreldreansvar.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/form/partials/familierelasjoner/foreldreansvar/Foreldreansvar.tsx @@ -145,7 +145,7 @@ export const ForeldreansvarForm = ({ /> - {ansvar === 'ANDRE' && !opts?.personFoerLeggTil && ( + {ansvar === 'ANDRE' && ( )} - {(getTypeAnsvarlig() === TypeAnsvarlig.EKSISTERENDE || !kanHaForeldreansvar) && ( + {getTypeAnsvarlig() === TypeAnsvarlig.EKSISTERENDE && ( { + return !!value || testcontext.parent?.ansvar !== 'ANDRE' + }) + .nullable(), ansvarlig: Yup.string() .test('ansvarlig-andre-paakrevd', 'Ansvarlig person må velges', (value, testcontext) => { return ( @@ -331,7 +336,10 @@ export const foreldreansvar = Yup.object({ ansvarssubjekt: Yup.string() .test('ansvarssubjekt-er-paakrevd', 'Ansvarssubjekt er påkrevd', (value, testcontext) => { return ( - !!value || testcontext.parent?.ansvarlig || !testcontext.options?.context?.personFoerLeggTil + !!value || + testcontext.parent?.ansvarlig || + testcontext.parent?.typeAnsvarlig !== 'EKSISTERENDE' || + !testcontext.options?.context?.personFoerLeggTil ) }) .nullable(), diff --git a/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/visning/partials/Foreldreansvar.tsx b/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/visning/partials/Foreldreansvar.tsx index 3eadd22b785..afac3357144 100644 --- a/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/visning/partials/Foreldreansvar.tsx +++ b/apps/dolly-frontend/src/main/js/src/components/fagsystem/pdlf/visning/partials/Foreldreansvar.tsx @@ -35,6 +35,7 @@ const ForeldreansvarLes = ({ foreldreansvarData, redigertRelatertePersoner, rela
<> + { - const submit = async () => { - setVisningModus(Modus.LoadingPdlf) - await PdlforvalterApi.setStandalone(ident).then((importResponse) => { - if (importResponse?.ok) { - sendData(data) - } - }) - } - mountedRef.current = false - return submit() - }, []) - const handleDelete = useCallback(() => { const slett = async () => { setVisningModus(Modus.LoadingPdlf) @@ -228,11 +215,7 @@ export const VisningRedigerbar = ({ const handleDeleteRelatertPerson = useCallback(() => { const slett = async () => { setVisningModus(Modus.LoadingPdlf) - await PdlforvalterApi.setStandalone(relatertPersonInfo?.ident)?.then((importResponse) => { - if (importResponse?.ok) { - sendSlett() - } - }) + sendSlett() } mountedRef.current = false return slett() @@ -417,13 +400,7 @@ export const VisningRedigerbar = ({ )} {visningModus === Modus.Skriv && ( -
- relatertPersonInfo?.ident - ? handleSubmitRelatertPerson(data?.data, relatertPersonInfo.ident) - : handleSubmit(data?.data) - } - > + handleSubmit(data?.data)}> <>
diff --git a/apps/dolly-frontend/src/main/js/src/service/services/pdl/PdlForvalterService.tsx b/apps/dolly-frontend/src/main/js/src/service/services/pdl/PdlForvalterService.tsx index ee25d3016f2..c6cd79aba55 100644 --- a/apps/dolly-frontend/src/main/js/src/service/services/pdl/PdlForvalterService.tsx +++ b/apps/dolly-frontend/src/main/js/src/service/services/pdl/PdlForvalterService.tsx @@ -39,11 +39,4 @@ export default { const endpoint = `${getPdlUrl()}/personer/${ident}/${attributt}/${id}` return Request.delete(endpoint) }, - setStandalone(ident: string, standalone = true) { - if (!ident) { - return - } - const endpoint = `${getPdlUrl()}/identiteter/${ident}/standalone/${standalone}` - return Request.putWithoutResponse(endpoint) - }, } diff --git a/apps/dollystatus/build.gradle b/apps/dollystatus/build.gradle index 162014f21f7..b8a85394b88 100644 --- a/apps/dollystatus/build.gradle +++ b/apps/dollystatus/build.gradle @@ -1,52 +1,15 @@ plugins { - id 'java' - id "org.sonarqube" version "5.0.0.4638" - id 'org.springframework.boot' version "3.2.6" - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" -} - -test { - useJUnitPlatform() + id "dolly-apps" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnav-dollystatus" property "sonar.projectName", "testnav-dollystatus" - property "sonar.sourceEncoding", "UTF-8" property 'sonar.sources', 'src/main/java,src/main/js' } } -bootJar { - archiveFileName = "app.jar" -} -dependencyManagement { - applyMavenExclusions = false - imports { - } -} - -repositories { - mavenCentral() - mavenLocal() -} - dependencies { implementation 'org.springframework.boot:spring-boot-starter-web' - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' - testImplementation 'org.springframework.boot:spring-boot-starter-test' -} -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } } diff --git a/apps/dollystatus/settings.gradle b/apps/dollystatus/settings.gradle index f864b6f87f4..b2b73bf4094 100644 --- a/apps/dollystatus/settings.gradle +++ b/apps/dollystatus/settings.gradle @@ -4,6 +4,8 @@ plugins { rootProject.name = 'dollystatus' +includeBuild "../../plugins/java" + develocity { buildScan { termsOfUseUrl = "https://gradle.com/terms-of-service" diff --git a/apps/dollystatus/src/main/resources/application.yml b/apps/dollystatus/src/main/resources/application.yml index ff84d84209f..37c37ed05b2 100644 --- a/apps/dollystatus/src/main/resources/application.yml +++ b/apps/dollystatus/src/main/resources/application.yml @@ -1,3 +1,8 @@ +spring: + cloud: + vault: + enabled: false + management: endpoints: enabled-by-default: true @@ -9,8 +14,10 @@ management: endpoint: prometheus.enabled: true heapdump.enabled: true - metrics.export: - prometheus.enabled: true + prometheus: + metrics: + export: + enabled: true server: servlet: encoding: diff --git a/apps/endringsmelding-frontend/build.gradle b/apps/endringsmelding-frontend/build.gradle index f0f0c61c7e8..24a8ee7adbc 100644 --- a/apps/endringsmelding-frontend/build.gradle +++ b/apps/endringsmelding-frontend/build.gradle @@ -1,47 +1,16 @@ plugins { - id 'java' - id "org.sonarqube" version "5.0.0.4638" - id 'org.springframework.boot' version "3.2.6" - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" -} - -test { - useJUnitPlatform() + id "dolly-apps" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnav-endringsmelding-frontend" property "sonar.projectName", "testnav-endringsmelding-frontend" - property "sonar.sourceEncoding", "UTF-8" property 'sonar.sources', 'src/main/java,src/main/js' property 'sonar.tests', 'src/test/java' } } -bootJar { - archiveFileName = "app.jar" -} -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.0' - } -} - -repositories { - mavenCentral() - mavenLocal() -} - configurations { configureEach { exclude group: 'org.springframework.boot', module: 'spring-boot-starter-actuator' @@ -62,27 +31,9 @@ dependencies { implementation 'no.nav.testnav.libs:reactive-frontend' - implementation 'org.springframework.boot:spring-boot-starter-webflux' implementation 'org.springframework.boot:spring-boot-starter-oauth2-client' - implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' implementation 'org.springframework.cloud:spring-cloud-starter-gateway' - implementation 'org.springframework.boot:spring-boot-starter-actuator' - - implementation 'io.micrometer:micrometer-registry-prometheus' - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' - implementation 'org.hibernate.validator:hibernate-validator' - - testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' - - implementation 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' -} -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } } diff --git a/apps/endringsmelding-frontend/settings.gradle b/apps/endringsmelding-frontend/settings.gradle index bb1e3ed5b09..6f85d6501c5 100644 --- a/apps/endringsmelding-frontend/settings.gradle +++ b/apps/endringsmelding-frontend/settings.gradle @@ -4,11 +4,12 @@ plugins { rootProject.name = 'endringsmelding-frontend' +includeBuild "../../plugins/java" includeBuild '../../libs/reactive-core' -includeBuild '../../libs/security-core' -includeBuild '../../libs/reactive-session-security' includeBuild '../../libs/reactive-frontend' +includeBuild '../../libs/reactive-session-security' +includeBuild '../../libs/security-core' develocity { buildScan { diff --git a/apps/endringsmelding-service/build.gradle b/apps/endringsmelding-service/build.gradle index b7545bf7e07..06911756cd6 100644 --- a/apps/endringsmelding-service/build.gradle +++ b/apps/endringsmelding-service/build.gradle @@ -1,45 +1,14 @@ plugins { - id 'java' - id "org.sonarqube" version "5.0.0.4638" - id 'org.springframework.boot' version "3.2.6" - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" -} - -test { - useJUnitPlatform() + id "dolly-apps" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnav-endringsmelding-service" property "sonar.projectName", "testnav-endringsmelding-service" - property "sonar.sourceEncoding", "UTF-8" - } -} - -bootJar { - archiveFileName = "app.jar" -} -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.0' } } -repositories { - mavenCentral() - mavenLocal() -} - dependencies { implementation 'no.nav.testnav.libs:security-core' implementation 'no.nav.testnav.libs:reactive-core' @@ -47,29 +16,12 @@ dependencies { implementation 'no.nav.testnav.libs:data-transfer-objects' implementation 'no.nav.testnav.libs:data-transfer-search-objects' - implementation 'org.springframework.boot:spring-boot-starter-webflux' implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server' - - implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' implementation 'org.springframework.cloud:spring-cloud-starter-bootstrap' // TODO remove legacy bootstrap config - implementation 'org.springframework.boot:spring-boot-starter-actuator' - implementation 'io.micrometer:micrometer-registry-prometheus' - implementation 'org.hibernate.validator:hibernate-validator' - implementation 'org.springdoc:springdoc-openapi-starter-webflux-ui:2.5.0' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.21' - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' + implementation "org.springdoc:springdoc-openapi-starter-webflux-ui:$versions.springdoc" + implementation "io.swagger.core.v3:swagger-annotations-jakarta:$versions.swagger" - testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' - - implementation 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' -} -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } } diff --git a/apps/endringsmelding-service/settings.gradle b/apps/endringsmelding-service/settings.gradle index 195644bd8c1..4d0b0949ca0 100644 --- a/apps/endringsmelding-service/settings.gradle +++ b/apps/endringsmelding-service/settings.gradle @@ -4,11 +4,13 @@ plugins { rootProject.name = 'endringsmelding-service' -includeBuild '../../libs/security-core' -includeBuild '../../libs/reactive-core' -includeBuild '../../libs/reactive-security' +includeBuild "../../plugins/java" + includeBuild '../../libs/data-transfer-objects' includeBuild '../../libs/data-transfer-search-objects' +includeBuild '../../libs/reactive-core' +includeBuild '../../libs/reactive-security' +includeBuild '../../libs/security-core' develocity { buildScan { diff --git a/apps/ereg-batch-status-service/build.gradle b/apps/ereg-batch-status-service/build.gradle index f1770bf46e8..d0262742b65 100644 --- a/apps/ereg-batch-status-service/build.gradle +++ b/apps/ereg-batch-status-service/build.gradle @@ -1,44 +1,14 @@ plugins { - id 'java' - id "org.sonarqube" version "5.0.0.4638" - id 'org.springframework.boot' version "3.2.6" - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" -} - -test { - useJUnitPlatform() + id "dolly-apps" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnav-ereg-batch-status-service" property "sonar.projectName", "testnav-ereg-batch-status-service" - property "sonar.sourceEncoding", "UTF-8" - } -} -bootJar { - archiveFileName = "app.jar" -} - -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1' } } -repositories { - mavenCentral() - mavenLocal() -} dependencies { @@ -47,33 +17,14 @@ dependencies { implementation 'no.nav.testnav.libs:reactive-security' implementation 'no.nav.testnav.libs:security-core' - implementation 'org.springframework.boot:spring-boot-starter-webflux' implementation 'org.springframework.boot:spring-boot-starter-oauth2-client' implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server' implementation 'org.springframework.boot:spring-boot-starter-security' implementation 'org.springframework.cloud:spring-cloud-starter-gateway' - implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' - - implementation 'org.springframework.boot:spring-boot-starter-actuator' - - implementation 'io.micrometer:micrometer-registry-prometheus' - implementation 'org.springdoc:springdoc-openapi-starter-webflux-ui:2.5.0' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.21' - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' - implementation 'org.hibernate.validator:hibernate-validator' + implementation "org.springdoc:springdoc-openapi-starter-webflux-ui:$versions.springdoc" + implementation "io.swagger.core.v3:swagger-annotations-jakarta:$versions.swagger" - testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' - - implementation 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' -} - -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } } diff --git a/apps/ereg-batch-status-service/settings.gradle b/apps/ereg-batch-status-service/settings.gradle index eb73708e812..bcd8fc92ccc 100644 --- a/apps/ereg-batch-status-service/settings.gradle +++ b/apps/ereg-batch-status-service/settings.gradle @@ -4,6 +4,8 @@ plugins { rootProject.name = 'ereg-batch-status-service' +includeBuild "../../plugins/java" + includeBuild '../../libs/data-transfer-objects' includeBuild '../../libs/reactive-core' includeBuild '../../libs/reactive-security' diff --git a/apps/faste-data-frontend/build.gradle b/apps/faste-data-frontend/build.gradle index f5e99c74ca0..8c9baa24c51 100644 --- a/apps/faste-data-frontend/build.gradle +++ b/apps/faste-data-frontend/build.gradle @@ -1,47 +1,16 @@ plugins { - id 'java' - id "org.sonarqube" version "5.0.0.4638" - id 'org.springframework.boot' version "3.2.6" - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" -} - -test { - useJUnitPlatform() + id "dolly-apps" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnav-faste-data-frontend" property "sonar.projectName", "testnav-faste-data-frontend" - property "sonar.sourceEncoding", "UTF-8" property 'sonar.sources', 'src/main/java,src/main/js' property 'sonar.tests', 'src/test/java' } } -bootJar { - archiveFileName = "app.jar" -} -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1' - } -} - -repositories { - mavenCentral() - mavenLocal() -} - configurations { configureEach { exclude group: 'ch.qos.logback', module: 'logback-classic' @@ -62,27 +31,9 @@ dependencies { implementation 'no.nav.testnav.libs:reactive-frontend' - implementation 'org.springframework.boot:spring-boot-starter-webflux' implementation 'org.springframework.boot:spring-boot-starter-oauth2-client' - implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' implementation 'org.springframework.cloud:spring-cloud-starter-gateway' - implementation 'org.springframework.boot:spring-boot-starter-actuator' - - implementation 'io.micrometer:micrometer-registry-prometheus' - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' - implementation 'org.hibernate.validator:hibernate-validator' - - testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' - - implementation 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' -} -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } } diff --git a/apps/faste-data-frontend/settings.gradle b/apps/faste-data-frontend/settings.gradle index e6abb754462..921b9e7763e 100644 --- a/apps/faste-data-frontend/settings.gradle +++ b/apps/faste-data-frontend/settings.gradle @@ -4,10 +4,12 @@ plugins { rootProject.name = 'faste-data-frontend' +includeBuild "../../plugins/java" + includeBuild '../../libs/reactive-core' -includeBuild '../../libs/security-core' -includeBuild '../../libs/reactive-session-security' includeBuild '../../libs/reactive-frontend' +includeBuild '../../libs/reactive-session-security' +includeBuild '../../libs/security-core' develocity { buildScan { diff --git a/apps/generer-arbeidsforhold-populasjon-service/build.gradle b/apps/generer-arbeidsforhold-populasjon-service/build.gradle index 504d1eb7244..96d217a72ff 100644 --- a/apps/generer-arbeidsforhold-populasjon-service/build.gradle +++ b/apps/generer-arbeidsforhold-populasjon-service/build.gradle @@ -1,45 +1,14 @@ plugins { - id 'java' - id "org.sonarqube" version "5.0.0.4638" - id 'org.springframework.boot' version "3.2.6" - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" -} - -test { - useJUnitPlatform() + id "dolly-apps" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnav-generer-arbeidsforhold-populasjon-service" property "sonar.projectName", "testnav-generer-arbeidsforhold-populasjon-service" - property "sonar.sourceEncoding", "UTF-8" - } -} - -bootJar { - archiveFileName = "app.jar" -} -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1' } } -repositories { - mavenCentral() - mavenLocal() -} - dependencies { @@ -51,27 +20,11 @@ dependencies { implementation 'no.nav.testnav.libs:commands' implementation 'org.springframework.boot:spring-boot-starter-web' - implementation 'org.springframework.boot:spring-boot-starter-webflux' implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server' implementation 'org.springframework.boot:spring-boot-starter-web' - implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' - - implementation 'io.micrometer:micrometer-registry-prometheus' - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.3.0' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.21' - implementation 'org.hibernate.validator:hibernate-validator' + implementation "org.springdoc:springdoc-openapi-starter-webmvc-ui:$versions.springdoc" + implementation "io.swagger.core.v3:swagger-annotations-jakarta:$versions.swagger" - testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' - - implementation 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' -} -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } } diff --git a/apps/generer-arbeidsforhold-populasjon-service/settings.gradle b/apps/generer-arbeidsforhold-populasjon-service/settings.gradle index ea5cee3eeb2..8489d0c4c11 100644 --- a/apps/generer-arbeidsforhold-populasjon-service/settings.gradle +++ b/apps/generer-arbeidsforhold-populasjon-service/settings.gradle @@ -4,12 +4,13 @@ plugins { rootProject.name = 'generer-arbeidsforhold-populasjon-service' +includeBuild "../../plugins/java" +includeBuild '../../libs/commands' +includeBuild '../../libs/data-transfer-objects' includeBuild '../../libs/security-core' includeBuild '../../libs/servlet-core' includeBuild '../../libs/servlet-insecure-security' -includeBuild '../../libs/commands' -includeBuild '../../libs/data-transfer-objects' develocity { buildScan { diff --git a/apps/generer-navn-service/build.gradle b/apps/generer-navn-service/build.gradle index 7d0da904ed8..daed7ca1a1f 100644 --- a/apps/generer-navn-service/build.gradle +++ b/apps/generer-navn-service/build.gradle @@ -1,44 +1,14 @@ plugins { - id 'java' - id "org.sonarqube" version "5.0.0.4638" - id 'org.springframework.boot' version "3.2.6" - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" -} - -test { - useJUnitPlatform() + id "dolly-apps" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnav-generer-navn-service" property "sonar.projectName", "testnav-generer-navn-service" - property "sonar.sourceEncoding", "UTF-8" - } -} -bootJar { - archiveFileName = "app.jar" -} - -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1' } } -repositories { - mavenCentral() - mavenLocal() -} dependencies { implementation 'no.nav.testnav.libs:security-core' @@ -47,30 +17,12 @@ dependencies { implementation 'no.nav.testnav.libs:data-transfer-objects' implementation 'no.nav.testnav.libs:servlet-security' - implementation 'org.springframework.boot:spring-boot-starter-webflux' implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'org.springframework.boot:spring-boot-starter-oauth2-client' implementation 'org.springframework.boot:spring-boot-starter-security' - - implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' - implementation 'org.springframework.boot:spring-boot-starter-actuator' - - implementation 'io.micrometer:micrometer-registry-prometheus' - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.3.0' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.21' - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' - implementation 'org.hibernate.validator:hibernate-validator' + implementation "org.springdoc:springdoc-openapi-starter-webmvc-ui:$versions.springdoc" + implementation "io.swagger.core.v3:swagger-annotations-jakarta:$versions.swagger" - testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' - - implementation 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' -} -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } } diff --git a/apps/generer-navn-service/settings.gradle b/apps/generer-navn-service/settings.gradle index 6b1c7e0c795..cd3395308ff 100644 --- a/apps/generer-navn-service/settings.gradle +++ b/apps/generer-navn-service/settings.gradle @@ -4,10 +4,12 @@ plugins { rootProject.name = 'generer-navn-service' -includeBuild '../../libs/security-core' -includeBuild '../../libs/servlet-core' +includeBuild "../../plugins/java" + includeBuild '../../libs/commands' includeBuild '../../libs/data-transfer-objects' +includeBuild '../../libs/security-core' +includeBuild '../../libs/servlet-core' includeBuild '../../libs/servlet-security' includeBuild '../../libs/testing' diff --git a/apps/generer-organisasjon-populasjon-service/build.gradle b/apps/generer-organisasjon-populasjon-service/build.gradle index 04fc5fbc162..9c1768c82f4 100644 --- a/apps/generer-organisasjon-populasjon-service/build.gradle +++ b/apps/generer-organisasjon-populasjon-service/build.gradle @@ -1,47 +1,14 @@ plugins { - id 'java' - id "org.sonarqube" version "5.0.0.4638" - id 'org.springframework.boot' version "3.2.6" - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" -} - -test { - useJUnitPlatform() + id "dolly-apps" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnav-generer-organisasjon-populasjon-service" property "sonar.projectName", "testnav-generer-organisasjon-populasjon-service" - property "sonar.sourceEncoding", "UTF-8" - } -} -bootJar { - archiveFileName = "app.jar" -} - -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1' } } -repositories { - mavenCentral() - mavenLocal() - maven { - url = uri('https://packages.confluent.io/maven/') - } -} dependencies { implementation 'no.nav.testnav.libs:avro-schema' @@ -56,42 +23,26 @@ dependencies { implementation 'no.nav.testnav.libs:servlet-security' implementation 'org.springframework.boot:spring-boot-starter-web' - implementation 'org.springframework.boot:spring-boot-starter-webflux' implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server' implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'org.springframework.boot:spring-boot-starter-data-jpa' - implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' implementation 'org.springframework.cloud:spring-cloud-vault-config-databases' implementation 'org.springframework.cloud:spring-cloud-starter-bootstrap' // TODO remove legacy bootstrap config - implementation 'org.springframework.boot:spring-boot-starter-actuator' - implementation 'io.micrometer:micrometer-registry-prometheus' implementation 'org.springframework.kafka:spring-kafka' - implementation 'io.confluent:kafka-avro-serializer:7.5.1' - implementation 'jakarta.validation:jakarta.validation-api:3.1.0' + implementation "io.confluent:kafka-avro-serializer:$versions.avro" + implementation "jakarta.validation:jakarta.validation-api:$versions.jakartaValidation" implementation 'org.flywaydb:flyway-core' implementation 'com.h2database:h2' implementation 'com.zaxxer:HikariCP' - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.3.0' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.21' - implementation 'org.projectreactor:reactor-spring:1.0.1.RELEASE' - implementation 'org.hibernate.validator:hibernate-validator' + implementation "org.springdoc:springdoc-openapi-starter-webmvc-ui:$versions.springdoc" + implementation "io.swagger.core.v3:swagger-annotations-jakarta:$versions.swagger" + implementation "org.projectreactor:reactor-spring:$versions.reactorSpring" implementation 'org.postgresql:postgresql' - testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' - - implementation 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' -} -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } } diff --git a/apps/generer-organisasjon-populasjon-service/settings.gradle b/apps/generer-organisasjon-populasjon-service/settings.gradle index 059701787b3..27ad3a8130f 100644 --- a/apps/generer-organisasjon-populasjon-service/settings.gradle +++ b/apps/generer-organisasjon-populasjon-service/settings.gradle @@ -4,6 +4,8 @@ plugins { rootProject.name = 'generer-organisasjon-populasjon-service' +includeBuild "../../plugins/java" + includeBuild '../../libs/avro-schema' includeBuild '../../libs/commands' includeBuild '../../libs/data-transfer-objects' diff --git a/apps/generer-synt-amelding-service/build.gradle b/apps/generer-synt-amelding-service/build.gradle index 0f8e7ecafcd..582abaf023a 100644 --- a/apps/generer-synt-amelding-service/build.gradle +++ b/apps/generer-synt-amelding-service/build.gradle @@ -1,44 +1,14 @@ plugins { - id 'java' - id "org.sonarqube" version "5.0.0.4638" - id 'org.springframework.boot' version "3.2.6" - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" -} - -test { - useJUnitPlatform() + id "dolly-apps" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnav-generer-synt-amelding-service" property "sonar.projectName", "testnav-generer-synt-amelding-service" - property "sonar.sourceEncoding", "UTF-8" - } -} -bootJar { - archiveFileName = "app.jar" -} - -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1' } } -repositories { - mavenCentral() - mavenLocal() -} dependencies { implementation 'no.nav.testnav.libs:domain' @@ -47,32 +17,14 @@ dependencies { implementation 'no.nav.testnav.libs:servlet-core' implementation 'no.nav.testnav.libs:servlet-security' - implementation 'org.springframework.boot:spring-boot-starter-webflux' implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'org.springframework.boot:spring-boot-starter-oauth2-client' implementation 'org.springframework.boot:spring-boot-starter-security' - - implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' implementation 'org.springframework.cloud:spring-cloud-starter-bootstrap' // TODO remove legacy bootstrap config - implementation 'org.springframework.boot:spring-boot-starter-actuator' - - implementation 'io.micrometer:micrometer-registry-prometheus' - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.3.0' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.21' - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' - implementation 'org.hibernate.validator:hibernate-validator' + implementation "org.springdoc:springdoc-openapi-starter-webmvc-ui:$versions.springdoc" + implementation "io.swagger.core.v3:swagger-annotations-jakarta:$versions.swagger" - testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' - - implementation 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' -} -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } } diff --git a/apps/generer-synt-amelding-service/settings.gradle b/apps/generer-synt-amelding-service/settings.gradle index 94ab8321af6..ef0b90b9536 100644 --- a/apps/generer-synt-amelding-service/settings.gradle +++ b/apps/generer-synt-amelding-service/settings.gradle @@ -4,6 +4,8 @@ plugins { rootProject.name = 'generer-synt-amelding-service' +includeBuild "../../plugins/java" + includeBuild '../../libs/domain' includeBuild '../../libs/reactive-core' includeBuild '../../libs/security-core' diff --git a/apps/helsepersonell-service/build.gradle b/apps/helsepersonell-service/build.gradle index 5b3300c58b7..f7535f9d68f 100644 --- a/apps/helsepersonell-service/build.gradle +++ b/apps/helsepersonell-service/build.gradle @@ -1,44 +1,14 @@ plugins { - id 'java' - id "org.sonarqube" version "5.0.0.4638" - id 'org.springframework.boot' version "3.2.6" - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" -} - -test { - useJUnitPlatform() + id "dolly-apps" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnav-helsepersonell-service" property "sonar.projectName", "testnav-helsepersonell-service" - property "sonar.sourceEncoding", "UTF-8" } } -bootJar { - archiveFileName = "app.jar" -} -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1' - } -} - -repositories { - mavenCentral() - mavenLocal() -} dependencies { implementation 'no.nav.testnav.libs:data-transfer-objects' @@ -46,31 +16,11 @@ dependencies { implementation 'no.nav.testnav.libs:security-core' implementation 'no.nav.testnav.libs:servlet-core' implementation 'no.nav.testnav.libs:servlet-security' - - implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' implementation 'org.springframework.boot:spring-boot-starter-security' - implementation 'org.springframework.boot:spring-boot-starter-webflux' implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'org.springframework.boot:spring-boot-starter-oauth2-client' - implementation 'org.springframework.boot:spring-boot-starter-actuator' - implementation 'io.micrometer:micrometer-registry-prometheus' - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.3.0' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.21' - - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' - implementation 'org.hibernate.validator:hibernate-validator' - - testImplementation 'org.springframework.boot:spring-boot-starter-test' - - implementation 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' -} - -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } + implementation "org.springdoc:springdoc-openapi-starter-webmvc-ui:$versions.springdoc" + implementation "io.swagger.core.v3:swagger-annotations-jakarta:$versions.swagger" } \ No newline at end of file diff --git a/apps/helsepersonell-service/settings.gradle b/apps/helsepersonell-service/settings.gradle index 034fd5b9ce8..68390be5bd8 100644 --- a/apps/helsepersonell-service/settings.gradle +++ b/apps/helsepersonell-service/settings.gradle @@ -4,6 +4,8 @@ plugins { rootProject.name = 'helsepersonell-service' +includeBuild "../../plugins/java" + includeBuild '../../libs/data-transfer-objects' includeBuild '../../libs/reactive-core' includeBuild '../../libs/security-core' diff --git a/apps/inntektsmelding-generator-service/build.gradle b/apps/inntektsmelding-generator-service/build.gradle index dda73849c21..22e95963649 100644 --- a/apps/inntektsmelding-generator-service/build.gradle +++ b/apps/inntektsmelding-generator-service/build.gradle @@ -1,86 +1,38 @@ plugins { - id 'java' - id "org.sonarqube" version "5.0.0.4638" - id 'org.springframework.boot' version "3.2.6" - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" -} - -test { - useJUnitPlatform() - jvmArgs '--add-opens', 'java.base/java.lang=ALL-UNNAMED' + id "dolly-apps" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnav-inntektsmelding-generator-service" property "sonar.projectName", "testnav-inntektsmelding-generator-service" - property "sonar.sourceEncoding", "UTF-8" - } -} -bootJar { - archiveFileName = "app.jar" - duplicatesStrategy = DuplicatesStrategy.EXCLUDE -} - -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1' } } -repositories { - mavenCentral() - mavenLocal() -} - dependencies { implementation 'no.nav.testnav.libs:servlet-core' implementation 'no.nav.testnav.libs:data-transfer-objects' implementation 'no.nav.testnav.libs:servlet-security' implementation 'org.springframework.boot:spring-boot-starter-web' - implementation 'org.springframework.boot:spring-boot-starter-webflux' implementation 'org.springframework.boot:spring-boot-starter-oauth2-client' implementation 'org.springframework.boot:spring-boot-starter-security' - implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' - implementation 'org.hibernate.validator:hibernate-validator' - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.3.0' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.21' + implementation "org.springdoc:springdoc-openapi-starter-webmvc-ui:$versions.springdoc" + implementation "io.swagger.core.v3:swagger-annotations-jakarta:$versions.swagger" - implementation 'org.aspectj:aspectjweaver:1.9.22' + implementation "org.aspectj:aspectjweaver:$versions.jweaver" - implementation 'jakarta.xml.bind:jakarta.xml.bind-api:4.0.2' - implementation 'org.glassfish.jaxb:jaxb-runtime:4.0.5' - implementation 'com.sun.xml.bind:jaxb-impl:4.0.5' - implementation 'com.sun.xml.bind:jaxb-core:4.0.5' + implementation "jakarta.xml.bind:jakarta.xml.bind-api:$versions.jakartaXmlBindApi" + implementation "org.glassfish.jaxb:jaxb-runtime:$versions.jaxb" + implementation "com.sun.xml.bind:jaxb-impl:$versions.jaxb" + implementation "com.sun.xml.bind:jaxb-core:$versions.jaxb" - implementation 'ma.glasnost.orika:orika-core:1.5.4' + implementation "ma.glasnost.orika:orika-core:$versions.orika" implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-xml' implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.17.0' implementation 'org.apache.commons:commons-text:1.11.0' - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' - - testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' - - implementation 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' -} -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } } diff --git a/apps/inntektsmelding-generator-service/settings.gradle b/apps/inntektsmelding-generator-service/settings.gradle index 97d6a6db0cc..3935a9c629f 100644 --- a/apps/inntektsmelding-generator-service/settings.gradle +++ b/apps/inntektsmelding-generator-service/settings.gradle @@ -4,8 +4,10 @@ plugins { rootProject.name = 'inntektsmelding-generator-service' -includeBuild '../../libs/servlet-core' +includeBuild "../../plugins/java" + includeBuild '../../libs/data-transfer-objects' +includeBuild '../../libs/servlet-core' includeBuild '../../libs/servlet-security' develocity { diff --git a/apps/inntektsmelding-service/build.gradle b/apps/inntektsmelding-service/build.gradle index b761765be6a..67622313baa 100644 --- a/apps/inntektsmelding-service/build.gradle +++ b/apps/inntektsmelding-service/build.gradle @@ -1,44 +1,14 @@ plugins { - id 'java' - id "org.sonarqube" version "5.0.0.4638" - id 'org.springframework.boot' version "3.2.6" - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" -} - -test { - useJUnitPlatform() + id "dolly-apps" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnav-inntektsmelding-service" property "sonar.projectName", "testnav-inntektsmelding-service" - property "sonar.sourceEncoding", "UTF-8" } } -bootJar { - archiveFileName = "app.jar" -} -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1' - } -} - -repositories { - mavenCentral() - mavenLocal() -} dependencies { implementation 'no.nav.testnav.libs:security-core' @@ -50,34 +20,16 @@ dependencies { implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'org.springframework.boot:spring-boot-starter-oauth2-client' implementation 'org.springframework.boot:spring-boot-starter-data-jpa' - implementation 'org.springframework.boot:spring-boot-starter-webflux' implementation 'org.springframework.boot:spring-boot-starter-security' - implementation 'org.springframework.boot:spring-boot-starter-actuator' - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.3.0' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.21' + implementation "org.springdoc:springdoc-openapi-starter-webmvc-ui:$versions.springdoc" + implementation "io.swagger.core.v3:swagger-annotations-jakarta:$versions.swagger" - implementation 'org.hibernate.validator:hibernate-validator' - implementation 'io.micrometer:micrometer-registry-prometheus' - - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' - implementation 'no.nav.tjenestespesifikasjoner:nav-altinn-inntektsmelding:1.2019.08.16-13.46-35cbdfd492d4' + implementation "no.nav.tjenestespesifikasjoner:nav-altinn-inntektsmelding:$versions.navAltinnInntektsmelding" implementation 'org.apache.commons:commons-io:1.3.2' implementation 'org.flywaydb:flyway-core' implementation 'com.h2database:h2' implementation 'org.postgresql:postgresql' - - testImplementation 'org.springframework.boot:spring-boot-starter-test' - - implementation 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' -} - -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } } diff --git a/apps/inntektsmelding-service/settings.gradle b/apps/inntektsmelding-service/settings.gradle index 8067b84e6da..c21b8727a14 100644 --- a/apps/inntektsmelding-service/settings.gradle +++ b/apps/inntektsmelding-service/settings.gradle @@ -4,9 +4,11 @@ plugins { rootProject.name = 'inntektsmelding-service' -includeBuild '../../libs/servlet-core' -includeBuild '../../libs/security-core' +includeBuild "../../plugins/java" + includeBuild '../../libs/data-transfer-objects' +includeBuild '../../libs/security-core' +includeBuild '../../libs/servlet-core' includeBuild '../../libs/servlet-security' develocity { diff --git a/apps/jenkins-batch-status-service/build.gradle b/apps/jenkins-batch-status-service/build.gradle index 3602d672715..96be491762b 100644 --- a/apps/jenkins-batch-status-service/build.gradle +++ b/apps/jenkins-batch-status-service/build.gradle @@ -1,45 +1,14 @@ plugins { - id 'java' - id "org.sonarqube" version "5.0.0.4638" - id 'org.springframework.boot' version "3.2.6" - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" -} - -test { - useJUnitPlatform() + id "dolly-apps" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnav-jenkins-batch-status-service" property "sonar.projectName", "testnav-jenkins-batch-status-service" - property "sonar.sourceEncoding", "UTF-8" - } -} - -bootJar { - archiveFileName = "app.jar" -} -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1' } } -repositories { - mavenCentral() - mavenLocal() -} - dependencies { implementation 'no.nav.testnav.libs:commands' @@ -49,32 +18,14 @@ dependencies { implementation 'no.nav.testnav.libs:servlet-core' implementation 'no.nav.testnav.libs:servlet-security' - implementation 'org.springframework.boot:spring-boot-starter-webflux' implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'org.springframework.boot:spring-boot-starter-oauth2-client' implementation 'org.springframework.boot:spring-boot-starter-security' implementation 'org.springframework.cloud:spring-cloud-starter-bootstrap' // TODO remove legacy bootstrap config - - implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' - implementation 'org.springframework.boot:spring-boot-starter-actuator' - - implementation 'io.micrometer:micrometer-registry-prometheus' - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.3.0' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.21' - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' - implementation 'org.hibernate.validator:hibernate-validator' + implementation "org.springdoc:springdoc-openapi-starter-webmvc-ui:$versions.springdoc" + implementation "io.swagger.core.v3:swagger-annotations-jakarta:$versions.swagger" - testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' - - implementation 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' -} -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } } diff --git a/apps/jenkins-batch-status-service/settings.gradle b/apps/jenkins-batch-status-service/settings.gradle index ea6d3d34ebc..fc49d836f47 100644 --- a/apps/jenkins-batch-status-service/settings.gradle +++ b/apps/jenkins-batch-status-service/settings.gradle @@ -4,6 +4,8 @@ plugins { rootProject.name = 'jenkins-batch-status-service' +includeBuild "../../plugins/java" + includeBuild '../../libs/commands' includeBuild '../../libs/data-transfer-objects' includeBuild '../../libs/reactive-core' diff --git a/apps/joark-dokument-service/build.gradle b/apps/joark-dokument-service/build.gradle index 36736059766..27ac16d7327 100644 --- a/apps/joark-dokument-service/build.gradle +++ b/apps/joark-dokument-service/build.gradle @@ -1,44 +1,14 @@ plugins { - id 'java' - id "org.sonarqube" version "5.0.0.4638" - id 'org.springframework.boot' version "3.2.6" - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" -} - -test { - useJUnitPlatform() + id "dolly-apps" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnav-joark-dokument-service" property "sonar.projectName", "testnav-joark-dokument-service" - property "sonar.sourceEncoding", "UTF-8" - } -} -bootJar { - archiveFileName = "app.jar" -} - -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1' } } -repositories { - mavenCentral() - mavenLocal() -} dependencies { implementation 'no.nav.testnav.libs:domain' @@ -47,31 +17,13 @@ dependencies { implementation 'no.nav.testnav.libs:servlet-core' implementation 'no.nav.testnav.libs:servlet-security' - implementation 'org.springframework.boot:spring-boot-starter-webflux' implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'org.springframework.boot:spring-boot-starter-oauth2-client' implementation 'org.springframework.boot:spring-boot-starter-security' implementation 'org.springframework.cloud:spring-cloud-starter-bootstrap' // TODO remove legacy bootstrap config - - implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' - implementation 'org.springframework.boot:spring-boot-starter-actuator' - - implementation 'io.micrometer:micrometer-registry-prometheus' - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.3.0' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.21' - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' - implementation 'org.hibernate.validator:hibernate-validator' + implementation "org.springdoc:springdoc-openapi-starter-webmvc-ui:$versions.springdoc" + implementation "io.swagger.core.v3:swagger-annotations-jakarta:$versions.swagger" - testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' - - implementation 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' -} -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } } diff --git a/apps/joark-dokument-service/settings.gradle b/apps/joark-dokument-service/settings.gradle index 528397d2541..3616ad10c4e 100644 --- a/apps/joark-dokument-service/settings.gradle +++ b/apps/joark-dokument-service/settings.gradle @@ -4,6 +4,8 @@ plugins { rootProject.name = 'joark-dokument-service' +includeBuild "../../plugins/java" + includeBuild '../../libs/data-transfer-objects' includeBuild '../../libs/domain' includeBuild '../../libs/reactive-core' diff --git a/apps/kodeverk-service/build.gradle b/apps/kodeverk-service/build.gradle index 9b21f20210f..4aeeb607350 100644 --- a/apps/kodeverk-service/build.gradle +++ b/apps/kodeverk-service/build.gradle @@ -1,45 +1,14 @@ plugins { - id 'java' - id "org.sonarqube" version "5.0.0.4638" - id 'org.springframework.boot' version "3.2.6" - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" -} - -test { - useJUnitPlatform() + id "dolly-apps" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnav-kodeverk-service" property "sonar.projectName", "testnav-kodeverk-service" - property "sonar.sourceEncoding", "UTF-8" - } -} -bootJar { - archiveFileName = "app.jar" -} - -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1' } } -repositories { - mavenCentral() - mavenLocal() -} - dependencies { implementation 'no.nav.testnav.libs:security-core' @@ -47,30 +16,14 @@ dependencies { implementation 'no.nav.testnav.libs:reactive-security' implementation 'no.nav.testnav.libs:data-transfer-objects' - implementation 'org.springframework.boot:spring-boot-starter-webflux' implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server' - implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' implementation 'org.springframework.boot:spring-boot-starter-cache' - implementation 'io.micrometer:micrometer-registry-prometheus' - implementation 'org.springdoc:springdoc-openapi-starter-webflux-ui:2.5.0' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.21' - - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' - implementation 'org.hibernate.validator:hibernate-validator' + implementation "org.springdoc:springdoc-openapi-starter-webflux-ui:$versions.springdoc" + implementation "io.swagger.core.v3:swagger-annotations-jakarta:$versions.swagger" implementation 'com.github.ben-manes.caffeine:caffeine' - implementation 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' - - testImplementation 'org.springframework.boot:spring-boot-starter-test' } description = 'kodeverk-service' -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } -} diff --git a/apps/kodeverk-service/config.yml b/apps/kodeverk-service/config.yml index 690c5389cc0..e72ef4771f1 100644 --- a/apps/kodeverk-service/config.yml +++ b/apps/kodeverk-service/config.yml @@ -21,6 +21,7 @@ spec: - application: testnav-oversikt-frontend - application: testnav-pdl-forvalter - application: testnav-pdl-forvalter-dev + - application: testnav-levende-arbeidsforhold-ansettelse outbound: external: - host: kodeverk-api.nav.no @@ -54,4 +55,4 @@ spec: limits: memory: 2048Mi ingresses: - - "https://testnav-kodeverk-service.intern.dev.nav.no" \ No newline at end of file + - "https://testnav-kodeverk-service.intern.dev.nav.no" diff --git a/apps/kodeverk-service/settings.gradle b/apps/kodeverk-service/settings.gradle index 2d8d1f9732e..b0f70bc2265 100644 --- a/apps/kodeverk-service/settings.gradle +++ b/apps/kodeverk-service/settings.gradle @@ -4,10 +4,12 @@ plugins { rootProject.name = 'kodeverk-service' -includeBuild '../../libs/security-core' +includeBuild "../../plugins/java" + +includeBuild '../../libs/data-transfer-objects' includeBuild '../../libs/reactive-core' includeBuild '../../libs/reactive-security' -includeBuild '../../libs/data-transfer-objects' +includeBuild '../../libs/security-core' develocity { buildScan { diff --git a/apps/miljoer-service/build.gradle b/apps/miljoer-service/build.gradle index 2268a8ded03..6ba4a6a7266 100644 --- a/apps/miljoer-service/build.gradle +++ b/apps/miljoer-service/build.gradle @@ -1,44 +1,13 @@ plugins { - id 'java' - id "org.sonarqube" version "5.0.0.4638" - id 'org.springframework.boot' version "3.2.6" - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" -} - -test { - useJUnitPlatform() + id "dolly-apps" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnav-miljoer-service" property "sonar.projectName", "testnav-miljoer-service" - property "sonar.sourceEncoding", "UTF-8" } } -bootJar { - archiveFileName = "app.jar" -} - -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1' - } -} - -repositories { - mavenCentral() - mavenLocal() -} dependencies { @@ -48,31 +17,12 @@ dependencies { implementation 'no.nav.testnav.libs:data-transfer-objects' implementation 'no.nav.testnav.libs:servlet-security' - implementation 'org.springframework.boot:spring-boot-starter-webflux' implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'org.springframework.boot:spring-boot-starter-oauth2-client' implementation 'org.springframework.boot:spring-boot-starter-security' + implementation "org.springdoc:springdoc-openapi-starter-webmvc-ui:$versions.springdoc" + implementation "io.swagger.core.v3:swagger-annotations-jakarta:$versions.swagger" - implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' - implementation 'org.springframework.boot:spring-boot-starter-actuator' - - implementation 'io.micrometer:micrometer-registry-prometheus' - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.3.0' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.21' - - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' - implementation 'org.hibernate.validator:hibernate-validator' - - testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' - - implementation 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' -} -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } } diff --git a/apps/miljoer-service/settings.gradle b/apps/miljoer-service/settings.gradle index b47213c8199..339b7c0335f 100644 --- a/apps/miljoer-service/settings.gradle +++ b/apps/miljoer-service/settings.gradle @@ -4,11 +4,13 @@ plugins { rootProject.name = 'miljoer-service' +includeBuild "../../plugins/java" + +includeBuild '../../libs/commands' +includeBuild '../../libs/data-transfer-objects' includeBuild '../../libs/security-core' includeBuild '../../libs/servlet-core' -includeBuild '../../libs/data-transfer-objects' includeBuild '../../libs/servlet-security' -includeBuild '../../libs/commands' develocity { buildScan { diff --git a/apps/oppsummeringsdokument-service/build.gradle b/apps/oppsummeringsdokument-service/build.gradle index 966479ebb08..98a6449f8ae 100644 --- a/apps/oppsummeringsdokument-service/build.gradle +++ b/apps/oppsummeringsdokument-service/build.gradle @@ -1,60 +1,18 @@ plugins { - id 'java' - id "org.sonarqube" version "5.0.0.4638" - id 'org.springframework.boot' version "3.2.6" - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" -} - -test { - useJUnitPlatform() + id "dolly-apps" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "oppsummeringsdokument-service" property "sonar.projectName", "oppsummeringsdokument-service" - property "sonar.sourceEncoding", "UTF-8" - } -} -bootJar { - archiveFileName = "app.jar" -} - -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1' - } -} - -repositories { - mavenCentral() - mavenLocal() - maven { - url = uri('https://packages.confluent.io/maven/') - } - maven { - name = "GitHubPackages" - url = uri('https://maven.pkg.github.com/navikt/maven-release') - credentials(PasswordCredentials) { - password System.getenv("NAV_TOKEN") - username 'token' - } } } dependencies { - implementation 'jakarta.xml.bind:jakarta.xml.bind-api:4.0.2' - implementation 'javax.activation:activation:1.1.1' - implementation 'org.glassfish.jaxb:jaxb-runtime' + implementation "jakarta.xml.bind:jakarta.xml.bind-api:$versions.jakartaXmlBindApi" + implementation "javax.activation:activation:$versions.javaxActivation" + implementation "org.glassfish.jaxb:jaxb-runtime:$versions.jaxb" implementation 'no.nav.testnav.libs:servlet-core' implementation 'no.nav.testnav.libs:security-core' @@ -62,39 +20,20 @@ dependencies { implementation 'no.nav.testnav.libs:servlet-security' implementation 'no.nav.testnav.xsd:arbeidsforhold-xsd' - implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.17.1' + implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-xml' implementation 'org.springframework.boot:spring-boot-starter-web' - implementation 'org.springframework.boot:spring-boot-starter-webflux' implementation 'org.springframework.boot:spring-boot-starter-oauth2-client' - implementation 'org.opensearch.client:spring-data-opensearch:1.4.0' + implementation "org.opensearch.client:spring-data-opensearch:$versions.opensearch" implementation 'org.springframework.boot:spring-boot-starter-data-elasticsearch' - implementation 'com.fasterxml.jackson.core:jackson-core:2.17.1' - - implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' - implementation 'org.springframework.boot:spring-boot-starter-actuator' - - implementation 'io.micrometer:micrometer-registry-prometheus' + implementation "com.fasterxml.jackson.core:jackson-core:$versions.jackson" - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' implementation 'org.springframework.kafka:spring-kafka' - implementation 'org.apache.kafka:kafka-clients:3.7.0' + implementation "org.apache.kafka:kafka-clients:$versions.apacheKafka" - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.3.0' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.21' - implementation 'org.hibernate.validator:hibernate-validator' + implementation "org.springdoc:springdoc-openapi-starter-webmvc-ui:$versions.springdoc" + implementation "io.swagger.core.v3:swagger-annotations-jakarta:$versions.swagger" - testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' - - implementation 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' -} - -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } } diff --git a/apps/oppsummeringsdokument-service/settings.gradle b/apps/oppsummeringsdokument-service/settings.gradle index 8a131f075be..c63fd9917c8 100644 --- a/apps/oppsummeringsdokument-service/settings.gradle +++ b/apps/oppsummeringsdokument-service/settings.gradle @@ -4,10 +4,11 @@ plugins { rootProject.name = 'oppsummeringsdokument-service' +includeBuild "../../plugins/java" -includeBuild '../../libs/servlet-core' -includeBuild '../../libs/security-core' includeBuild '../../libs/data-transfer-objects' +includeBuild '../../libs/security-core' +includeBuild '../../libs/servlet-core' includeBuild '../../libs/servlet-security' includeBuild '../../xsd/arbeidsforhold-xsd' diff --git a/apps/organisasjon-bestilling-service/build.gradle b/apps/organisasjon-bestilling-service/build.gradle index 3e83640c871..d0f03b0b23a 100644 --- a/apps/organisasjon-bestilling-service/build.gradle +++ b/apps/organisasjon-bestilling-service/build.gradle @@ -1,45 +1,14 @@ plugins { - id 'java' - id "org.sonarqube" version "5.0.0.4638" - id 'org.springframework.boot' version "3.2.6" - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" -} - -test { - useJUnitPlatform() + id "dolly-apps" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "organisasjon-bestilling-service" property "sonar.projectName", "organisasjon-bestilling-service" - property "sonar.sourceEncoding", "UTF-8" } } -bootJar { - archiveFileName = "app.jar" -} -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1' - } -} - -repositories { - mavenCentral() - mavenLocal() -} - dependencies { @@ -52,36 +21,17 @@ dependencies { implementation 'org.springframework.boot:spring-boot-starter-security' implementation 'org.springframework.boot:spring-boot-starter-web' - implementation 'org.springframework.boot:spring-boot-starter-webflux' implementation 'org.springframework.boot:spring-boot-starter-oauth2-client' implementation 'org.springframework.boot:spring-boot-starter-data-jpa' - implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' implementation 'org.springframework.cloud:spring-cloud-starter-bootstrap' // TODO remove legacy bootstrap config - implementation 'org.springframework.boot:spring-boot-starter-actuator' - implementation 'io.micrometer:micrometer-registry-prometheus' implementation 'com.h2database:h2' implementation 'com.zaxxer:HikariCP' implementation 'org.flywaydb:flyway-core' implementation 'org.postgresql:postgresql' - implementation 'org.hibernate.validator:hibernate-validator' - - - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.3.0' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.21' - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' + implementation "org.springdoc:springdoc-openapi-starter-webmvc-ui:$versions.springdoc" + implementation "io.swagger.core.v3:swagger-annotations-jakarta:$versions.swagger" - testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' - - implementation 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' -} - -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } } diff --git a/apps/organisasjon-bestilling-service/settings.gradle b/apps/organisasjon-bestilling-service/settings.gradle index 9be29dd957e..4f619dfb811 100644 --- a/apps/organisasjon-bestilling-service/settings.gradle +++ b/apps/organisasjon-bestilling-service/settings.gradle @@ -4,6 +4,8 @@ plugins { rootProject.name = 'organisasjon-bestilling-service' +includeBuild "../../plugins/java" + includeBuild '../../libs/commands' includeBuild '../../libs/data-transfer-objects' includeBuild '../../libs/reactive-core' diff --git a/apps/organisasjon-faste-data-service/build.gradle b/apps/organisasjon-faste-data-service/build.gradle index 1fe73c4c4b4..adb4ef27310 100644 --- a/apps/organisasjon-faste-data-service/build.gradle +++ b/apps/organisasjon-faste-data-service/build.gradle @@ -1,45 +1,11 @@ plugins { - id 'java' - id "org.sonarqube" version "5.0.0.4638" - id 'org.springframework.boot' version "3.2.6" - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" -} - -test { - useJUnitPlatform() + id "dolly-apps" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnav-organisasjon-faste-data-service" property "sonar.projectName", "testnav-organisasjon-faste-data-service" - property "sonar.sourceEncoding", "UTF-8" - } -} -bootJar { - archiveFileName = "app.jar" -} - -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1' - } -} - -repositories { - mavenCentral() - mavenLocal() - maven { - url = uri('https://packages.confluent.io/maven/') } } @@ -57,39 +23,22 @@ dependencies { implementation 'no.nav.testnav.libs:servlet-security' implementation 'org.springframework.boot:spring-boot-starter-web' - implementation 'org.springframework.boot:spring-boot-starter-webflux' implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server' implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'org.springframework.boot:spring-boot-starter-data-jpa' - implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' implementation 'org.springframework.cloud:spring-cloud-vault-config-databases' - implementation 'org.springframework.boot:spring-boot-starter-actuator' - - implementation 'io.micrometer:micrometer-registry-prometheus' - implementation 'jakarta.validation:jakarta.validation-api:3.1.0' - implementation 'io.confluent:kafka-avro-serializer:7.5.1' + implementation "jakarta.validation:jakarta.validation-api:$versions.jakartaValidation" + implementation "io.confluent:kafka-avro-serializer:$versions.avro" implementation 'org.flywaydb:flyway-core' implementation 'com.zaxxer:HikariCP' implementation 'com.h2database:h2' implementation 'org.postgresql:postgresql' - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.3.0' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.21' - implementation 'org.projectreactor:reactor-spring:1.0.1.RELEASE' - implementation 'org.hibernate.validator:hibernate-validator' + implementation "org.springdoc:springdoc-openapi-starter-webmvc-ui:$versions.springdoc" + implementation "io.swagger.core.v3:swagger-annotations-jakarta:$versions.swagger" + implementation "org.projectreactor:reactor-spring:$versions.reactorSpring" - testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' - - implementation 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' -} -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } } diff --git a/apps/organisasjon-faste-data-service/settings.gradle b/apps/organisasjon-faste-data-service/settings.gradle index 3ebd1db7e45..d46480ab27e 100644 --- a/apps/organisasjon-faste-data-service/settings.gradle +++ b/apps/organisasjon-faste-data-service/settings.gradle @@ -4,6 +4,8 @@ plugins { rootProject.name = 'organisasjon-faste-data-service' +includeBuild "../../plugins/java" + includeBuild '../../libs/avro-schema' includeBuild '../../libs/commands' includeBuild '../../libs/data-transfer-objects' diff --git a/apps/organisasjon-forvalter/build.gradle b/apps/organisasjon-forvalter/build.gradle index d50c5463ff5..03052c5a3ec 100644 --- a/apps/organisasjon-forvalter/build.gradle +++ b/apps/organisasjon-forvalter/build.gradle @@ -1,39 +1,11 @@ plugins { - id 'java' - id "org.sonarqube" version "5.0.0.4638" - id 'org.springframework.boot' version "3.2.6" - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" -} - -test { - useJUnitPlatform() - jvmArgs '--add-opens', 'java.base/java.lang=ALL-UNNAMED' + id "dolly-apps" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnav-organisasjon-forvalter" property "sonar.projectName", "testnav-organisasjon-forvalter" - property "sonar.sourceEncoding", "UTF-8" - } -} - -bootJar { - archiveFileName = "app.jar" -} - -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1' } } @@ -41,20 +13,6 @@ properties { compileJava.options.encoding = 'UTF-8' } -repositories { - mavenCentral() - mavenLocal() - maven { - url = uri('https://packages.confluent.io/maven/') - } -} - -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } -} - dependencies { implementation 'no.nav.testnav.libs:kafka-config' @@ -68,32 +26,24 @@ dependencies { implementation 'no.nav.testnav.libs:commands' implementation 'no.nav.testnav.libs:data-transfer-objects' - implementation 'org.springframework.boot:spring-boot-starter-webflux' implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server' implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'org.springframework.boot:spring-boot-starter-data-jpa' implementation 'org.springframework.boot:spring-boot-starter-security' - implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' implementation 'org.springframework.cloud:spring-cloud-vault-config-databases' - implementation 'org.apache.avro:avro:1.11.3' + implementation "org.apache.avro:avro:$versions.apacheAvro" implementation 'org.flywaydb:flyway-core' implementation 'org.postgresql:postgresql' - implementation 'org.hibernate.validator:hibernate-validator' - - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.3.0' - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' - implementation 'ma.glasnost.orika:orika-core:1.5.4' + implementation "org.springdoc:springdoc-openapi-starter-webmvc-ui:$versions.springdoc" - implementation 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' + implementation "ma.glasnost.orika:orika-core:$versions.orika" testImplementation 'com.h2database:h2' testImplementation 'no.nav.testnav.libs:testing' - testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' } diff --git a/apps/organisasjon-forvalter/settings.gradle b/apps/organisasjon-forvalter/settings.gradle index cad79edd348..a196306f3e1 100644 --- a/apps/organisasjon-forvalter/settings.gradle +++ b/apps/organisasjon-forvalter/settings.gradle @@ -4,16 +4,17 @@ plugins { rootProject.name = 'organisasjon-forvalter' +includeBuild "../../plugins/java" -includeBuild '../../libs/security-core' -includeBuild '../../libs/servlet-core' -includeBuild '../../libs/database' -includeBuild '../../libs/servlet-security' -includeBuild '../../libs/data-transfer-objects' +includeBuild '../../libs/avro-schema' includeBuild '../../libs/commands' +includeBuild '../../libs/data-transfer-objects' +includeBuild '../../libs/database' includeBuild '../../libs/kafka-config' includeBuild '../../libs/kafka-producers' -includeBuild '../../libs/avro-schema' +includeBuild '../../libs/security-core' +includeBuild '../../libs/servlet-core' +includeBuild '../../libs/servlet-security' includeBuild '../../libs/testing' develocity { diff --git a/apps/organisasjon-mottak-service/build.gradle b/apps/organisasjon-mottak-service/build.gradle index c2bbd7c2a80..e2205e6ad42 100644 --- a/apps/organisasjon-mottak-service/build.gradle +++ b/apps/organisasjon-mottak-service/build.gradle @@ -1,45 +1,11 @@ plugins { - id 'java' - id "org.sonarqube" version "5.0.0.4638" - id 'org.springframework.boot' version "3.2.6" - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" -} - -test { - useJUnitPlatform() + id "dolly-apps" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnav-organisasjon-mottak-service" property "sonar.projectName", "testnav-organisasjon-mottak-service" - property "sonar.sourceEncoding", "UTF-8" - } -} -bootJar { - archiveFileName = "app.jar" -} - -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1' - } -} - -repositories { - mavenCentral() - mavenLocal() - maven { - url = uri('https://packages.confluent.io/maven/') } } @@ -57,33 +23,15 @@ dependencies { implementation 'org.springframework.boot:spring-boot-starter-security' implementation 'org.springframework.boot:spring-boot-starter-web' - implementation 'org.springframework.boot:spring-boot-starter-webflux' implementation 'org.springframework.boot:spring-boot-starter-oauth2-client' implementation 'org.springframework.cloud:spring-cloud-starter-bootstrap' // TODO remove legacy bootstrap config - implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' - - implementation 'org.springframework.boot:spring-boot-starter-actuator' - - implementation 'io.micrometer:micrometer-registry-prometheus' - implementation 'org.hibernate.validator:hibernate-validator' implementation 'org.springframework.kafka:spring-kafka' - implementation 'org.apache.kafka:kafka-clients:3.7.0' - implementation 'io.confluent:kafka-avro-serializer:7.5.1' + implementation "org.apache.kafka:kafka-clients:$versions.apacheKafka" + implementation "io.confluent:kafka-avro-serializer:$versions.avro" - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.3.0' - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' + implementation "org.springdoc:springdoc-openapi-starter-webmvc-ui:$versions.springdoc" - testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' - - implementation 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' -} -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } } diff --git a/apps/organisasjon-mottak-service/settings.gradle b/apps/organisasjon-mottak-service/settings.gradle index 38065f51b2f..9e68b2ca4c2 100644 --- a/apps/organisasjon-mottak-service/settings.gradle +++ b/apps/organisasjon-mottak-service/settings.gradle @@ -4,6 +4,8 @@ plugins { rootProject.name = 'organisasjon-mottak-service' +includeBuild "../../plugins/java" + includeBuild '../../libs/avro-schema' includeBuild '../../libs/commands' includeBuild '../../libs/data-transfer-objects' diff --git a/apps/organisasjon-service/build.gradle b/apps/organisasjon-service/build.gradle index d350a163b7f..504d05dcd93 100644 --- a/apps/organisasjon-service/build.gradle +++ b/apps/organisasjon-service/build.gradle @@ -1,45 +1,14 @@ plugins { - id 'java' - id "org.sonarqube" version "5.0.0.4638" - id 'org.springframework.boot' version "3.2.6" - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" -} - -test { - useJUnitPlatform() + id "dolly-apps" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnav-organisasjon-service" property "sonar.projectName", "testnav-organisasjon-service" - property "sonar.sourceEncoding", "UTF-8" - } -} -bootJar { - archiveFileName = "app.jar" -} - -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1' } } -repositories { - mavenCentral() - mavenLocal() -} - dependencies { implementation 'no.nav.testnav.libs:commands' @@ -51,30 +20,12 @@ dependencies { implementation 'org.springframework.boot:spring-boot-starter-security' implementation 'org.springframework.boot:spring-boot-starter-oauth2-client' - implementation 'org.springframework.boot:spring-boot-starter-webflux' implementation 'org.springframework.boot:spring-boot-starter-web' - implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' - - implementation 'org.springframework.boot:spring-boot-starter-actuator' - - implementation 'io.micrometer:micrometer-registry-prometheus' - implementation 'org.hibernate.validator:hibernate-validator' - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.3.0' - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' + implementation "org.springdoc:springdoc-openapi-starter-webmvc-ui:$versions.springdoc" testImplementation 'junit:junit:4.13.2' //TODO upgrade to JUnit5 - testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' testImplementation 'no.nav.testnav.libs:testing' - testImplementation 'org.assertj:assertj-core:3.26.0' - - implementation 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' -} -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } + testImplementation "org.assertj:assertj-core:$versions.assertj" } diff --git a/apps/organisasjon-service/settings.gradle b/apps/organisasjon-service/settings.gradle index 03965dbd46a..4539eac79ba 100644 --- a/apps/organisasjon-service/settings.gradle +++ b/apps/organisasjon-service/settings.gradle @@ -4,6 +4,8 @@ plugins { rootProject.name = 'organisasjon-service' +includeBuild "../../plugins/java" + includeBuild '../../libs/commands' includeBuild '../../libs/data-transfer-objects' includeBuild '../../libs/reactive-core' diff --git a/apps/organisasjon-tilgang-frontend/build.gradle b/apps/organisasjon-tilgang-frontend/build.gradle index 7d6cdc16fa0..d7f2f825d07 100644 --- a/apps/organisasjon-tilgang-frontend/build.gradle +++ b/apps/organisasjon-tilgang-frontend/build.gradle @@ -1,47 +1,16 @@ plugins { - id 'java' - id "org.sonarqube" version "5.0.0.4638" - id 'org.springframework.boot' version "3.2.6" - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" -} - -test { - useJUnitPlatform() + id "dolly-apps" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnav-organisasjon-tilgang-frontend" property "sonar.projectName", "testnav-organisasjon-tilgang-frontend" - property "sonar.sourceEncoding", "UTF-8" property 'sonar.sources', 'src/main/java,src/main/js' property 'sonar.tests', 'src/test/java' } } -bootJar { - archiveFileName = "app.jar" -} -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.0' - } -} - -repositories { - mavenCentral() - mavenLocal() -} - dependencies { implementation ('no.nav.testnav.libs:security-core') { exclude group: 'org.springframework.session', module: 'spring-session-data-redis' @@ -56,28 +25,9 @@ dependencies { implementation 'no.nav.testnav.libs:reactive-frontend' - implementation 'org.springframework.boot:spring-boot-starter-webflux' implementation 'org.springframework.boot:spring-boot-starter-oauth2-client' - implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' implementation 'org.springframework.cloud:spring-cloud-starter-gateway' - implementation 'org.springframework.boot:spring-boot-starter-actuator' - - implementation 'io.micrometer:micrometer-registry-prometheus' - - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' - implementation 'org.hibernate.validator:hibernate-validator' - - testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' - - implementation 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' -} -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } } diff --git a/apps/organisasjon-tilgang-frontend/settings.gradle b/apps/organisasjon-tilgang-frontend/settings.gradle index 9cc55b92a41..c690a5eb76b 100644 --- a/apps/organisasjon-tilgang-frontend/settings.gradle +++ b/apps/organisasjon-tilgang-frontend/settings.gradle @@ -4,11 +4,12 @@ plugins { rootProject.name = 'organisasjon-tilgang-frontend' +includeBuild "../../plugins/java" includeBuild '../../libs/reactive-core' -includeBuild '../../libs/security-core' -includeBuild '../../libs/reactive-session-security' includeBuild '../../libs/reactive-frontend' +includeBuild '../../libs/reactive-session-security' +includeBuild '../../libs/security-core' develocity { buildScan { diff --git a/apps/organisasjon-tilgang-service/build.gradle b/apps/organisasjon-tilgang-service/build.gradle index c3a6e793975..3989bbbfd80 100644 --- a/apps/organisasjon-tilgang-service/build.gradle +++ b/apps/organisasjon-tilgang-service/build.gradle @@ -1,79 +1,31 @@ plugins { - id 'java' - id "org.sonarqube" version "5.0.0.4638" - id 'org.springframework.boot' version "3.2.6" - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" -} - -test { - useJUnitPlatform() + id "dolly-apps" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnav-organisasjon-tilgang-service" property "sonar.projectName", "testnav-organisasjon-tilgang-service" - property "sonar.sourceEncoding", "UTF-8" } } -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } -} - -bootJar { - archiveFileName = "app.jar" -} -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1' - } -} - -repositories { - mavenCentral() - mavenLocal() -} - dependencies { implementation 'no.nav.testnav.libs:reactive-core' implementation 'no.nav.testnav.libs:reactive-security' - implementation 'org.springframework.boot:spring-boot-starter-webflux' implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server' - implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' - implementation 'org.springframework.boot:spring-boot-starter-actuator' - implementation 'org.springframework.boot:spring-boot-starter-data-r2dbc' runtimeOnly 'org.postgresql:postgresql' implementation 'io.r2dbc:r2dbc-h2' implementation 'org.postgresql:r2dbc-postgresql' implementation 'org.flywaydb:flyway-core' - implementation 'ma.glasnost.orika:orika-core:1.5.4' - implementation 'io.micrometer:micrometer-registry-prometheus' + implementation "ma.glasnost.orika:orika-core:$versions.orika" - implementation 'org.springdoc:springdoc-openapi-starter-webflux-ui:2.5.0' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.21' - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' + implementation "org.springdoc:springdoc-openapi-starter-webflux-ui:$versions.springdoc" + implementation "io.swagger.core.v3:swagger-annotations-jakarta:$versions.swagger" - testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' - - implementation 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' } diff --git a/apps/organisasjon-tilgang-service/settings.gradle b/apps/organisasjon-tilgang-service/settings.gradle index 421605989a6..29ccda116b3 100644 --- a/apps/organisasjon-tilgang-service/settings.gradle +++ b/apps/organisasjon-tilgang-service/settings.gradle @@ -4,6 +4,7 @@ plugins { rootProject.name = 'organisasjon-tilgang-service' +includeBuild "../../plugins/java" includeBuild '../../libs/reactive-core' includeBuild '../../libs/reactive-security' diff --git a/apps/orgnummer-service/build.gradle b/apps/orgnummer-service/build.gradle index b8ce1940989..1a79299b6c6 100644 --- a/apps/orgnummer-service/build.gradle +++ b/apps/orgnummer-service/build.gradle @@ -1,45 +1,11 @@ plugins { - id 'java' - id "org.sonarqube" version "5.0.0.4638" - id 'org.springframework.boot' version "3.2.6" - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" -} - -test { - useJUnitPlatform() + id "dolly-apps" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "orgnummer-service" property "sonar.projectName", "orgnummer-service" - property "sonar.sourceEncoding", "UTF-8" - } -} -bootJar { - archiveFileName = "app.jar" -} - -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1' - } -} - -repositories { - mavenCentral() - mavenLocal() - maven { - url = uri('https://packages.confluent.io/maven/') } } @@ -54,35 +20,17 @@ dependencies { implementation 'no.nav.testnav.libs:servlet-security' implementation 'org.springframework.boot:spring-boot-starter-web' - implementation 'org.springframework.boot:spring-boot-starter-webflux' implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server' implementation 'org.springframework.boot:spring-boot-starter-data-jpa' - implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' implementation 'org.springframework.cloud:spring-cloud-vault-config-databases' - implementation 'org.springframework.boot:spring-boot-starter-actuator' - implementation 'io.micrometer:micrometer-registry-prometheus' - - implementation 'jakarta.validation:jakarta.validation-api:3.1.0' + implementation "jakarta.validation:jakarta.validation-api:$versions.jakartaValidation" implementation 'org.flywaydb:flyway-core' implementation 'com.h2database:h2' implementation 'com.zaxxer:HikariCP' - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.3.0' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.21' + implementation "org.springdoc:springdoc-openapi-starter-webmvc-ui:$versions.springdoc" + implementation "io.swagger.core.v3:swagger-annotations-jakarta:$versions.swagger" - implementation 'org.hibernate.validator:hibernate-validator' implementation 'org.postgresql:postgresql' - - testImplementation 'org.springframework.boot:spring-boot-starter-test' - - implementation 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' -} -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } } diff --git a/apps/orgnummer-service/settings.gradle b/apps/orgnummer-service/settings.gradle index 0dd87b3ba6a..c2f25516dae 100644 --- a/apps/orgnummer-service/settings.gradle +++ b/apps/orgnummer-service/settings.gradle @@ -4,6 +4,8 @@ plugins { rootProject.name = 'orgnummer-service' +includeBuild "../../plugins/java" + includeBuild '../../libs/commands' includeBuild '../../libs/data-transfer-objects' includeBuild '../../libs/database' diff --git a/apps/oversikt-frontend/build.gradle b/apps/oversikt-frontend/build.gradle index 78420dc18cb..a396a86e94f 100644 --- a/apps/oversikt-frontend/build.gradle +++ b/apps/oversikt-frontend/build.gradle @@ -1,47 +1,15 @@ plugins { - id 'java' - id "org.sonarqube" version "5.0.0.4638" - id 'org.springframework.boot' version "3.2.6" - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" -} - -test { - useJUnitPlatform() + id "dolly-apps" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnav-oversikt-frontend" property "sonar.projectName", "testnav-oversikt-frontend" - property "sonar.sourceEncoding", "UTF-8" property 'sonar.sources', 'src/main/java,src/main/js' } } -bootJar { - archiveFileName = "app.jar" -} -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1' - mavenBom 'org.springframework.session:spring-session-bom:2021.2.0' - } -} - -repositories { - mavenCentral() - mavenLocal() -} - dependencies { implementation('no.nav.testnav.libs:security-core') { exclude group: 'org.springframework.session', module: 'spring-session-data-redis' @@ -53,29 +21,12 @@ dependencies { implementation 'no.nav.testnav.libs:reactive-frontend' implementation 'no.nav.testnav.libs:reactive-security' - implementation 'org.springframework.boot:spring-boot-starter-webflux' implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server' - implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' implementation 'org.springframework.cloud:spring-cloud-starter-gateway' implementation 'org.springframework.session:spring-session-core' - implementation 'org.springframework.boot:spring-boot-starter-actuator' - - implementation 'io.micrometer:micrometer-registry-prometheus' - implementation 'org.springdoc:springdoc-openapi-starter-webflux-ui:2.5.0' - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' - implementation 'org.hibernate.validator:hibernate-validator' + implementation "org.springdoc:springdoc-openapi-starter-webflux-ui:$versions.springdoc" - testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' - - implementation 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' -} -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } } diff --git a/apps/oversikt-frontend/settings.gradle b/apps/oversikt-frontend/settings.gradle index 4f6bf9fcd12..77232fe6e5f 100644 --- a/apps/oversikt-frontend/settings.gradle +++ b/apps/oversikt-frontend/settings.gradle @@ -4,11 +4,12 @@ plugins { rootProject.name = 'oversikt-frontend' +includeBuild "../../plugins/java" includeBuild '../../libs/reactive-core' -includeBuild '../../libs/security-core' -includeBuild '../../libs/reactive-security' includeBuild '../../libs/reactive-frontend' +includeBuild '../../libs/reactive-security' +includeBuild '../../libs/security-core' develocity { buildScan { diff --git a/apps/pdl-forvalter/build.gradle b/apps/pdl-forvalter/build.gradle index 2cf9801566e..abdf9719dab 100644 --- a/apps/pdl-forvalter/build.gradle +++ b/apps/pdl-forvalter/build.gradle @@ -1,59 +1,18 @@ plugins { - id 'java' - id "org.sonarqube" version "5.0.0.4638" - id 'org.springframework.boot' version "3.2.6" - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" -} - -test { - useJUnitPlatform() - jvmArgs '--add-opens', 'java.base/java.lang=ALL-UNNAMED' + id "dolly-apps" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnav-pdl-forvalter" property "sonar.projectName", "testnav-pdl-forvalter" - property "sonar.sourceEncoding", "UTF-8" - } -} - -bootJar { - archiveFileName = "app.jar" -} - -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1' } } - properties { compileJava.options.encoding = 'UTF-8' } -repositories { - mavenCentral() - mavenLocal() -} - - -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } -} - dependencies { implementation 'no.nav.testnav.libs:database' @@ -64,33 +23,22 @@ dependencies { implementation 'no.nav.testnav.libs:security-core' implementation 'no.nav.testnav.libs:servlet-insecure-security' - implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' implementation 'org.springframework.cloud:spring-cloud-vault-config-databases' implementation 'org.springframework.boot:spring-boot-starter-web' - implementation 'org.springframework.boot:spring-boot-starter-webflux' implementation 'org.springframework.boot:spring-boot-starter-security' - implementation 'org.springframework.boot:spring-boot-starter-actuator' implementation 'org.springframework.boot:spring-boot-starter-data-jpa' implementation 'org.springframework.boot:spring-boot-starter-validation' - implementation 'io.micrometer:micrometer-registry-prometheus' - implementation 'ma.glasnost.orika:orika-core:1.5.4' + implementation "ma.glasnost.orika:orika-core:$versions.orika" - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.3.0' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.21' + implementation "org.springdoc:springdoc-openapi-starter-webmvc-ui:$versions.springdoc" + implementation "io.swagger.core.v3:swagger-annotations-jakarta:$versions.swagger" implementation 'org.postgresql:postgresql' implementation 'org.flywaydb:flyway-core' - implementation 'com.fasterxml.jackson.core:jackson-core:2.17.1' - - - implementation 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' + implementation "com.fasterxml.jackson.core:jackson-core:$versions.jackson" testImplementation 'no.nav.testnav.libs:testing' - testImplementation 'org.springframework.boot:spring-boot-starter-test' } \ No newline at end of file diff --git a/apps/pdl-forvalter/settings.gradle b/apps/pdl-forvalter/settings.gradle index 9d998d4804d..c5eee4e5ef0 100644 --- a/apps/pdl-forvalter/settings.gradle +++ b/apps/pdl-forvalter/settings.gradle @@ -4,12 +4,14 @@ plugins { rootProject.name = 'pdl-forvalter' -includeBuild '../../libs/security-core' -includeBuild '../../libs/database' +includeBuild "../../plugins/java" + includeBuild '../../libs/data-transfer-objects' includeBuild '../../libs/data-transfer-search-objects' -includeBuild '../../libs/servlet-core' +includeBuild '../../libs/database' includeBuild '../../libs/reactive-core' +includeBuild '../../libs/security-core' +includeBuild '../../libs/servlet-core' includeBuild '../../libs/servlet-insecure-security' includeBuild '../../libs/testing' diff --git a/apps/pdl-forvalter/src/main/java/no/nav/pdl/forvalter/PdlForvalterApplicationStarter.java b/apps/pdl-forvalter/src/main/java/no/nav/pdl/forvalter/PdlForvalterApplicationStarter.java index d4f60c563e8..45f34416ff3 100644 --- a/apps/pdl-forvalter/src/main/java/no/nav/pdl/forvalter/PdlForvalterApplicationStarter.java +++ b/apps/pdl-forvalter/src/main/java/no/nav/pdl/forvalter/PdlForvalterApplicationStarter.java @@ -10,4 +10,4 @@ public static void main(String[] args) { SpringApplication.run(PdlForvalterApplicationStarter.class, args); } -} \ No newline at end of file +} diff --git a/apps/pdl-forvalter/src/main/java/no/nav/pdl/forvalter/consumer/IdentPoolConsumer.java b/apps/pdl-forvalter/src/main/java/no/nav/pdl/forvalter/consumer/IdentPoolConsumer.java index ed887081114..db2acef4d5f 100644 --- a/apps/pdl-forvalter/src/main/java/no/nav/pdl/forvalter/consumer/IdentPoolConsumer.java +++ b/apps/pdl-forvalter/src/main/java/no/nav/pdl/forvalter/consumer/IdentPoolConsumer.java @@ -54,7 +54,8 @@ public Mono> releaseIdents(Set identer, Bruker bruker) { return tokenExchange.exchange(serverProperties) .flatMap(token -> new IdentpoolPostCommand(webClient, RELEASE_IDENTS_URL, REKVIRERT_AV + bruker, identer, - token.getTokenValue()).call()); + token.getTokenValue()).call()) + .doOnNext(resultat -> log.info("Slettet identer mot identpool: {}", String.join(",", identer))); } public Flux getErLedig(Set identer) { diff --git a/apps/pdl-forvalter/src/main/java/no/nav/pdl/forvalter/service/ArtifactDeleteService.java b/apps/pdl-forvalter/src/main/java/no/nav/pdl/forvalter/service/ArtifactDeleteService.java index df824219fe3..c764c67ccba 100644 --- a/apps/pdl-forvalter/src/main/java/no/nav/pdl/forvalter/service/ArtifactDeleteService.java +++ b/apps/pdl-forvalter/src/main/java/no/nav/pdl/forvalter/service/ArtifactDeleteService.java @@ -239,9 +239,10 @@ public void deleteForeldreansvar(String ident, Integer id) { dbPerson.getPerson().getForeldreansvar().stream() .filter(type -> id.equals(type.getId()) && - isNotBlank(type.getAnsvarlig())) + (isNotBlank(type.getAnsvarlig()) || isNotBlank(type.getAnsvarssubjekt()))) .forEach(type -> { - var slettePerson = getPerson(type.getAnsvarlig()); + var slettePerson = getPerson(isNotBlank(type.getAnsvarlig()) ? + type.getAnsvarlig() : type.getAnsvarssubjekt()); DeleteRelasjonerUtility.deleteRelasjoner(slettePerson, FORELDREANSVAR_FORELDER); diff --git a/apps/pdl-forvalter/src/main/java/no/nav/pdl/forvalter/service/ArtifactUpdateService.java b/apps/pdl-forvalter/src/main/java/no/nav/pdl/forvalter/service/ArtifactUpdateService.java index ee6ae3f063c..ebbe33e19c5 100644 --- a/apps/pdl-forvalter/src/main/java/no/nav/pdl/forvalter/service/ArtifactUpdateService.java +++ b/apps/pdl-forvalter/src/main/java/no/nav/pdl/forvalter/service/ArtifactUpdateService.java @@ -308,7 +308,7 @@ private static boolean isEndretRolle(ForelderBarnRelasjonDTO relasjon, ForelderB public void updateForeldreansvar(String ident, Integer id, ForeldreansvarDTO oppdatertAnsvar) { var person = getPerson(ident); - foreldreansvarService.validateBarn(oppdatertAnsvar, person.getPerson()); + foreldreansvarService.validate(oppdatertAnsvar, person.getPerson()); var foreldreansvar = person.getPerson().getForeldreansvar().stream() .filter(relasjon -> relasjon.getId().equals(id)) @@ -346,7 +346,7 @@ public void updateForeldreansvar(String ident, Integer id, ForeldreansvarDTO opp if (id == 0 || foreldreansvar.isPresent()) { - foreldreansvarService.handleBarn(oppdatertAnsvar, person.getPerson()); + foreldreansvarService.handle(oppdatertAnsvar, person.getPerson()); } person.getPerson().getForeldreansvar().stream() diff --git a/apps/pdl-forvalter/src/main/java/no/nav/pdl/forvalter/service/ForeldreansvarService.java b/apps/pdl-forvalter/src/main/java/no/nav/pdl/forvalter/service/ForeldreansvarService.java index 86e1e124565..1553eed5632 100644 --- a/apps/pdl-forvalter/src/main/java/no/nav/pdl/forvalter/service/ForeldreansvarService.java +++ b/apps/pdl-forvalter/src/main/java/no/nav/pdl/forvalter/service/ForeldreansvarService.java @@ -10,8 +10,10 @@ import no.nav.pdl.forvalter.database.model.DbPerson; import no.nav.pdl.forvalter.database.repository.PersonRepository; import no.nav.pdl.forvalter.exception.InvalidRequestException; +import no.nav.pdl.forvalter.utils.DatoFraIdentUtility; import no.nav.pdl.forvalter.utils.FoedselsdatoUtility; import no.nav.pdl.forvalter.utils.KjoennFraIdentUtility; +import no.nav.testnav.libs.data.pdlforvalter.v1.FoedselsdatoDTO; import no.nav.testnav.libs.data.pdlforvalter.v1.ForelderBarnRelasjonDTO; import no.nav.testnav.libs.data.pdlforvalter.v1.ForelderBarnRelasjonDTO.Rolle; import no.nav.testnav.libs.data.pdlforvalter.v1.ForeldreansvarDTO; @@ -28,11 +30,12 @@ import java.time.LocalDateTime; import java.util.ArrayList; import java.util.Collection; +import java.util.Comparator; import java.util.List; +import java.util.Objects; import java.util.Optional; import java.util.Random; -import static java.util.Collections.emptyList; import static java.util.Objects.isNull; import static java.util.Objects.nonNull; import static no.nav.pdl.forvalter.utils.ArtifactUtils.getKilde; @@ -81,23 +84,21 @@ private static String blankCheck(String value, String defaultValue) { public List convert(PersonDTO person) { - for (var type : person.getForeldreansvar()) { - - if (isTrue(type.getIsNew())) { - - type.setKilde(getKilde(type)); - type.setMaster(getMaster(type, person)); - if (person.getFoedselsdato().stream() - .anyMatch(alder -> alder.getFoedselsdato().isBefore(LocalDateTime.now().minusYears(MYNDIG_ALDER))) || - person.getFoedsel().stream() - .anyMatch(alder -> alder.getFoedselsdato().isBefore(LocalDateTime.now().minusYears(MYNDIG_ALDER)))) { - // hovedperson er voksen - handle(type, person); - } else { - // hovedperson er barn - handleBarn(type, person); - } - } + var alleForeldreansvar = mapperFacade.mapAsList(person.getForeldreansvar(), ForeldreansvarDTO.class); + + for (var type : alleForeldreansvar) { + + person.getForeldreansvar().stream() + .filter(ansvar -> Objects.equals(type.getId(), ansvar.getId())) + .findFirst() + .ifPresent(foreldreansvar -> { + if (isTrue(foreldreansvar.getIsNew())) { + + foreldreansvar.setKilde(getKilde(foreldreansvar)); + foreldreansvar.setMaster(getMaster(foreldreansvar, person)); + handle(foreldreansvar, person); + } + }); } return person.getForeldreansvar(); @@ -108,22 +109,42 @@ public void validate(ForeldreansvarDTO foreldreansvar, PersonDTO hovedperson) { validateForeldreansvar(foreldreansvar); - if ((foreldreansvar.getAnsvar() == Ansvar.MOR || foreldreansvar.getAnsvar() == Ansvar.MEDMOR) && - isNull(foreldreansvar.getAnsvarlig()) && isNull(foreldreansvar.getAnsvarligUtenIdentifikator()) && - !isRelasjonMor(hovedperson)) { - throw new InvalidRequestException(INVALID_RELASJON_MOR_EXCEPTION); - } + if (getFoedselsdato(hovedperson).stream() + .anyMatch(alder -> alder.getFoedselsaar() <= LocalDateTime.now().minusYears(MYNDIG_ALDER).getYear())) { - if ((foreldreansvar.getAnsvar() == Ansvar.FAR) && - isNull(foreldreansvar.getAnsvarlig()) && isNull(foreldreansvar.getAnsvarligUtenIdentifikator()) && - !isRelasjonFar(hovedperson)) { - throw new InvalidRequestException(INVALID_RELASJON_FAR_EXCEPTION); + if ((foreldreansvar.getAnsvar() == Ansvar.MOR || foreldreansvar.getAnsvar() == Ansvar.MEDMOR) && + isBlank(foreldreansvar.getAnsvarlig()) && isNull(foreldreansvar.getAnsvarligUtenIdentifikator()) && + !isRelasjonMor(hovedperson)) { + throw new InvalidRequestException(INVALID_RELASJON_MOR_EXCEPTION); + } + + if ((foreldreansvar.getAnsvar() == Ansvar.FAR) && + isBlank(foreldreansvar.getAnsvarlig()) && isNull(foreldreansvar.getAnsvarligUtenIdentifikator()) && + !isRelasjonFar(hovedperson)) { + throw new InvalidRequestException(INVALID_RELASJON_FAR_EXCEPTION); + } + + if ((foreldreansvar.getAnsvar() == Ansvar.FELLES) && + isBlank(foreldreansvar.getAnsvarlig()) && isNull(foreldreansvar.getAnsvarligUtenIdentifikator()) && + !isRelasjonForeldre(hovedperson)) { + throw new InvalidRequestException(INVALID_RELASJON_FELLES_EXCEPTION); + } + } else { + + validateBarn(foreldreansvar, hovedperson); } + } - if ((foreldreansvar.getAnsvar() == Ansvar.FELLES) && - isNull(foreldreansvar.getAnsvarlig()) && isNull(foreldreansvar.getAnsvarligUtenIdentifikator()) && - !isRelasjonForeldre(hovedperson)) { - throw new InvalidRequestException(INVALID_RELASJON_FELLES_EXCEPTION); + private List getFoedselsdato(PersonDTO person) { + + if (!person.getFoedselsdato().isEmpty() && nonNull(person.getFoedselsdato().getFirst().getFoedselsaar())) { + return person.getFoedselsdato(); + } else if (!person.getFoedsel().isEmpty() && nonNull(person.getFoedsel().getFirst().getFoedselsaar())) { + return person.getFoedsel(); + } else { + return List.of(FoedselsdatoDTO.builder() + .foedselsaar(DatoFraIdentUtility.getDato(person.getIdent()).getYear()) + .build()); } } @@ -163,23 +184,22 @@ private void validateForeldreansvar(ForeldreansvarDTO foreldreansvar) { } } - public void validateBarn(ForeldreansvarDTO foreldreansvar, PersonDTO barn) { + private void validateBarn(ForeldreansvarDTO foreldreansvar, PersonDTO barn) { - validateForeldreansvar(foreldreansvar); if ((foreldreansvar.getAnsvar() == Ansvar.MOR || foreldreansvar.getAnsvar() == Ansvar.MEDMOR) && - isNull(foreldreansvar.getAnsvarlig()) && isNull(foreldreansvar.getAnsvarligUtenIdentifikator()) && + isBlank(foreldreansvar.getAnsvarlig()) && isNull(foreldreansvar.getAnsvarligUtenIdentifikator()) && !isRelasjonFraBarn(barn, MOR, MEDMOR)) { throw new InvalidRequestException(INVALID_RELASJON_MOR_EXCEPTION); } if ((foreldreansvar.getAnsvar() == Ansvar.FAR) && - isNull(foreldreansvar.getAnsvarlig()) && isNull(foreldreansvar.getAnsvarligUtenIdentifikator()) && + isBlank(foreldreansvar.getAnsvarlig()) && isNull(foreldreansvar.getAnsvarligUtenIdentifikator()) && !isRelasjonFraBarn(barn, FAR)) { throw new InvalidRequestException(INVALID_RELASJON_FAR_EXCEPTION); } if ((foreldreansvar.getAnsvar() == Ansvar.FELLES) && - isNull(foreldreansvar.getAnsvarlig()) && isNull(foreldreansvar.getAnsvarligUtenIdentifikator()) && + isBlank(foreldreansvar.getAnsvarlig()) && isNull(foreldreansvar.getAnsvarligUtenIdentifikator()) && !isRelasjonForeldreFraBarn(barn)) { throw new InvalidRequestException(INVALID_RELASJON_FELLES_EXCEPTION); } @@ -207,25 +227,25 @@ private boolean isRelasjonForeldre(PersonDTO person) { .anyMatch(sivilstand -> (sivilstand.isGift() || sivilstand.isSeparert())); } - private boolean isRelasjonMor(PersonDTO hovedperson) { + private boolean isRelasjonMor(PersonDTO person) { - return hovedperson.getForelderBarnRelasjon().stream() + return person.getForelderBarnRelasjon().stream() .anyMatch(relasjon -> MOR == relasjon.getMinRolleForPerson() || MEDMOR == relasjon.getMinRolleForPerson() || (FORELDER == relasjon.getMinRolleForPerson() && - (Kjoenn.KVINNE == hovedperson.getKjoenn().stream().findFirst().orElse(new KjoennDTO()).getKjoenn() || - Kjoenn.KVINNE == KjoennFraIdentUtility.getKjoenn(hovedperson.getIdent()))) || + (Kjoenn.KVINNE == person.getKjoenn().stream().findFirst().orElse(new KjoennDTO()).getKjoenn() || + Kjoenn.KVINNE == KjoennFraIdentUtility.getKjoenn(person.getIdent()))) || isNotTrue(relasjon.getPartnerErIkkeForelder()) && - hovedperson.getSivilstand().stream() + person.getSivilstand().stream() .anyMatch(sivilstand -> (sivilstand.isGift() || sivilstand.isSeparert()))); } - private List getBarnMorRelasjoner(PersonDTO hovedperson) { + private List getBarnMorRelasjoner(PersonDTO person) { - return hovedperson.getForelderBarnRelasjon().stream() + return person.getForelderBarnRelasjon().stream() .map(barnRelasjon -> personRepository.findByIdent(barnRelasjon.getRelatertPerson()) .map(barn -> barn.getPerson().getForelderBarnRelasjon().stream() @@ -241,23 +261,23 @@ private List getBarnMorRelasjoner(PersonDTO hovedperson) { .toList(); } - private boolean isRelasjonFar(PersonDTO hovedperson) { + private boolean isRelasjonFar(PersonDTO person) { - return hovedperson.getForelderBarnRelasjon().stream() + return person.getForelderBarnRelasjon().stream() .anyMatch(relasjon -> FAR == relasjon.getMinRolleForPerson() || (FORELDER == relasjon.getMinRolleForPerson() && - (Kjoenn.MANN == hovedperson.getKjoenn().stream().findFirst().orElse(new KjoennDTO()).getKjoenn() || - Kjoenn.MANN == KjoennFraIdentUtility.getKjoenn(hovedperson.getIdent()))) || + (Kjoenn.MANN == person.getKjoenn().stream().findFirst().orElse(new KjoennDTO()).getKjoenn() || + Kjoenn.MANN == KjoennFraIdentUtility.getKjoenn(person.getIdent()))) || isNotTrue(relasjon.getPartnerErIkkeForelder()) && - hovedperson.getSivilstand().stream() + person.getSivilstand().stream() .anyMatch(sivilstand -> sivilstand.isGift() || sivilstand.isSeparert())); } - private List getBarnFarRelasjoner(PersonDTO hovedperson) { + private List getBarnFarRelasjoner(PersonDTO person) { - return hovedperson.getForelderBarnRelasjon().stream() + return person.getForelderBarnRelasjon().stream() .map(barnRelasjon -> personRepository.findByIdent(barnRelasjon.getRelatertPerson()) .map(barn -> barn.getPerson().getForelderBarnRelasjon().stream() @@ -272,73 +292,99 @@ private List getBarnFarRelasjoner(PersonDTO hovedperson) { .toList(); } - private void handle(ForeldreansvarDTO foreldreansvar, PersonDTO hovedperson) { + public void handle(ForeldreansvarDTO foreldreansvar, PersonDTO person) { + + if (getFoedselsdato(person).stream() + .anyMatch(alder -> alder.getFoedselsaar() <= LocalDateTime.now().minusYears(MYNDIG_ALDER).getYear())) { + // hovedperson er voksen + + if (isNotBlank(foreldreansvar.getAnsvarssubjekt())) { + + personRepository.findByIdent(foreldreansvar.getAnsvarssubjekt()) + .ifPresent(barn -> { + barn.getPerson().getForeldreansvar() + .addFirst(ForeldreansvarDTO.builder() + .eksisterendePerson(true) + .ansvar(foreldreansvar.getAnsvar()) + .ansvarlig(person.getIdent()) + .gyldigFraOgMed(foreldreansvar.getGyldigFraOgMed()) + .gyldigFraOgMed(foreldreansvar.getGyldigTilOgMed()) + .kilde(foreldreansvar.getKilde()) + .master(foreldreansvar.getMaster()) + .id(barn.getPerson().getForeldreansvar().stream() + .map(ForeldreansvarDTO::getId) + .findFirst().orElse(0) + 1) + .build()); + + relasjonService.setRelasjon(barn.getIdent(), person.getIdent(), FORELDREANSVAR_FORELDER); + relasjonService.setRelasjon(person.getIdent(), barn.getIdent(), FORELDREANSVAR_BARN); + }); + } - if (isNotBlank(foreldreansvar.getAnsvarssubjekt())) { + if (foreldreansvar.getAnsvar() == Ansvar.MOR || foreldreansvar.getAnsvar() == Ansvar.MEDMOR) { + var barnMorRelasjoner = getBarnMorRelasjoner(person); + setRelasjoner(barnMorRelasjoner, foreldreansvar, person.getIdent()); - personRepository.findByIdent(foreldreansvar.getAnsvarssubjekt()) - .ifPresent(barn -> { - barn.getPerson().getForeldreansvar() - .addFirst(ForeldreansvarDTO.builder() - .eksisterendePerson(true) - .ansvar(foreldreansvar.getAnsvar()) - .ansvarlig(hovedperson.getIdent()) - .gyldigFraOgMed(foreldreansvar.getGyldigFraOgMed()) - .gyldigFraOgMed(foreldreansvar.getGyldigTilOgMed()) - .kilde(foreldreansvar.getKilde()) - .master(foreldreansvar.getMaster()) - .id(barn.getPerson().getForeldreansvar().stream() - .map(ForeldreansvarDTO::getId) - .findFirst().orElse(0) + 1) - .build()); + slettRelasjonForHovedperson(person, foreldreansvar.getId(), barnMorRelasjoner); - relasjonService.setRelasjon(barn.getIdent(), hovedperson.getIdent(), FORELDREANSVAR_FORELDER); - relasjonService.setRelasjon(hovedperson.getIdent(), barn.getIdent(), FORELDREANSVAR_BARN); - }); - } + } else if (foreldreansvar.getAnsvar() == Ansvar.FAR) { + var barnFarRelasjoner = getBarnFarRelasjoner(person); + setRelasjoner(barnFarRelasjoner, foreldreansvar, person.getIdent()); - if (foreldreansvar.getAnsvar() == Ansvar.MOR || foreldreansvar.getAnsvar() == Ansvar.MEDMOR) { - var barnMorRelasjoner = getBarnMorRelasjoner(hovedperson); - setRelasjoner(barnMorRelasjoner, foreldreansvar); + slettRelasjonForHovedperson(person, foreldreansvar.getId(), barnFarRelasjoner); - } else if (foreldreansvar.getAnsvar() == Ansvar.FAR) { - var barnFarRelasjoner = getBarnFarRelasjoner(hovedperson); - setRelasjoner(barnFarRelasjoner, foreldreansvar); + } else if (foreldreansvar.getAnsvar() == Ansvar.FELLES) { + var barnFellesRelasjoner = new ArrayList<>(getBarnMorRelasjoner(person)); + barnFellesRelasjoner.addAll(getBarnFarRelasjoner(person)); + setRelasjoner(barnFellesRelasjoner, foreldreansvar, person.getIdent()); - } else if (foreldreansvar.getAnsvar() == Ansvar.FELLES) { - var barnFellesRelasjoner = new ArrayList<>(getBarnMorRelasjoner(hovedperson)); - barnFellesRelasjoner.addAll(getBarnFarRelasjoner(hovedperson)); - setRelasjoner(barnFellesRelasjoner, foreldreansvar); + } else if (foreldreansvar.getAnsvar() == Ansvar.ANDRE) { - } else if (foreldreansvar.getAnsvar() == Ansvar.ANDRE) { + if (nonNull(foreldreansvar.getAnsvarligUtenIdentifikator())) { - foreldreansvar.setEksisterendePerson(isNotBlank(foreldreansvar.getAnsvarlig())); + makeAnsvarligUtenIdentifikator(foreldreansvar, person); - if (nonNull(foreldreansvar.getAnsvarligUtenIdentifikator())) { + } else if (isBlank(foreldreansvar.getAnsvarlig())) { + + opprettNyAsvarlig(foreldreansvar, person); + } + + foreldreansvar.setEksisterendePerson(isNotBlank(foreldreansvar.getAnsvarlig())); - makeAnsvarligUtenIdentifikator(foreldreansvar, hovedperson); + setRelasjoner(getBarnRelasjoner(foreldreansvar, person), foreldreansvar, person.getIdent()); + slettForeldreansvar(person, foreldreansvar.getId()); - } else if (isNull(foreldreansvar.getAnsvarlig())) { + } else if (foreldreansvar.getAnsvar() == Ansvar.UKJENT) { - opprettNyAsvarlig(foreldreansvar, hovedperson); + makeAnsvarligUtenIdentifikator(foreldreansvar, person); + setRelasjoner(getBarnRelasjoner(foreldreansvar, person), foreldreansvar, person.getIdent()); + slettForeldreansvar(person, foreldreansvar.getId()); } - setRelasjoner(getBarnRelasjoner(foreldreansvar, hovedperson), foreldreansvar); + } else { + // hovedperson er barn + handleBarn(foreldreansvar, person); + } + } - } else if (foreldreansvar.getAnsvar() == Ansvar.UKJENT) { + private static void slettRelasjonForHovedperson(PersonDTO person, Integer id, List barnForelderRelasjoner) { + + if (barnForelderRelasjoner.stream() + .noneMatch(relasjon -> relasjon.getAnsvarlig().equals(person.getIdent()))) { - makeAnsvarligUtenIdentifikator(foreldreansvar, hovedperson); - setRelasjoner(getBarnRelasjoner(foreldreansvar, hovedperson), foreldreansvar); + slettForeldreansvar(person, id); } + } - foreldreansvar.setNyAnsvarlig(null); + private static void slettForeldreansvar(PersonDTO person, Integer id) { - // Foreldreanvar settes kun på barn ikke på foreldre - hovedperson.setForeldreansvar(emptyList()); + person.setForeldreansvar(person.getForeldreansvar().stream() + .filter(ansvar -> !Objects.equals(id, ansvar.getId())) + .toList()); } - private List getBarnRelasjoner(ForeldreansvarDTO foreldreansvar, PersonDTO hovedperson) { - return hovedperson.getForelderBarnRelasjon().stream() + private List getBarnRelasjoner(ForeldreansvarDTO foreldreansvar, PersonDTO person) { + return person.getForelderBarnRelasjon().stream() .filter(ForelderBarnRelasjonDTO::hasBarn) .map(ForelderBarnRelasjonDTO::getRelatertPerson) .map(personRepository::findByIdent) @@ -350,15 +396,15 @@ private List getBarnRelasjoner(ForeldreansvarDTO foreldreansvar, P .toList(); } - public void handleBarn(ForeldreansvarDTO foreldreansvar, PersonDTO barn) { + private void handleBarn(ForeldreansvarDTO foreldreansvar, PersonDTO barn) { if (isNotBlank(foreldreansvar.getAnsvarlig())) { - foreldreansvar.setEksisterendePerson(isTrue(foreldreansvar.getEksisterendePerson()) || - foreldreansvar.getAnsvar() == Ansvar.ANDRE || - foreldreansvar.getAnsvar() == Ansvar.UKJENT); + foreldreansvar.setEksisterendePerson(isTrue(foreldreansvar.getEksisterendePerson())); + relasjonService.setRelasjon(barn.getIdent(), foreldreansvar.getAnsvarlig(), FORELDREANSVAR_FORELDER); relasjonService.setRelasjon(foreldreansvar.getAnsvarlig(), barn.getIdent(), FORELDREANSVAR_BARN); + oppdaterRelatertAnsvar(foreldreansvar, barn, foreldreansvar.getAnsvarlig()); } else if (foreldreansvar.getAnsvar() == Ansvar.MOR || foreldreansvar.getAnsvar() == Ansvar.MEDMOR) { @@ -374,24 +420,29 @@ public void handleBarn(ForeldreansvarDTO foreldreansvar, PersonDTO barn) { } else if (foreldreansvar.getAnsvar() == Ansvar.ANDRE) { - foreldreansvar.setEksisterendePerson(isNotBlank(foreldreansvar.getAnsvarlig())); - if (nonNull(foreldreansvar.getAnsvarligUtenIdentifikator())) { setAnsvarUtenIdentifikator(foreldreansvar, barn); - } else if (isNull(foreldreansvar.getAnsvarlig())) { + } else if (isBlank(foreldreansvar.getAnsvarlig())) { opprettNyAsvarlig(foreldreansvar, barn); } - if (isNull(foreldreansvar.getAnsvarligUtenIdentifikator())) { + if (isNotBlank(foreldreansvar.getAnsvarlig())) { + foreldreansvar.setEksisterendePerson(true); relasjonService.setRelasjon(barn.getIdent(), foreldreansvar.getAnsvarlig(), FORELDREANSVAR_FORELDER); relasjonService.setRelasjon(foreldreansvar.getAnsvarlig(), barn.getIdent(), FORELDREANSVAR_BARN); + + oppdaterRelatertAnsvar(foreldreansvar, barn, foreldreansvar.getAnsvarlig()); } + } else if (foreldreansvar.getAnsvar() == Ansvar.UKJENT) { - setAnsvarUtenIdentifikator(foreldreansvar, barn); + if (nonNull(foreldreansvar.getAnsvarligUtenIdentifikator())) { + + setAnsvarUtenIdentifikator(foreldreansvar, barn); + } } foreldreansvar.setNyAnsvarlig(null); @@ -435,12 +486,28 @@ private void setRelasjoner(ForeldreansvarDTO foreldreansvar, PersonDTO barn, Rol .filter(relasjon -> List.of(roller).contains(relasjon.getRelatertPersonsRolle())) .findFirst() .ifPresent(relasjon -> { + foreldreansvar.setAnsvarlig(relasjon.getRelatertPerson()); if (isNotBlank(foreldreansvar.getAnsvarlig())) { relasjonService.setRelasjon(barn.getIdent(), foreldreansvar.getAnsvarlig(), FORELDREANSVAR_FORELDER); relasjonService.setRelasjon(foreldreansvar.getAnsvarlig(), barn.getIdent(), FORELDREANSVAR_BARN); } + + oppdaterRelatertAnsvar(foreldreansvar, barn, relasjon.getRelatertPerson()); + }); + } + + private void oppdaterRelatertAnsvar(ForeldreansvarDTO foreldreansvar, PersonDTO barn, String forelder) { + + personRepository.findByIdent(forelder) + .ifPresent(dbPerson -> { + var subjektAnsvar = mapperFacade.map(foreldreansvar, ForeldreansvarDTO.class); + subjektAnsvar.setNyAnsvarlig(null); + subjektAnsvar.setAnsvarlig(null); + subjektAnsvar.setAnsvarssubjekt(barn.getIdent()); + subjektAnsvar.setId(dbPerson.getPerson().getForeldreansvar().size() + 1); + dbPerson.getPerson().getForeldreansvar().addFirst(subjektAnsvar); }); } @@ -449,6 +516,8 @@ private void setFellesRelasjoner(ForeldreansvarDTO foreldreansvar, PersonDTO bar var foreldre = barn.getForelderBarnRelasjon().stream() .filter(ForelderBarnRelasjonDTO::isBarn) .toList(); + + foreldreansvar.setNyAnsvarlig(null); foreldreansvar.setAnsvarlig(foreldre.getFirst().getRelatertPerson()); relasjonService.setRelasjon(barn.getIdent(), foreldreansvar.getAnsvarlig(), FORELDREANSVAR_FORELDER); relasjonService.setRelasjon(foreldreansvar.getAnsvarlig(), barn.getIdent(), FORELDREANSVAR_BARN); @@ -459,6 +528,9 @@ private void setFellesRelasjoner(ForeldreansvarDTO foreldreansvar, PersonDTO bar relasjonService.setRelasjon(nyttForeldreansvar.getAnsvarlig(), barn.getIdent(), FORELDREANSVAR_BARN); nyttForeldreansvar.setId(barn.getForeldreansvar().size() + 1); barn.getForeldreansvar().addFirst(nyttForeldreansvar); + + foreldre.forEach(forelderBarnRelasjon -> + oppdaterRelatertAnsvar(foreldreansvar, barn, forelderBarnRelasjon.getRelatertPerson())); } private void makeAnsvarligUtenIdentifikator(ForeldreansvarDTO foreldreansvar, PersonDTO person) { @@ -500,7 +572,7 @@ private void makeAnsvarligUtenIdentifikator(ForeldreansvarDTO foreldreansvar, Pe } } - private void setRelasjoner(List barnRelasjoner, ForeldreansvarDTO foreldreansvar) { + private void setRelasjoner(List barnRelasjoner, ForeldreansvarDTO foreldreansvar, String person) { barnRelasjoner.forEach(relasjon -> { @@ -513,16 +585,35 @@ private void setRelasjoner(List barnRelasjoner, ForeldreansvarDTO .kilde(foreldreansvar.getKilde()) .master(foreldreansvar.getMaster()) .id(relasjon.getBarn().getPerson().getForeldreansvar().stream() + .max(Comparator.comparing(ForeldreansvarDTO::getId)) .map(ForeldreansvarDTO::getId) - .findFirst().orElse(0) + 1) + .orElse(0) + 1) .gyldigFraOgMed(foreldreansvar.getGyldigFraOgMed()) .gyldigTilOgMed(foreldreansvar.getGyldigTilOgMed()) .build()); if (isNotBlank(relasjon.getAnsvarlig())) { + foreldreansvar.setAnsvarssubjekt(relasjon.getBarn().getIdent()); + foreldreansvar.setNyAnsvarlig(null); relasjonService.setRelasjon(relasjon.getBarn().getIdent(), relasjon.getAnsvarlig(), FORELDREANSVAR_FORELDER); relasjonService.setRelasjon(relasjon.getAnsvarlig(), relasjon.getBarn().getIdent(), FORELDREANSVAR_BARN); } + + if (!person.equals(relasjon.getAnsvarlig())) { + personRepository.findByIdent(relasjon.ansvarlig) + .ifPresent(ansvarlig -> ansvarlig.getPerson().getForeldreansvar() + .addFirst(ForeldreansvarDTO.builder() + .ansvarssubjekt(relasjon.getBarn().getIdent()) + .gyldigFraOgMed(foreldreansvar.getGyldigFraOgMed()) + .gyldigTilOgMed(foreldreansvar.getGyldigTilOgMed()) + .kilde(foreldreansvar.getKilde()) + .master(foreldreansvar.getMaster()) + .id(ansvarlig.getPerson().getForeldreansvar().stream() + .max(Comparator.comparing(ForeldreansvarDTO::getId)) + .map(ForeldreansvarDTO::getId) + .orElse(0) + 1) + .build())); + } }); } diff --git a/apps/pdl-forvalter/src/main/java/no/nav/pdl/forvalter/service/IdentitetService.java b/apps/pdl-forvalter/src/main/java/no/nav/pdl/forvalter/service/IdentitetService.java index 16e6f04d4ac..c1997d8beb7 100644 --- a/apps/pdl-forvalter/src/main/java/no/nav/pdl/forvalter/service/IdentitetService.java +++ b/apps/pdl-forvalter/src/main/java/no/nav/pdl/forvalter/service/IdentitetService.java @@ -81,6 +81,8 @@ public void updateStandalone(String ident, Boolean standalone) { var dbPerson = personRepository.findByIdent(ident) .orElseThrow(() -> new NotFoundException("Ident " + ident + " ikke funnet")); + dbPerson.getPerson().setStandalone(standalone); + var identerRelasjon = dbPerson.getRelasjoner().stream() .map(DbRelasjon::getRelatertPerson) .map(DbPerson::getPerson) diff --git a/apps/pdl-forvalter/src/main/java/no/nav/pdl/forvalter/service/PdlOrdreService.java b/apps/pdl-forvalter/src/main/java/no/nav/pdl/forvalter/service/PdlOrdreService.java index b7294c3153c..a2d8aa1d3de 100644 --- a/apps/pdl-forvalter/src/main/java/no/nav/pdl/forvalter/service/PdlOrdreService.java +++ b/apps/pdl-forvalter/src/main/java/no/nav/pdl/forvalter/service/PdlOrdreService.java @@ -346,7 +346,9 @@ private List getOrdrer(OpprettRequest oppretting) { deployService.createOrdre(PDL_INNFLYTTING, oppretting.getPerson().getIdent(), oppretting.getPerson().getPerson().getInnflytting()), deployService.createOrdre(PDL_UTFLYTTING, oppretting.getPerson().getIdent(), oppretting.getPerson().getPerson().getUtflytting()), deployService.createOrdre(PDL_DELTBOSTED, oppretting.getPerson().getIdent(), oppretting.getPerson().getPerson().getDeltBosted()), - deployService.createOrdre(PDL_FORELDREANSVAR, oppretting.getPerson().getIdent(), oppretting.getPerson().getPerson().getForeldreansvar()), + deployService.createOrdre(PDL_FORELDREANSVAR, oppretting.getPerson().getIdent(), oppretting.getPerson().getPerson().getForeldreansvar().stream() + .filter(ForeldreansvarDTO::isNotAnsvarssubjekt) + .toList()), deployService.createOrdre(PDL_FORELDRE_BARN_RELASJON, oppretting.getPerson().getIdent(), oppretting.getPerson().getPerson().getForelderBarnRelasjon()), deployService.createOrdre(PDL_SIVILSTAND, oppretting.getPerson().getIdent(), oppretting.getPerson().getPerson().getSivilstand().stream() .filter(SivilstandDTO::isNotSamboer) diff --git a/apps/pdl-forvalter/src/main/java/no/nav/pdl/forvalter/service/PersonService.java b/apps/pdl-forvalter/src/main/java/no/nav/pdl/forvalter/service/PersonService.java index 8b5d33e0588..4e339759a8f 100644 --- a/apps/pdl-forvalter/src/main/java/no/nav/pdl/forvalter/service/PersonService.java +++ b/apps/pdl-forvalter/src/main/java/no/nav/pdl/forvalter/service/PersonService.java @@ -152,10 +152,11 @@ public void deletePerson(String ident) { .map(ForeldreansvarDTO::getAnsvarlig) .toList()) .flatMap(Collection::stream) + .filter(Objects::nonNull) .collect(Collectors.toSet()); pdlTestdataConsumer.delete(identer).block(); - identPoolConsumer.releaseIdents( identer.stream() + identPoolConsumer.releaseIdents(identer.stream() .filter(id -> !identerSomIkkeSkalSlettesFraIdentpool.contains(id)) .collect(Collectors.toSet()), Bruker.PDLF).block(); diff --git a/apps/pdl-forvalter/src/main/java/no/nav/pdl/forvalter/service/UnhookEksternePersonerService.java b/apps/pdl-forvalter/src/main/java/no/nav/pdl/forvalter/service/UnhookEksternePersonerService.java index 4830fb74c36..9ac5ffb699a 100644 --- a/apps/pdl-forvalter/src/main/java/no/nav/pdl/forvalter/service/UnhookEksternePersonerService.java +++ b/apps/pdl-forvalter/src/main/java/no/nav/pdl/forvalter/service/UnhookEksternePersonerService.java @@ -7,24 +7,22 @@ import no.nav.testnav.libs.data.pdlforvalter.v1.ForelderBarnRelasjonDTO; import no.nav.testnav.libs.data.pdlforvalter.v1.ForeldreansvarDTO; import no.nav.testnav.libs.data.pdlforvalter.v1.FullmaktDTO; -import no.nav.testnav.libs.data.pdlforvalter.v1.KontaktinformasjonForDoedsboDTO; -import no.nav.testnav.libs.data.pdlforvalter.v1.PersonDTO; import no.nav.testnav.libs.data.pdlforvalter.v1.SivilstandDTO; import no.nav.testnav.libs.data.pdlforvalter.v1.VergemaalDTO; import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; -import java.util.Collection; import java.util.List; import java.util.Objects; import static java.util.Objects.isNull; -import static java.util.Objects.nonNull; import static no.nav.testnav.libs.data.pdlforvalter.v1.RelasjonType.AVDOEDD_FOR_KONTAKT; -import static no.nav.testnav.libs.data.pdlforvalter.v1.RelasjonType.FAMILIERELASJON_BARN; import static no.nav.testnav.libs.data.pdlforvalter.v1.RelasjonType.FORELDREANSVAR_BARN; import static no.nav.testnav.libs.data.pdlforvalter.v1.RelasjonType.FORELDREANSVAR_FORELDER; import static no.nav.testnav.libs.data.pdlforvalter.v1.RelasjonType.FULLMAKTSGIVER; +import static no.nav.testnav.libs.data.pdlforvalter.v1.RelasjonType.FULLMEKTIG; +import static no.nav.testnav.libs.data.pdlforvalter.v1.RelasjonType.KONTAKT_FOR_DOEDSBO; +import static no.nav.testnav.libs.data.pdlforvalter.v1.RelasjonType.VERGE; import static no.nav.testnav.libs.data.pdlforvalter.v1.RelasjonType.VERGE_MOTTAKER; import static org.apache.commons.lang3.StringUtils.isBlank; @@ -36,96 +34,18 @@ public class UnhookEksternePersonerService { public void unhook(DbPerson hovedperson) { - if (hovedperson.getPerson().getSivilstand().stream().anyMatch(SivilstandDTO::isEksisterendePerson)) { + deleteSivilstandArtifact(hovedperson); + deleteForeldreansvarRelasjoner(hovedperson); + deleteForelderBarnRelasjoner(hovedperson); - deleteSivilstandArtifact(hovedperson); - } - - if (hovedperson.getRelasjoner().stream() - .filter(relasjon -> FAMILIERELASJON_BARN == relasjon.getRelasjonType()) - .map(DbRelasjon::getRelatertPerson) - .map(DbPerson::getPerson) - .map(PersonDTO::getForeldreansvar) - .flatMap(Collection::stream) - .anyMatch(ForeldreansvarDTO::isEksisterendePerson)) { - - deleteForeldreansvarRelasjoner(hovedperson); - } - - if (hovedperson.getRelasjoner().stream() - .filter(relasjon -> FORELDREANSVAR_BARN == relasjon.getRelasjonType()) - .map(DbRelasjon::getRelatertPerson) - .map(DbPerson::getPerson) - .map(PersonDTO::getForeldreansvar) - .flatMap(Collection::stream) - .anyMatch(ForeldreansvarDTO::isEksisterendePerson)) { - - deleteForeldreansvarAndreRelasjoner(hovedperson); - } - - if (hovedperson.getPerson().getForelderBarnRelasjon().stream().anyMatch(ForelderBarnRelasjonDTO::isEksisterendePerson)) { - - deleteForelderBarnRelasjoner(hovedperson); - } - - if (hovedperson.getPerson().getFullmakt().stream().anyMatch(FullmaktDTO::isEksisterendePerson)) { - - deleteFullmaktRelasjoner(hovedperson); - } - - if (hovedperson.getRelasjoner().stream() - .filter(relasjon -> FULLMAKTSGIVER == relasjon.getRelasjonType()) - .map(DbRelasjon::getRelatertPerson) - .map(DbPerson::getPerson) - .map(PersonDTO::getFullmakt) - .flatMap(Collection::stream) - .anyMatch(FullmaktDTO::isEksisterendePerson)) { - - deleteFullmaktAndreRelasjoner(hovedperson); - } - - if (hovedperson.getPerson().getVergemaal().stream().anyMatch(VergemaalDTO::isEksisterendePerson)) { - - deleteVergemaalRelasjoner(hovedperson); - } - - if (hovedperson.getRelasjoner().stream() - .filter(relasjon -> VERGE_MOTTAKER == relasjon.getRelasjonType()) - .map(DbRelasjon::getRelatertPerson) - .map(DbPerson::getPerson) - .map(PersonDTO::getVergemaal) - .flatMap(Collection::stream) - .anyMatch(VergemaalDTO::isEksisterendePerson)) { - - deleteVergemaalAndreRelasjoner(hovedperson); - } - - if (hovedperson.getPerson().getKontaktinformasjonForDoedsbo().stream() - .map(KontaktinformasjonForDoedsboDTO::getPersonSomKontakt) - .filter(Objects::nonNull) - .anyMatch(KontaktinformasjonForDoedsboDTO.KontaktpersonDTO::isEksisterendePerson)) { - - deleteKontaktinformasjonForDoedsboeRelasjoner(hovedperson); - } - - if (hovedperson.getRelasjoner().stream() - .filter(relasjon -> AVDOEDD_FOR_KONTAKT == relasjon.getRelasjonType()) - .map(DbRelasjon::getRelatertPerson) - .map(DbPerson::getPerson) - .map(PersonDTO::getKontaktinformasjonForDoedsbo) - .flatMap(Collection::stream) - .map(KontaktinformasjonForDoedsboDTO::getPersonSomKontakt) - .filter(Objects::nonNull) - .anyMatch(KontaktinformasjonForDoedsboDTO.KontaktpersonDTO::isEksisterendePerson)) { - - deleteKontaktinformasjonForDoedsboeAndreRelasjoner(hovedperson); - } + deleteFullmaktRelasjoner(hovedperson); + deleteVergemaalRelasjoner(hovedperson); + deleteKontaktinformasjonForDoedsboeAndreRelasjoner(hovedperson); } private void deleteSivilstandArtifact(DbPerson hovedperson) { var partnere = personRepository.findByIdentIn(hovedperson.getPerson().getSivilstand().stream() - .filter(SivilstandDTO::isEksisterendePerson) .map(SivilstandDTO::getRelatertVedSivilstand) .toList(), Pageable.unpaged()); @@ -136,154 +56,135 @@ private void deleteSivilstandArtifact(DbPerson hovedperson) { !sivilstand.getRelatertVedSivilstand().equals(hovedperson.getIdent())) .toList())); - deleteRelasjoner(hovedperson, partnere); + if (hovedperson.getPerson().isStandalone() || + hovedperson.getPerson().getSivilstand().stream().anyMatch(SivilstandDTO::isEksisterendePerson) || + partnere.stream().anyMatch(dbPerson -> dbPerson.getPerson().isStandalone())) { + + deleteRelasjoner(hovedperson, partnere); + } } private void deleteForelderBarnRelasjoner(DbPerson hovedperson) { var relasjoner = personRepository.findByIdentIn(hovedperson.getPerson().getForelderBarnRelasjon().stream() - .filter(ForelderBarnRelasjonDTO::isEksisterendePerson) .map(ForelderBarnRelasjonDTO::getRelatertPerson) .toList(), Pageable.unpaged()); relasjoner.stream() .map(DbPerson::getPerson) .forEach(person -> person.setForelderBarnRelasjon(person.getForelderBarnRelasjon().stream() - .filter(relasjon -> nonNull(relasjon.getRelatertPerson())) - .filter(relasjon -> !relasjon.getRelatertPerson().equals(hovedperson.getIdent())) + .filter(relasjon -> !Objects.equals(hovedperson.getIdent(), relasjon.getRelatertPerson())) .toList())); - deleteRelasjoner(hovedperson, relasjoner); - } - - private void deleteForeldreansvarRelasjoner(DbPerson hovedperson) { + if (hovedperson.getPerson().isStandalone() || + hovedperson.getPerson().getForelderBarnRelasjon().stream().anyMatch(ForelderBarnRelasjonDTO::isEksisterendePerson) || + relasjoner.stream().anyMatch(dbPerson -> dbPerson.getPerson().isStandalone())) { - var barna = hovedperson.getRelasjoner().stream() - .filter(relasjon -> FAMILIERELASJON_BARN == relasjon.getRelasjonType()) - .map(DbRelasjon::getRelatertPerson) - .filter(relasjon -> relasjon.getPerson().getForeldreansvar().stream() - .anyMatch(ForeldreansvarDTO::isEksisterendePerson)) - .toList(); - - barna.forEach(barn -> - deleteRelasjoner(barn, barn.getRelasjoner().stream() - .filter(relasjon -> FORELDREANSVAR_FORELDER == relasjon.getRelasjonType()) - .map(DbRelasjon::getRelatertPerson) - .toList()) - ); + deleteRelasjoner(hovedperson, relasjoner); + } } - private void deleteForeldreansvarAndreRelasjoner(DbPerson hovedperson) { + private void deleteForeldreansvarRelasjoner(DbPerson hovedperson) { - var barna = hovedperson.getRelasjoner().stream() - .filter(relasjon -> FORELDREANSVAR_BARN == relasjon.getRelasjonType()) + var relasjoner = personRepository.findByIdentIn(hovedperson.getRelasjoner().stream() + .filter(relasjon -> FORELDREANSVAR_BARN == relasjon.getRelasjonType() || + FORELDREANSVAR_FORELDER == relasjon.getRelasjonType()) .map(DbRelasjon::getRelatertPerson) - .filter(relasjon -> relasjon.getPerson().getForeldreansvar().stream() - .anyMatch(ForeldreansvarDTO::isEksisterendePerson)) - .toList(); + .map(DbPerson::getIdent) + .toList(), Pageable.unpaged()); - barna.stream() + relasjoner.stream() .map(DbPerson::getPerson) .forEach(person -> person.setForeldreansvar( person.getForeldreansvar().stream() - .filter(relasjon -> !relasjon.getAnsvarlig().equals(hovedperson.getIdent())) + .filter(relasjon -> !Objects.equals(hovedperson.getIdent(), relasjon.getIdentForRelasjon())) .toList())); - deleteRelasjoner(hovedperson, barna); - } - - private void deleteFullmaktRelasjoner(DbPerson hovedperson) { - - var fullmektigere = personRepository.findByIdentIn(hovedperson.getPerson().getFullmakt().stream() - .filter(FullmaktDTO::isEksisterendePerson) - .map(FullmaktDTO::getMotpartsPersonident) - .toList(), Pageable.unpaged()); + if (hovedperson.getPerson().isStandalone() || + hovedperson.getPerson().getForeldreansvar().stream().anyMatch(ForeldreansvarDTO::isEksisterendePerson) || + relasjoner.stream().anyMatch(dbPerson -> dbPerson.getPerson().isStandalone())) { - deleteRelasjoner(hovedperson, fullmektigere); + deleteRelasjoner(hovedperson, relasjoner); + } } - private void deleteFullmaktAndreRelasjoner(DbPerson hovedperson) { + private void deleteFullmaktRelasjoner(DbPerson hovedperson) { - var fullmaktsgivere = hovedperson.getRelasjoner().stream() - .filter(relasjon -> FULLMAKTSGIVER == relasjon.getRelasjonType()) + var relasjoner = personRepository.findByIdentIn(hovedperson.getRelasjoner().stream() + .filter(relasjon -> FULLMAKTSGIVER == relasjon.getRelasjonType() || + FULLMEKTIG == relasjon.getRelasjonType()) .map(DbRelasjon::getRelatertPerson) - .filter(person -> person.getPerson().getFullmakt().stream().anyMatch(FullmaktDTO::isEksisterendePerson)) - .toList(); + .map(DbPerson::getIdent) + .toList(), Pageable.unpaged()); - fullmaktsgivere.stream() + relasjoner.stream() .map(DbPerson::getPerson) .forEach(person -> person.setFullmakt(person.getFullmakt().stream() - .filter(fullmakt -> !fullmakt.getMotpartsPersonident().equals(hovedperson.getIdent())) + .filter(fullmakt -> !Objects.equals(hovedperson.getIdent(), fullmakt.getMotpartsPersonident())) .toList())); - deleteRelasjoner(hovedperson, fullmaktsgivere); - } - - private void deleteVergemaalRelasjoner(DbPerson hovedperson) { - - var verger = personRepository.findByIdentIn(hovedperson.getPerson().getVergemaal().stream() - .filter(VergemaalDTO::isEksisterendePerson) - .map(VergemaalDTO::getVergeIdent) - .toList(), Pageable.unpaged()); + if (hovedperson.getPerson().isStandalone() || + hovedperson.getPerson().getFullmakt().stream().anyMatch(FullmaktDTO::isEksisterendePerson) || + relasjoner.stream().anyMatch(dbPerson -> dbPerson.getPerson().isStandalone())) { - deleteRelasjoner(hovedperson, verger); + deleteRelasjoner(hovedperson, relasjoner); + } } - private void deleteVergemaalAndreRelasjoner(DbPerson hovedperson) { + private void deleteVergemaalRelasjoner(DbPerson hovedperson) { - var vergemottagere = hovedperson.getRelasjoner().stream() - .filter(relasjon -> VERGE_MOTTAKER == relasjon.getRelasjonType()) + var relasjoner = personRepository.findByIdentIn(hovedperson.getRelasjoner().stream() + .filter(relasjon -> VERGE_MOTTAKER == relasjon.getRelasjonType() || + VERGE == relasjon.getRelasjonType()) .map(DbRelasjon::getRelatertPerson) - .filter(person -> person.getPerson().getVergemaal().stream().anyMatch(VergemaalDTO::isEksisterendePerson)) - .toList(); + .map(DbPerson::getIdent) + .toList(), Pageable.unpaged()); - vergemottagere.stream() + relasjoner.stream() .map(DbPerson::getPerson) .forEach(person -> person.setVergemaal(person.getVergemaal().stream() - .filter(vergemaal -> !vergemaal.getVergeIdent().equals(hovedperson.getIdent())) + .filter(vergemaal -> !Objects.equals(hovedperson.getIdent(), vergemaal.getIdentForRelasjon())) .toList())); - deleteRelasjoner(hovedperson, vergemottagere); - } - - private void deleteKontaktinformasjonForDoedsboeRelasjoner(DbPerson hovedperson) { + if (hovedperson.getPerson().isStandalone() || + hovedperson.getPerson().getVergemaal().stream().anyMatch(VergemaalDTO::isEksisterendePerson) || + relasjoner.stream().anyMatch(dbPerson -> dbPerson.getPerson().isStandalone())) { - var kontaktpersoner = personRepository.findByIdentIn(hovedperson.getPerson().getKontaktinformasjonForDoedsbo().stream() - .map(KontaktinformasjonForDoedsboDTO::getPersonSomKontakt) - .filter(Objects::nonNull) - .filter(KontaktinformasjonForDoedsboDTO.KontaktpersonDTO::isEksisterendePerson) - .map(KontaktinformasjonForDoedsboDTO.KontaktpersonDTO::getIdentifikasjonsnummer) - .toList(), Pageable.unpaged()); - - deleteRelasjoner(hovedperson, kontaktpersoner); + deleteRelasjoner(hovedperson, relasjoner); + } } private void deleteKontaktinformasjonForDoedsboeAndreRelasjoner(DbPerson hovedperson) { - var avdoeddeMedKontaktperson = hovedperson.getRelasjoner().stream() - .filter(relasjon -> AVDOEDD_FOR_KONTAKT == relasjon.getRelasjonType()) + var relasjoner = personRepository.findByIdentIn(hovedperson.getRelasjoner().stream() + .filter(relasjon -> KONTAKT_FOR_DOEDSBO == relasjon.getRelasjonType() || + AVDOEDD_FOR_KONTAKT == relasjon.getRelasjonType()) .map(DbRelasjon::getRelatertPerson) - .filter(person -> person.getPerson().getKontaktinformasjonForDoedsbo().stream() - .anyMatch(kontakt -> nonNull(kontakt.getPersonSomKontakt()) && - kontakt.getPersonSomKontakt().isEksisterendePerson())) - .toList(); + .map(DbPerson::getIdent) + .toList(), Pageable.unpaged()); - avdoeddeMedKontaktperson.stream() + relasjoner.stream() .map(DbPerson::getPerson) .forEach(person -> person.setKontaktinformasjonForDoedsbo(person.getKontaktinformasjonForDoedsbo().stream() .filter(kontakt -> isNull(kontakt.getPersonSomKontakt()) || !hovedperson.getIdent().equals(kontakt.getPersonSomKontakt().getIdentifikasjonsnummer())) .toList())); - deleteRelasjoner(hovedperson, avdoeddeMedKontaktperson); + if (hovedperson.getPerson().isStandalone() || + hovedperson.getPerson().getKontaktinformasjonForDoedsbo().stream() + .anyMatch(kontakt -> kontakt.getPersonSomKontakt().isEksisterendePerson()) || + relasjoner.stream().anyMatch(dbPerson -> dbPerson.getPerson().isStandalone())) { + + deleteRelasjoner(hovedperson, relasjoner); + } } private void deleteRelasjoner(DbPerson hovedPerson, List relasjoner) { relasjoner.forEach(person -> { - deleteRelasjon(person, hovedPerson.getIdent()); - deleteRelasjon(hovedPerson, person.getIdent()); - }); + deleteRelasjon(person, hovedPerson.getIdent()); + deleteRelasjon(hovedPerson, person.getIdent()); + }); } private void deleteRelasjon(DbPerson person, String relasjonIdent) { diff --git a/apps/pdl-forvalter/src/test/java/no/nav/pdl/forvalter/service/ForeldreansvarServiceTest.java b/apps/pdl-forvalter/src/test/java/no/nav/pdl/forvalter/service/ForeldreansvarServiceTest.java index 7d2c61eb0c2..918661f9b1a 100644 --- a/apps/pdl-forvalter/src/test/java/no/nav/pdl/forvalter/service/ForeldreansvarServiceTest.java +++ b/apps/pdl-forvalter/src/test/java/no/nav/pdl/forvalter/service/ForeldreansvarServiceTest.java @@ -2,12 +2,12 @@ import no.nav.pdl.forvalter.consumer.GenererNavnServiceConsumer; import no.nav.pdl.forvalter.database.repository.PersonRepository; -import no.nav.testnav.libs.dto.generernavnservice.v1.NavnDTO; import no.nav.testnav.libs.data.pdlforvalter.v1.ForeldreansvarDTO; import no.nav.testnav.libs.data.pdlforvalter.v1.ForeldreansvarDTO.Ansvar; import no.nav.testnav.libs.data.pdlforvalter.v1.PersonDTO; import no.nav.testnav.libs.data.pdlforvalter.v1.PersonnavnDTO; import no.nav.testnav.libs.data.pdlforvalter.v1.RelatertBiPersonDTO; +import no.nav.testnav.libs.dto.generernavnservice.v1.NavnDTO; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.InjectMocks; @@ -23,7 +23,8 @@ @ExtendWith(MockitoExtension.class) class ForeldreansvarServiceTest { - private static final String IDENT_ANDRE = "12345678901"; + private static final String IDENT_HOVEDPERSON = "23510001234"; + private static final String IDENT_ANDRE = "12435678901"; private static final String ETTERNAVN = "TUBA"; @Mock @@ -105,7 +106,7 @@ void whenNonExistingNavnStated_thenThrowExecption() { foreldreansvarService.validate(request, new PersonDTO())); assertThat(exception.getMessage(), - containsString(String.format("Foreldreansvar: Navn er ikke i liste over gyldige verdier", IDENT_ANDRE))); + containsString("Foreldreansvar: Navn er ikke i liste over gyldige verdier")); } @Test @@ -131,11 +132,11 @@ void whenNonExistingRelatedMorStated_thenThrowExecption() { foreldreansvarService.validate(request, new PersonDTO())); assertThat(exception.getMessage(), - containsString(String.format("Foreldreansvar: Navn er ikke i liste over gyldige verdier", IDENT_ANDRE))); + containsString("Foreldreansvar: Navn er ikke i liste over gyldige verdier")); } @Test - void whenAnsvarIsMorANdForeldreBarnRelationExcludesMor_thenThrowExecption() { + void whenAnsvarIsMorAndForeldreBarnRelationExcludesMor_thenThrowExecption() { var request = ForeldreansvarDTO.builder() .ansvar(Ansvar.MOR) @@ -143,7 +144,10 @@ void whenAnsvarIsMorANdForeldreBarnRelationExcludesMor_thenThrowExecption() { .build(); var exception = assertThrows(HttpClientErrorException.class, () -> - foreldreansvarService.validate(request, new PersonDTO())); + foreldreansvarService.validate(request, PersonDTO.builder() + .ident(IDENT_HOVEDPERSON) + .build() + )); assertThat(exception.getMessage(), containsString("Foreldreansvar: barn mangler / barnets foreldrerelasjon til mor ikke funnet")); @@ -158,7 +162,10 @@ void whenAnsvarIsFarAndForeldreBarnRelationExcludesFar_thenThrowExecption() { .build(); var exception = assertThrows(HttpClientErrorException.class, () -> - foreldreansvarService.validate(request, new PersonDTO())); + foreldreansvarService.validate(request, PersonDTO.builder() + .ident(IDENT_HOVEDPERSON) + .build() + )); assertThat(exception.getMessage(), containsString("Foreldreansvar: barn mangler / barnets foreldrerelasjon til far ikke funnet")); @@ -173,7 +180,10 @@ void whenAnsvarIsFellesAndForeldreBarnRelationExcludesMorOrFar_thenThrowExecptio .build(); var exception = assertThrows(HttpClientErrorException.class, () -> - foreldreansvarService.validate(request, new PersonDTO())); + foreldreansvarService.validate(request, PersonDTO.builder() + .ident(IDENT_HOVEDPERSON) + .build() + )); assertThat(exception.getMessage(), containsString("Foreldreansvar: barn mangler / barnets foreldrerelasjon til mor og/eller far ikke funnet")); diff --git a/apps/person-faste-data-service/build.gradle b/apps/person-faste-data-service/build.gradle index 80db0b91523..745a0854d4d 100644 --- a/apps/person-faste-data-service/build.gradle +++ b/apps/person-faste-data-service/build.gradle @@ -1,44 +1,13 @@ plugins { - id 'java' - id "org.sonarqube" version "5.0.0.4638" - id 'org.springframework.boot' version "3.2.6" - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" -} - -test { - useJUnitPlatform() + id "dolly-apps" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnav-person-faste-data-service" property "sonar.projectName", "testnav-person-faste-data-service" - property "sonar.sourceEncoding", "UTF-8" } } -bootJar { - archiveFileName = "app.jar" -} - -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1' - } -} - -repositories { - mavenCentral() - mavenLocal() -} dependencies { @@ -47,36 +16,18 @@ dependencies { implementation 'no.nav.testnav.libs:data-transfer-objects' implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server' - implementation 'org.springframework.boot:spring-boot-starter-webflux' implementation 'org.springframework.boot:spring-boot-starter-data-jpa' - implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' - implementation 'org.springframework.cloud:spring-cloud-starter-bootstrap' // TODO remove legacy bootstrap config - implementation 'org.springframework.boot:spring-boot-starter-actuator' - - implementation 'io.micrometer:micrometer-registry-prometheus' implementation 'org.flywaydb:flyway-core' implementation 'com.h2database:h2' implementation 'com.zaxxer:HikariCP' implementation 'org.postgresql:postgresql' - implementation 'org.springdoc:springdoc-openapi-starter-webflux-ui:2.5.0' + implementation "org.springdoc:springdoc-openapi-starter-webflux-ui:$versions.springdoc" - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.21' - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' - implementation 'org.hibernate.validator:hibernate-validator' + implementation "io.swagger.core.v3:swagger-annotations-jakarta:$versions.swagger" - testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' - - implementation 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' -} -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } } diff --git a/apps/person-faste-data-service/settings.gradle b/apps/person-faste-data-service/settings.gradle index a6ad03e9358..1afbd34226a 100644 --- a/apps/person-faste-data-service/settings.gradle +++ b/apps/person-faste-data-service/settings.gradle @@ -4,10 +4,11 @@ plugins { rootProject.name = 'person-faste-data-service' +includeBuild "../../plugins/java" -includeBuild '../../libs/reactive-security' -includeBuild '../../libs/reactive-core' includeBuild '../../libs/data-transfer-objects' +includeBuild '../../libs/reactive-core' +includeBuild '../../libs/reactive-security' develocity { buildScan { diff --git a/apps/person-organisasjon-tilgang-service/build.gradle b/apps/person-organisasjon-tilgang-service/build.gradle index 4c4d50f53a0..d7959ce9df3 100644 --- a/apps/person-organisasjon-tilgang-service/build.gradle +++ b/apps/person-organisasjon-tilgang-service/build.gradle @@ -1,14 +1,7 @@ plugins { - id 'java' - id "org.sonarqube" version "5.0.0.4638" - id 'org.springframework.boot' version "3.2.6" - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" + id "dolly-apps" } -test { - useJUnitPlatform() -} def test = tasks.named("test") { useJUnitPlatform { excludeTags "integration" @@ -23,64 +16,24 @@ def iTest = tasks.register("iTest", Test) { sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnav-person-organisasjon-tilgang-service" property "sonar.projectName", "testnav-person-organisasjon-tilgang-service" - property "sonar.sourceEncoding", "UTF-8" - } -} - -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) } } -bootJar { - archiveFileName = "app.jar" -} -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1' - } -} - -repositories { - mavenCentral() - mavenLocal() -} - dependencies { implementation 'no.nav.testnav.libs:reactive-core' implementation 'no.nav.testnav.libs:reactive-security' implementation 'no.nav.testnav.libs:security-core' - implementation 'org.springframework.boot:spring-boot-starter-webflux' implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server' - implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' + implementation "org.springdoc:springdoc-openapi-starter-webflux-ui:$versions.springdoc" - implementation 'io.micrometer:micrometer-registry-prometheus' + implementation "com.fasterxml.jackson.core:jackson-core:$versions.jackson" - implementation 'org.springdoc:springdoc-openapi-starter-webflux-ui:2.5.0' - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' - - implementation 'com.fasterxml.jackson.core:jackson-core:2.17.1' - - testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' testImplementation 'no.nav.testnav.libs:integration-test' - testImplementation 'com.squareup.okhttp3:okhttp:4.10.0' - testImplementation 'com.squareup.okhttp3:mockwebserver:4.10.0' - - implementation 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' + testImplementation "com.squareup.okhttp3:okhttp:$versions.okhttp" + testImplementation "com.squareup.okhttp3:mockwebserver:$versions.okhttp" } diff --git a/apps/person-organisasjon-tilgang-service/settings.gradle b/apps/person-organisasjon-tilgang-service/settings.gradle index dc0c7088c66..6c93b49e1a4 100644 --- a/apps/person-organisasjon-tilgang-service/settings.gradle +++ b/apps/person-organisasjon-tilgang-service/settings.gradle @@ -4,11 +4,12 @@ plugins { rootProject.name = 'person-organisasjon-tilgang-service' +includeBuild "../../plugins/java" +includeBuild '../../libs/integration-test' includeBuild '../../libs/reactive-core' includeBuild '../../libs/reactive-security' includeBuild '../../libs/security-core' -includeBuild '../../libs/integration-test' develocity { buildScan { diff --git a/apps/person-search-service/build.gradle b/apps/person-search-service/build.gradle index f565c55dd44..02965927619 100644 --- a/apps/person-search-service/build.gradle +++ b/apps/person-search-service/build.gradle @@ -1,53 +1,14 @@ plugins { - id 'java' - id "org.sonarqube" version "5.0.0.4638" - id 'org.springframework.boot' version "3.2.6" - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" -} - -test { - useJUnitPlatform() - jvmArgs '--add-opens', 'java.base/java.lang=ALL-UNNAMED' + id "dolly-apps" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "person-search-service" property "sonar.projectName", "person-search-service" - property "sonar.sourceEncoding", "UTF-8" - } -} - -bootJar { - archiveFileName = "app.jar" -} - -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1' } } -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } -} - -repositories { - mavenCentral() - mavenLocal() -} - dependencies { implementation 'no.nav.testnav.libs:data-transfer-objects' @@ -57,31 +18,18 @@ dependencies { implementation 'no.nav.testnav.libs:servlet-security' implementation 'org.springframework.boot:spring-boot-starter-data-elasticsearch' - implementation 'org.opensearch.client:spring-data-opensearch:1.4.0' + implementation "org.opensearch.client:spring-data-opensearch:$versions.opensearch" - implementation 'com.fasterxml.jackson.core:jackson-core:2.17.1' + implementation "com.fasterxml.jackson.core:jackson-core:$versions.jackson" implementation 'org.springframework.boot:spring-boot-starter-security' - implementation 'org.springframework.boot:spring-boot-starter-webflux' implementation 'org.springframework.boot:spring-boot-starter-oauth2-client' implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'org.springframework.boot:spring-boot-starter-cache' - implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' - implementation 'org.springframework.boot:spring-boot-starter-actuator' + implementation "ma.glasnost.orika:orika-core:$versions.orika" - implementation 'io.micrometer:micrometer-registry-prometheus' + implementation "org.springdoc:springdoc-openapi-starter-webmvc-ui:$versions.springdoc" - implementation 'ma.glasnost.orika:orika-core:1.5.4' - implementation 'org.hibernate.validator:hibernate-validator' - - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.3.0' - - testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' - - implementation 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' } \ No newline at end of file diff --git a/apps/person-search-service/settings.gradle b/apps/person-search-service/settings.gradle index e645f4baec8..373092ece6d 100644 --- a/apps/person-search-service/settings.gradle +++ b/apps/person-search-service/settings.gradle @@ -4,6 +4,8 @@ plugins { rootProject.name = 'person-search-service' +includeBuild "../../plugins/java" + includeBuild '../../libs/data-transfer-objects' includeBuild '../../libs/reactive-core' includeBuild '../../libs/security-core' diff --git a/apps/person-service/build.gradle b/apps/person-service/build.gradle index f0050f6a288..1b0944a8593 100644 --- a/apps/person-service/build.gradle +++ b/apps/person-service/build.gradle @@ -1,51 +1,14 @@ plugins { - id 'java' - id "org.sonarqube" version "5.0.0.4638" - id 'org.springframework.boot' version "3.2.6" - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" -} - -test { - useJUnitPlatform() + id "dolly-apps" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnav-person-service" property "sonar.projectName", "testnav-person-service" - property "sonar.sourceEncoding", "UTF-8" - } -} - -bootJar { - archiveFileName = "app.jar" -} -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1' } } -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } -} - -repositories { - mavenCentral() - mavenLocal() -} - dependencies { implementation 'no.nav.testnav.libs:commands' @@ -56,27 +19,12 @@ dependencies { implementation 'no.nav.testnav.libs:servlet-security' implementation 'org.springframework.boot:spring-boot-starter-security' - implementation 'org.springframework.boot:spring-boot-starter-webflux' implementation 'org.springframework.boot:spring-boot-starter-oauth2-client' implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'org.springframework.boot:spring-boot-starter-cache' - implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' - - implementation 'org.springframework.boot:spring-boot-starter-actuator' - - implementation 'io.micrometer:micrometer-registry-prometheus' + implementation "ma.glasnost.orika:orika-core:$versions.orika" + implementation "org.springdoc:springdoc-openapi-starter-webmvc-ui:$versions.springdoc" - implementation 'ma.glasnost.orika:orika-core:1.5.4' - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.3.0' - - implementation 'org.hibernate.validator:hibernate-validator' - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' - - testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' - - implementation 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' } diff --git a/apps/person-service/settings.gradle b/apps/person-service/settings.gradle index 19d12c5be56..9ebfc24c114 100644 --- a/apps/person-service/settings.gradle +++ b/apps/person-service/settings.gradle @@ -4,6 +4,8 @@ plugins { rootProject.name = 'person-service' +includeBuild "../../plugins/java" + includeBuild '../../libs/commands' includeBuild '../../libs/data-transfer-objects' includeBuild '../../libs/reactive-core' diff --git a/apps/person-service/src/main/resources/pdl/pdlPerson2Query.graphql b/apps/person-service/src/main/resources/pdl/pdlPerson2Query.graphql index 3707c0c0ca1..d0e5586ec6b 100644 --- a/apps/person-service/src/main/resources/pdl/pdlPerson2Query.graphql +++ b/apps/person-service/src/main/resources/pdl/pdlPerson2Query.graphql @@ -575,6 +575,7 @@ query($ident: ID!, $historikk: Boolean!) { foreldreansvar(historikk: $historikk) { ansvar, ansvarlig, + ansvarssubjekt, ansvarligUtenIdentifikator { navn { fornavn, diff --git a/apps/profil-api/build.gradle b/apps/profil-api/build.gradle index b5322d86cc7..05b7ac72f0d 100644 --- a/apps/profil-api/build.gradle +++ b/apps/profil-api/build.gradle @@ -1,46 +1,14 @@ plugins { - id 'java' - id "org.sonarqube" version "5.0.0.4638" - id 'org.springframework.boot' version "3.2.6" - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" -} - -test { - useJUnitPlatform() + id "dolly-apps" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnorge-profil-api" property "sonar.projectName", "testnorge-profil-api" - property "sonar.sourceEncoding", "UTF-8" } } -bootJar { - archiveFileName = "app.jar" -} -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1' - } -} - -repositories { - mavenCentral() - mavenLocal() -} - - dependencies { implementation 'no.nav.testnav.libs:reactive-core' @@ -52,30 +20,13 @@ dependencies { implementation 'org.springframework.boot:spring-boot-starter-security' implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server' - implementation 'org.springframework.boot:spring-boot-starter-webflux' implementation 'org.springframework.boot:spring-boot-starter-web' - implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' implementation 'org.springframework.cloud:spring-cloud-starter-bootstrap' // TODO remove legacy bootstrap config - implementation 'org.springframework.boot:spring-boot-starter-actuator' - - implementation 'io.micrometer:micrometer-registry-prometheus' - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.3.0' - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' - implementation 'org.hibernate.validator:hibernate-validator' + implementation "org.springdoc:springdoc-openapi-starter-webmvc-ui:$versions.springdoc" - implementation 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' - - testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' } description = 'profil-api' -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } -} diff --git a/apps/profil-api/settings.gradle b/apps/profil-api/settings.gradle index 7855b77d9af..3ad637cb7fa 100644 --- a/apps/profil-api/settings.gradle +++ b/apps/profil-api/settings.gradle @@ -4,6 +4,8 @@ plugins { rootProject.name = 'profil-api' +includeBuild "../../plugins/java" + includeBuild '../../libs/data-transfer-objects' includeBuild '../../libs/reactive-core' includeBuild '../../libs/security-core' diff --git a/apps/skattekort-service/build.gradle b/apps/skattekort-service/build.gradle index a798e1c8744..a49aaa40e38 100644 --- a/apps/skattekort-service/build.gradle +++ b/apps/skattekort-service/build.gradle @@ -1,43 +1,13 @@ plugins { - id 'java' - id "org.sonarqube" version "4.4.1.3373" - id 'org.springframework.boot' version "3.2.1" - id 'io.spring.dependency-management' version "1.1.4" - id "jacoco" + id "dolly-apps" + id 'org.unbroken-dome.xjc' version '2.0.0' } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnav-skattekort-service" property "sonar.projectName", "testnav-skattekort-service" - property "sonar.sourceEncoding", "UTF-8" - } -} - -bootJar { - archiveFileName = "app.jar" - mainClass = 'no.nav.skattekortservice.SkattekortServiceApplicationStarter' - duplicatesStrategy = DuplicatesStrategy.EXCLUDE -} - -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.0' - } -} - -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) } } @@ -52,21 +22,9 @@ xjc { srcDirName = 'resources/schema' } -repositories { - mavenCentral() - maven { - name = "GitHubPackages" - url = uri('https://maven.pkg.github.com/navikt/maven-release') - credentials(PasswordCredentials) { - password System.getenv("NAV_TOKEN") - username 'token' - } - } -} - dependencies { - implementation 'jakarta.xml.bind:jakarta.xml.bind-api:4.0.0' - implementation 'org.glassfish.jaxb:jaxb-runtime:4.0.0' + implementation "jakarta.xml.bind:jakarta.xml.bind-api:$versions.jakartaXmlBindApi" + implementation "org.glassfish.jaxb:jaxb-runtime:$versions.jaxb" implementation 'org.json:json:20231013' implementation 'no.nav.testnav.libs:security-core' @@ -74,26 +32,13 @@ dependencies { implementation 'no.nav.testnav.libs:reactive-security' implementation 'no.nav.testnav.libs:data-transfer-objects' - implementation 'org.springframework.boot:spring-boot-starter-webflux' implementation 'org.springframework.boot:spring-boot-starter-security' implementation 'org.springframework.boot:spring-boot-starter-oauth2-client' - implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' implementation 'org.springframework.cloud:spring-cloud-starter-bootstrap' - implementation 'org.springframework.boot:spring-boot-starter-actuator' - - implementation 'io.micrometer:micrometer-registry-prometheus' - implementation 'org.hibernate.validator:hibernate-validator' - - implementation 'org.springdoc:springdoc-openapi-starter-webflux-ui:2.3.0' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.20' - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' - - testImplementation 'org.springframework.boot:spring-boot-starter-test' - implementation 'ma.glasnost.orika:orika-core:1.5.4' - annotationProcessor 'org.projectlombok:lombok' - implementation 'org.projectlombok:lombok' + implementation "org.springdoc:springdoc-openapi-starter-webflux-ui:$versions.springdoc" + implementation "io.swagger.core.v3:swagger-annotations-jakarta:$versions.swagger" - testImplementation 'org.springframework.boot:spring-boot-starter-test' + implementation "ma.glasnost.orika:orika-core:$versions.orika" } \ No newline at end of file diff --git a/apps/skattekort-service/config.yml b/apps/skattekort-service/config.yml index f040ef425d6..26ec83a2ed0 100644 --- a/apps/skattekort-service/config.yml +++ b/apps/skattekort-service/config.yml @@ -20,8 +20,11 @@ spec: inbound: rules: - application: dolly-backend + - application: dolly-backend-dev - application: dolly-frontend + - application: dolly-frontend-dev - application: dolly-idporten + - application: team-dolly-lokal-app - application: testnav-oversikt-frontend outbound: external: diff --git a/apps/skattekort-service/settings.gradle b/apps/skattekort-service/settings.gradle index b42e15f1e9a..a35cbdbc703 100644 --- a/apps/skattekort-service/settings.gradle +++ b/apps/skattekort-service/settings.gradle @@ -4,6 +4,8 @@ plugins { rootProject.name = 'skattekort-service' +includeBuild "../../plugins/java" + includeBuild '../../libs/security-core' includeBuild '../../libs/reactive-core' includeBuild '../../libs/reactive-security' diff --git a/apps/skattekort-service/src/main/java/no/nav/skattekortservice/dto/SkattekortResponse.java b/apps/skattekort-service/src/main/java/no/nav/skattekortservice/dto/SkattekortResponse.java index 76b2ef5d19d..43cbb649855 100644 --- a/apps/skattekort-service/src/main/java/no/nav/skattekortservice/dto/SkattekortResponse.java +++ b/apps/skattekort-service/src/main/java/no/nav/skattekortservice/dto/SkattekortResponse.java @@ -4,7 +4,7 @@ import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; -import no.nav.testnav.libs.dto.skattekortservice.v1.Arbeidsgiver; +import no.nav.testnav.libs.dto.skattekortservice.v1.ArbeidsgiverSkatt; import java.util.ArrayList; import java.util.List; @@ -25,9 +25,9 @@ public class SkattekortResponse { @AllArgsConstructor public static class SkattekortTilArbeidsgiver { - private List arbeidsgiver; + private List arbeidsgiver; - public List getArbeidsgiver() { + public List getArbeidsgiver() { if (isNull(arbeidsgiver)) { arbeidsgiver = new ArrayList<>(); diff --git a/apps/skattekort-service/src/main/java/no/nav/skattekortservice/service/SkattekortService.java b/apps/skattekort-service/src/main/java/no/nav/skattekortservice/service/SkattekortService.java index c116642a81f..836f8379d3a 100644 --- a/apps/skattekort-service/src/main/java/no/nav/skattekortservice/service/SkattekortService.java +++ b/apps/skattekort-service/src/main/java/no/nav/skattekortservice/service/SkattekortService.java @@ -12,7 +12,7 @@ import no.nav.skattekortservice.dto.SokosRequest; import no.nav.skattekortservice.dto.SokosResponse; import no.nav.skattekortservice.utility.SkattekortValidator; -import no.nav.testnav.libs.dto.skattekortservice.v1.Arbeidsgiver; +import no.nav.testnav.libs.dto.skattekortservice.v1.ArbeidsgiverSkatt; import no.nav.testnav.libs.dto.skattekortservice.v1.SkattekortRequestDTO; import no.nav.testnav.libs.dto.skattekortservice.v1.SkattekortResponseDTO; import org.json.XML; @@ -107,10 +107,10 @@ private String decodeRequest(String request) { } @SneakyThrows - private List unmarshal(String xmlData) { + private List unmarshal(String xmlData) { var jsonRoot = XML.toJSONObject(xmlData); var intermediate = objectMapper.readValue(jsonRoot.toString(), SkattekortResponsIntermediate.class); - return mapperFacade.mapAsList(intermediate.getSkattekortTilArbeidsgiver().getArbeidsgiver(), Arbeidsgiver.class); + return mapperFacade.mapAsList(intermediate.getSkattekortTilArbeidsgiver().getArbeidsgiver(), ArbeidsgiverSkatt.class); } } \ No newline at end of file diff --git a/apps/skattekort-service/src/main/java/no/nav/skattekortservice/utility/SkattekortValidator.java b/apps/skattekort-service/src/main/java/no/nav/skattekortservice/utility/SkattekortValidator.java index 6c4a87dc66a..2ead001896d 100644 --- a/apps/skattekort-service/src/main/java/no/nav/skattekortservice/utility/SkattekortValidator.java +++ b/apps/skattekort-service/src/main/java/no/nav/skattekortservice/utility/SkattekortValidator.java @@ -1,7 +1,7 @@ package no.nav.skattekortservice.utility; import lombok.experimental.UtilityClass; -import no.nav.testnav.libs.dto.skattekortservice.v1.Arbeidsgiver; +import no.nav.testnav.libs.dto.skattekortservice.v1.ArbeidsgiverSkatt; import no.nav.testnav.libs.dto.skattekortservice.v1.Skattekort; import no.nav.testnav.libs.dto.skattekortservice.v1.SkattekortRequestDTO; import no.nav.testnav.libs.dto.skattekortservice.v1.Skattekortmelding; @@ -25,7 +25,7 @@ public static void validate(SkattekortRequestDTO skattekort) { private static void validateSkattekort(SkattekortRequestDTO skattekort) { skattekort.getArbeidsgiver().stream() - .map(Arbeidsgiver::getArbeidstaker) + .map(ArbeidsgiverSkatt::getArbeidstaker) .flatMap(Collection::stream) .map(Skattekortmelding::getSkattekort) .map(Skattekort::getTrekktype) @@ -44,7 +44,7 @@ private static void validateSkattekort(SkattekortRequestDTO skattekort) { private static void validateArbeidstager(SkattekortRequestDTO skattekort) { skattekort.getArbeidsgiver().stream() - .map(Arbeidsgiver::getArbeidstaker) + .map(ArbeidsgiverSkatt::getArbeidstaker) .flatMap(Collection::stream) .forEach(arbeidstaker -> { if (arbeidstaker.isEmptyArbeidstakeridentifikator()) { @@ -60,7 +60,7 @@ private static void validateArbeidstager(SkattekortRequestDTO skattekort) { private static void validateArbeidsgiver(SkattekortRequestDTO skattekort) { skattekort.getArbeidsgiver().stream() - .map(Arbeidsgiver::getArbeidsgiveridentifikator) + .map(ArbeidsgiverSkatt::getArbeidsgiveridentifikator) .forEach(arbeidsgiver -> { if (arbeidsgiver.isAllEmpty()) { throw new ResponseStatusException(HttpStatus.BAD_REQUEST, diff --git a/apps/sykemelding-api/build.gradle b/apps/sykemelding-api/build.gradle index edb750227a3..ca0ef57453e 100644 --- a/apps/sykemelding-api/build.gradle +++ b/apps/sykemelding-api/build.gradle @@ -1,53 +1,11 @@ plugins { - id 'java' - id "org.sonarqube" version "5.0.0.4638" - id 'org.springframework.boot' version "3.2.6" - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" -} - -test { - useJUnitPlatform() + id "dolly-apps" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnorge-sykemelding-api" property "sonar.projectName", "testnorge-sykemelding-api" - property "sonar.sourceEncoding", "UTF-8" - } -} -bootJar { - archiveFileName = "app.jar" -} - -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1' - } -} - -repositories { - mavenCentral() - mavenLocal() - maven { - name = "GitHubPackages" - url = uri('https://maven.pkg.github.com/navikt/maven-release') - credentials(PasswordCredentials) { - password System.getenv("NAV_TOKEN") - username 'token' - } - } - maven { - url = uri('https://packages.confluent.io/maven/') } } @@ -61,38 +19,22 @@ dependencies { implementation 'no.nav.testnav.libs:data-transfer-objects' implementation 'org.springframework.boot:spring-boot-starter-web' - implementation 'org.springframework.boot:spring-boot-starter-webflux' implementation 'org.springframework.boot:spring-boot-starter-security' - implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' - implementation 'org.springframework.boot:spring-boot-starter-actuator' - - implementation 'io.micrometer:micrometer-registry-prometheus' - implementation 'org.springdoc:springdoc-openapi-starter-webflux-ui:2.5.0' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.21' - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' + implementation "org.springdoc:springdoc-openapi-starter-webflux-ui:$versions.springdoc" + implementation "io.swagger.core.v3:swagger-annotations-jakarta:$versions.swagger" - implementation 'com.ibm.mq:mq-jms-spring-boot-starter:3.2.3' + implementation "com.ibm.mq:mq-jms-spring-boot-starter:$versions.mq" implementation 'org.springframework.kafka:spring-kafka' - implementation 'jakarta.xml.bind:jakarta.xml.bind-api:4.0.2' - implementation 'jakarta.activation:jakarta.activation-api:2.1.3' - implementation 'org.glassfish.jaxb:jaxb-runtime' + implementation "jakarta.xml.bind:jakarta.xml.bind-api:$versions.jakartaXmlBindApi" + implementation "jakarta.activation:jakarta.activation-api:$versions.jakartaActivation" + implementation "org.glassfish.jaxb:jaxb-runtime:$versions.jaxb" implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-xml' - implementation 'org.apache.kafka:kafka-clients:3.7.0' - implementation 'io.confluent:kafka-avro-serializer:7.5.1' + implementation "org.apache.kafka:kafka-clients:$versions.apacheKafka" + implementation "io.confluent:kafka-avro-serializer:$versions.avro" testImplementation 'no.nav.testnav.libs:testing' - testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.security:spring-security-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' - - implementation 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' -} -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } } diff --git a/apps/sykemelding-api/settings.gradle b/apps/sykemelding-api/settings.gradle index 90a4a4ede91..8dce3838ae4 100644 --- a/apps/sykemelding-api/settings.gradle +++ b/apps/sykemelding-api/settings.gradle @@ -4,15 +4,16 @@ plugins { rootProject.name = 'sykemelding-api' +includeBuild "../../plugins/java" +includeBuild '../../libs/avro-schema' includeBuild '../../libs/commands' -includeBuild '../../libs/testing' +includeBuild '../../libs/data-transfer-objects' includeBuild '../../libs/reactive-core' +includeBuild '../../libs/security-core' includeBuild '../../libs/servlet-core' includeBuild '../../libs/servlet-security' -includeBuild '../../libs/security-core' -includeBuild '../../libs/avro-schema' -includeBuild '../../libs/data-transfer-objects' +includeBuild '../../libs/testing' develocity { buildScan { diff --git a/apps/synt-sykemelding-api/build.gradle b/apps/synt-sykemelding-api/build.gradle index 9636e654fcb..d16feb5f7f2 100644 --- a/apps/synt-sykemelding-api/build.gradle +++ b/apps/synt-sykemelding-api/build.gradle @@ -1,45 +1,14 @@ plugins { - id 'java' - id "org.sonarqube" version "5.0.0.4638" - id 'org.springframework.boot' version "3.2.6" - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" -} - -test { - useJUnitPlatform() + id "dolly-apps" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnorge-synt-sykemelding-api" property "sonar.projectName", "testnorge-synt-sykemelding-api" - property "sonar.sourceEncoding", "UTF-8" } } -bootJar { - archiveFileName = "app.jar" -} -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1' - } -} - -repositories { - mavenCentral() - mavenLocal() -} - dependencies { implementation 'no.nav.testnav.libs:commands' @@ -49,33 +18,13 @@ dependencies { implementation 'no.nav.testnav.libs:servlet-core' implementation 'no.nav.testnav.libs:servlet-security' - implementation 'org.springframework.boot:spring-boot-starter-webflux' implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'org.springframework.boot:spring-boot-starter-oauth2-client' implementation 'org.springframework.boot:spring-boot-starter-security' - - implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' - implementation 'org.springframework.boot:spring-boot-starter-actuator' - - implementation 'io.micrometer:micrometer-registry-prometheus' - - implementation 'org.hibernate.validator:hibernate-validator' - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.3.0' - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' + implementation "org.springdoc:springdoc-openapi-starter-webmvc-ui:$versions.springdoc" testImplementation 'no.nav.testnav.libs:testing' - testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' testImplementation 'junit:junit:4.13.2' //TODO upgrade to JUnit5 - - implementation 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' -} - -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } } diff --git a/apps/synt-sykemelding-api/settings.gradle b/apps/synt-sykemelding-api/settings.gradle index 8d59ae02b01..1effa97ad87 100644 --- a/apps/synt-sykemelding-api/settings.gradle +++ b/apps/synt-sykemelding-api/settings.gradle @@ -4,6 +4,8 @@ plugins { rootProject.name = 'synt-sykemelding-api' +includeBuild "../../plugins/java" + includeBuild '../../libs/commands' includeBuild '../../libs/data-transfer-objects' includeBuild '../../libs/reactive-core' diff --git a/apps/synt-vedtakshistorikk-service/build.gradle b/apps/synt-vedtakshistorikk-service/build.gradle index 18a6d2776a5..1cc0aa03dd3 100644 --- a/apps/synt-vedtakshistorikk-service/build.gradle +++ b/apps/synt-vedtakshistorikk-service/build.gradle @@ -1,48 +1,11 @@ plugins { - id 'java' - id "org.sonarqube" version "5.0.0.4638" - id 'org.springframework.boot' version "3.2.6" - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" -} - -test { - useJUnitPlatform() + id "dolly-apps" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnav-synt-vedtakshistorikk-service" property "sonar.projectName", "testnav-synt-vedtakshistorikk-service" - property "sonar.sourceEncoding", "UTF-8" - } -} - -bootJar { - archiveFileName = "app.jar" -} -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1' - } -} - -repositories { - mavenCentral() - mavenLocal() -} - -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) } } @@ -54,27 +17,14 @@ dependencies { implementation 'no.nav.testnav.libs:security-core' implementation 'no.nav.testnav.libs:data-transfer-objects' - implementation 'org.springframework.boot:spring-boot-starter-webflux' implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'org.springframework.boot:spring-boot-starter-oauth2-client' implementation 'org.springframework.boot:spring-boot-starter-security' - - implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' + implementation "org.springdoc:springdoc-openapi-starter-webmvc-ui:$versions.springdoc" - implementation 'io.micrometer:micrometer-registry-prometheus' + implementation "com.google.guava:guava:$versions.guava" - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.3.0' - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' - implementation 'org.hibernate.validator:hibernate-validator' - - implementation 'com.google.guava:guava:33.2.0-jre' - - testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' testImplementation 'junit:junit:4.13.2' //TODO upgrade to JUnit5 - - implementation 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' } diff --git a/apps/synt-vedtakshistorikk-service/settings.gradle b/apps/synt-vedtakshistorikk-service/settings.gradle index f2760d46c25..26c841f5cbd 100644 --- a/apps/synt-vedtakshistorikk-service/settings.gradle +++ b/apps/synt-vedtakshistorikk-service/settings.gradle @@ -4,13 +4,14 @@ plugins { rootProject.name = 'synt-vedtakshistorikk-service' +includeBuild "../../plugins/java" -includeBuild '../../libs/servlet-core' -includeBuild '../../libs/servlet-security' -includeBuild '../../libs/servlet-insecure-security' +includeBuild '../../libs/data-transfer-objects' includeBuild '../../libs/domain' includeBuild '../../libs/security-core' -includeBuild '../../libs/data-transfer-objects' +includeBuild '../../libs/servlet-core' +includeBuild '../../libs/servlet-insecure-security' +includeBuild '../../libs/servlet-security' develocity { buildScan { diff --git a/apps/tenor-search-service/build.gradle b/apps/tenor-search-service/build.gradle index 434768f421d..ea1398e40d3 100644 --- a/apps/tenor-search-service/build.gradle +++ b/apps/tenor-search-service/build.gradle @@ -1,72 +1,24 @@ plugins { - id 'java' - id "org.sonarqube" version "5.0.0.4638" - id 'org.springframework.boot' version "3.2.6" - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" -} - -test { - useJUnitPlatform() + id "dolly-apps" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.login", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnav-tenor-search-service" property "sonar.projectName", "testnav-tenor-search-service" - property "sonar.sourceEncoding", "UTF-8" - } -} - -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } -} - -bootJar { - archiveFileName = "app.jar" -} -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1' } } -repositories { - mavenCentral() - mavenLocal() -} - dependencies { implementation 'no.nav.testnav.libs:reactive-core' implementation 'no.nav.testnav.libs:reactive-security' implementation 'no.nav.testnav.libs:security-core' implementation 'no.nav.testnav.libs:data-transfer-objects' - implementation 'org.springframework.boot:spring-boot-starter-webflux' implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server' - implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' + implementation "org.springdoc:springdoc-openapi-starter-webflux-ui:$versions.springdoc" - implementation 'io.micrometer:micrometer-registry-prometheus' - - implementation 'org.springdoc:springdoc-openapi-starter-webflux-ui:2.5.0' - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' - - testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' testImplementation 'no.nav.testnav.libs:integration-test' - - implementation 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' } diff --git a/apps/tenor-search-service/config.yml b/apps/tenor-search-service/config.yml index 2eb29f3038e..4664354954f 100644 --- a/apps/tenor-search-service/config.yml +++ b/apps/tenor-search-service/config.yml @@ -29,6 +29,7 @@ spec: - application: dolly-idporten - application: team-dolly-lokal-app - application: testnav-oversikt-frontend + - application: testnav-levende-arbeidsforhold-ansettelse outbound: rules: - application: dolly-backend @@ -62,4 +63,4 @@ spec: - "https://testnav-tenor-search-service.intern.dev.nav.no" env: - name: SPRING_PROFILES_ACTIVE - value: prod \ No newline at end of file + value: prod diff --git a/apps/tenor-search-service/settings.gradle b/apps/tenor-search-service/settings.gradle index 3a378b442ac..39bbdfb050c 100644 --- a/apps/tenor-search-service/settings.gradle +++ b/apps/tenor-search-service/settings.gradle @@ -4,11 +4,13 @@ plugins { rootProject.name = 'tenor-search-service' +includeBuild "../../plugins/java" + +includeBuild '../../libs/data-transfer-objects' +includeBuild '../../libs/integration-test' includeBuild '../../libs/reactive-core' includeBuild '../../libs/reactive-security' includeBuild '../../libs/security-core' -includeBuild '../../libs/data-transfer-objects' -includeBuild '../../libs/integration-test' develocity { buildScan { diff --git a/apps/testnav-ident-pool/build.gradle b/apps/testnav-ident-pool/build.gradle index bcf2dd726f8..0bb3e37d932 100644 --- a/apps/testnav-ident-pool/build.gradle +++ b/apps/testnav-ident-pool/build.gradle @@ -1,39 +1,11 @@ plugins { - id 'java' - id "org.sonarqube" version "5.0.0.4638" - id 'org.springframework.boot' version "3.2.6" - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" -} - -test { - useJUnitPlatform() - jvmArgs '--add-opens', 'java.base/java.lang=ALL-UNNAMED' + id "dolly-apps" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnav-ident-pool" property "sonar.projectName", "testnav-ident-pool" - property "sonar.sourceEncoding", "UTF-8" - } -} - -bootJar { - archiveFileName = "app.jar" -} - -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1' } } @@ -41,29 +13,6 @@ properties { compileJava.options.encoding = 'UTF-8' } -bootJar { - archiveFileName = "app.jar" -} - -repositories { - mavenCentral() - mavenLocal() - maven { - name = "GitHubPackages" - url = uri('https://maven.pkg.github.com/navikt/maven-release') - credentials(PasswordCredentials) { - password System.getenv("NAV_TOKEN") - username 'token' - } - } -} - -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } -} - dependencies { implementation 'no.nav.testnav.libs:security-core' implementation 'no.nav.testnav.libs:servlet-core' @@ -71,39 +20,29 @@ dependencies { implementation 'no.nav.testnav.libs:servlet-insecure-security' implementation 'no.nav.testnav.libs:database' - implementation 'org.springframework.boot:spring-boot-starter-actuator' implementation 'org.springframework.boot:spring-boot-starter-web' - implementation 'org.springframework.boot:spring-boot-starter-webflux' implementation 'org.springframework.boot:spring-boot-starter-data-jpa' implementation 'org.springframework.boot:spring-boot-starter-security' implementation 'org.springframework.security:spring-security-oauth2-jose' implementation 'org.springframework.boot:spring-boot-starter-validation' - implementation 'org.springframework.boot:spring-boot-configuration-processor' - implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' implementation 'org.springframework.cloud:spring-cloud-vault-config-databases' implementation 'org.springframework.cloud:spring-cloud-starter-bootstrap' // TODO remove legacy bootstrap config implementation 'org.springframework.retry:spring-retry' - implementation 'org.aspectj:aspectjweaver' - implementation 'io.micrometer:micrometer-registry-prometheus' + implementation "org.aspectj:aspectjweaver:$versions.jweaver" implementation 'com.h2database:h2' implementation 'org.flywaydb:flyway-core' implementation 'org.postgresql:postgresql' - implementation 'ma.glasnost.orika:orika-core:1.5.4' + implementation "ma.glasnost.orika:orika-core:$versions.orika" - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.3.0' - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' + implementation "org.springdoc:springdoc-openapi-starter-webmvc-ui:$versions.springdoc" testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' - testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.security:spring-security-test' testImplementation 'no.nav.testnav.libs:testing' - - implementation 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' } description = 'testnav-ident-pool' diff --git a/apps/testnav-ident-pool/settings.gradle b/apps/testnav-ident-pool/settings.gradle index 9ac11a4b4d1..3e7b8c08fd6 100644 --- a/apps/testnav-ident-pool/settings.gradle +++ b/apps/testnav-ident-pool/settings.gradle @@ -4,14 +4,15 @@ plugins { rootProject.name = 'testnav-ident-pool' -includeBuild '../../libs/security-core' +includeBuild "../../plugins/java" + includeBuild '../../libs/database' +includeBuild '../../libs/security-core' includeBuild '../../libs/servlet-core' -includeBuild '../../libs/servlet-security' includeBuild '../../libs/servlet-insecure-security' +includeBuild '../../libs/servlet-security' includeBuild '../../libs/testing' - develocity { buildScan { termsOfUseUrl = "https://gradle.com/terms-of-service" diff --git a/apps/testnorge-statisk-data-forvalter/build.gradle b/apps/testnorge-statisk-data-forvalter/build.gradle index e46776446da..6dd8cd066e7 100644 --- a/apps/testnorge-statisk-data-forvalter/build.gradle +++ b/apps/testnorge-statisk-data-forvalter/build.gradle @@ -1,52 +1,16 @@ plugins { - id 'java' - id "org.sonarqube" version "5.0.0.4638" - id 'org.springframework.boot' version "3.2.6" - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" -} - -test { - useJUnitPlatform() + id "dolly-apps" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnorge-statisk-data-forvalter" property "sonar.projectName", "testnorge-statisk-data-forvalter" - property "sonar.sourceEncoding", "UTF-8" - } -} - -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1' - } -} - -bootJar { - archiveFileName = "app.jar" -} - -repositories { - mavenCentral() - mavenLocal() - - maven { - url = uri('https://packages.confluent.io/maven/') } } dependencies { - implementation 'com.google.guava:guava:33.2.0-jre' + implementation "com.google.guava:guava:$versions.guava" implementation 'no.nav.testnav.libs:security-core' implementation 'no.nav.testnav.libs:servlet-security' @@ -60,48 +24,33 @@ dependencies { implementation 'no.nav.testnav.libs:csv-converter' implementation 'org.springframework.kafka:spring-kafka' - implementation 'io.confluent:kafka-avro-serializer:7.5.1' + implementation "io.confluent:kafka-avro-serializer:$versions.avro" implementation 'org.springframework.boot:spring-boot-starter-data-jpa' implementation 'org.springframework.boot:spring-boot-starter-web' - implementation 'org.springframework.boot:spring-boot-starter-actuator' implementation 'org.springframework.boot:spring-boot-starter-security' - implementation 'org.springframework.boot:spring-boot-starter-webflux' implementation 'org.springframework.cloud:spring-cloud-starter-bootstrap' // TODO remove legacy bootstrap config implementation 'org.springframework.cloud:spring-cloud-vault-config-databases' - - implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' + implementation 'org.springframework.boot:spring-boot-starter-oauth2-client' - implementation 'org.aspectj:aspectjweaver:1.9.22' - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' + implementation "org.aspectj:aspectjweaver:$versions.jweaver" implementation 'org.postgresql:postgresql' implementation 'com.zaxxer:HikariCP' implementation 'org.flywaydb:flyway-core' implementation 'com.h2database:h2' - implementation 'org.hibernate.validator:hibernate-validator' implementation 'org.apache.httpcomponents.client5:httpclient5:5.3.1' - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.3.0' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.21' - implementation 'com.squareup.okhttp3:okhttp:4.9.3' - - implementation 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' + implementation "org.springdoc:springdoc-openapi-starter-webmvc-ui:$versions.springdoc" + implementation "io.swagger.core.v3:swagger-annotations-jakarta:$versions.swagger" + implementation "com.squareup.okhttp3:okhttp:$versions.okhttp" testImplementation 'no.nav.testnav.libs:testing' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' - testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.security:spring-security-test' - testImplementation 'com.squareup.okhttp3:mockwebserver:4.9.3' + testImplementation "com.squareup.okhttp3:mockwebserver:$versions.okhttp" } description = 'testnorge-statisk-data-forvalter' -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } -} diff --git a/apps/testnorge-statisk-data-forvalter/settings.gradle b/apps/testnorge-statisk-data-forvalter/settings.gradle index cb0d8c6d113..1acf1847522 100644 --- a/apps/testnorge-statisk-data-forvalter/settings.gradle +++ b/apps/testnorge-statisk-data-forvalter/settings.gradle @@ -4,17 +4,18 @@ plugins { rootProject.name = 'testnorge-statisk-data-forvalter' +includeBuild "../../plugins/java" -includeBuild '../../libs/security-core' -includeBuild '../../libs/servlet-security' -includeBuild '../../libs/kafka-config' -includeBuild '../../libs/kafka-producers' includeBuild '../../libs/avro-schema' -includeBuild '../../libs/data-transfer-objects' -includeBuild '../../libs/servlet-core' -includeBuild '../../libs/database' includeBuild '../../libs/commands' includeBuild '../../libs/csv-converter' +includeBuild '../../libs/data-transfer-objects' +includeBuild '../../libs/database' +includeBuild '../../libs/kafka-config' +includeBuild '../../libs/kafka-producers' +includeBuild '../../libs/security-core' +includeBuild '../../libs/servlet-core' +includeBuild '../../libs/servlet-security' includeBuild '../../libs/testing' develocity { diff --git a/apps/tilbakemelding-api/build.gradle b/apps/tilbakemelding-api/build.gradle index 96522c96b3e..cbb640e8bfe 100644 --- a/apps/tilbakemelding-api/build.gradle +++ b/apps/tilbakemelding-api/build.gradle @@ -1,45 +1,14 @@ plugins { - id 'java' - id "org.sonarqube" version "5.0.0.4638" - id 'org.springframework.boot' version "3.2.6" - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" -} - -test { - useJUnitPlatform() + id "dolly-apps" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnorge-tilbakemelding-api" property "sonar.projectName", "testnorge-tilbakemelding-api" - property "sonar.sourceEncoding", "UTF-8" - } -} -bootJar { - archiveFileName = "app.jar" -} - -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1' } } -repositories { - mavenCentral() - mavenLocal() -} - dependencies { implementation 'no.nav.testnav.libs:reactive-core' @@ -50,34 +19,16 @@ dependencies { implementation 'no.nav.testnav.libs:data-transfer-objects' - implementation 'org.springframework.boot:spring-boot-starter-webflux' implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server' implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'org.springframework.boot:spring-boot-starter-security' - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.3.0' + implementation "org.springdoc:springdoc-openapi-starter-webmvc-ui:$versions.springdoc" - implementation 'org.hibernate.validator:hibernate-validator' - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' implementation 'org.springframework.cloud:spring-cloud-starter-bootstrap' // TODO remove legacy bootstrap config - - implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' - implementation 'org.springframework.boot:spring-boot-starter-actuator' - - implementation 'io.micrometer:micrometer-registry-prometheus' implementation 'org.reactivestreams:reactive-streams:1.0.4' - implementation 'org.projectreactor:reactor-spring:1.0.1.RELEASE' + implementation "org.projectreactor:reactor-spring:$versions.reactorSpring" - testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' - - implementation 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' -} -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } } diff --git a/apps/tilbakemelding-api/settings.gradle b/apps/tilbakemelding-api/settings.gradle index bd17a86d3fb..ff9d177fc6e 100644 --- a/apps/tilbakemelding-api/settings.gradle +++ b/apps/tilbakemelding-api/settings.gradle @@ -4,6 +4,8 @@ plugins { rootProject.name = 'tilbakemelding-api' +includeBuild "../../plugins/java" + includeBuild '../../libs/data-transfer-objects' includeBuild '../../libs/reactive-core' includeBuild '../../libs/security-core' diff --git a/apps/tps-messaging-service/build.gradle b/apps/tps-messaging-service/build.gradle index 3f03080c01f..f6c23a4d1d4 100644 --- a/apps/tps-messaging-service/build.gradle +++ b/apps/tps-messaging-service/build.gradle @@ -1,64 +1,11 @@ plugins { - id 'java' - id "org.sonarqube" version "5.0.0.4638" - id 'org.springframework.boot' version "3.2.6" - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" - id("org.openrewrite.rewrite") version("6.6.4") -} - -test { - useJUnitPlatform() - jvmArgs '--add-opens', 'java.base/java.lang=ALL-UNNAMED' -} - -rewrite { - activeRecipe("org.openrewrite.java.spring.boot3.UpgradeSpringBoot_3_2") + id "dolly-apps" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "tps-messaging-service" property "sonar.projectName", "tps-messaging-service" - property "sonar.sourceEncoding", "UTF-8" - } -} - -bootJar { - duplicatesStrategy(DuplicatesStrategy.INCLUDE) - archiveFileName = "app.jar" -} - -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1' - } -} - -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } -} - -repositories { - mavenLocal() - mavenCentral() - maven { - name = "GitHubPackages" - url = uri('https://maven.pkg.github.com/navikt/maven-release') - credentials(PasswordCredentials) { - password System.getenv("NAV_TOKEN") - username 'token' - } } } @@ -68,7 +15,6 @@ configurations.implementation { } dependencies { - rewrite('org.openrewrite.recipe:rewrite-spring:5.10.0') implementation 'no.nav.testnav.libs:security-core' implementation 'no.nav.testnav.libs:servlet-core' implementation 'no.nav.testnav.libs:servlet-security' @@ -76,40 +22,26 @@ dependencies { implementation 'org.springframework.boot:spring-boot-starter-security' implementation 'org.springframework.boot:spring-boot-starter-web' - implementation 'org.springframework.boot:spring-boot-starter-webflux' implementation 'io.netty:netty-transport-native-epoll' // See above exclusion. implementation 'org.springframework.boot:spring-boot-starter-oauth2-client' implementation 'org.springframework.cloud:spring-cloud-starter-bootstrap' implementation 'com.fasterxml.jackson.core:jackson-annotations' implementation 'com.fasterxml.jackson.core:jackson-databind' - implementation 'com.ibm.mq:mq-jms-spring-boot-starter:3.2.3' + implementation "com.ibm.mq:mq-jms-spring-boot-starter:$versions.mq" implementation 'com.ibm.icu:icu4j:74.2' - implementation 'jakarta.xml.bind:jakarta.xml.bind-api' - implementation 'com.sun.xml.bind:jaxb-core' - implementation 'org.glassfish.jaxb:jaxb-runtime' + implementation "jakarta.xml.bind:jakarta.xml.bind-api:$versions.jakartaXmlBindApi" + implementation "com.sun.xml.bind:jaxb-core:$versions.jaxb" + implementation "org.glassfish.jaxb:jaxb-runtime:$versions.jaxb" implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-xml' - implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' - - implementation 'no.nav.repository.fellesreg.tpsws:nav-repository-fellesregister-jaxb-tps-s610-domain:2020.08.27-09.53-183ead3d81eb' - implementation 'no.nav.repository.fellesreg.tpsws:nav-repository-fellesregister-jaxb-tps-m201-domain:2020.08.27-09.53-183ead3d81eb' - implementation 'no.nav.repository.fellesreg.tpsws:nav-repository-fellesregister-castor-tps-s018-domain:2020.08.27-09.53-183ead3d81eb' - - implementation 'io.micrometer:micrometer-registry-prometheus' - implementation 'ma.glasnost.orika:orika-core:1.5.4' - implementation 'org.hibernate.validator:hibernate-validator' - implementation 'org.aspectj:aspectjweaver:1.9.22' - - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.3.0' - - testImplementation 'org.springframework.boot:spring-boot-starter-test' + implementation "no.nav.repository.fellesreg.tpsws:nav-repository-fellesregister-jaxb-tps-s610-domain:$versions.navFellesregister" + implementation "no.nav.repository.fellesreg.tpsws:nav-repository-fellesregister-jaxb-tps-m201-domain:$versions.navFellesregister" + implementation "no.nav.repository.fellesreg.tpsws:nav-repository-fellesregister-castor-tps-s018-domain:$versions.navFellesregister" - implementation 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' + implementation "ma.glasnost.orika:orika-core:$versions.orika" + implementation "org.aspectj:aspectjweaver:$versions.jweaver" - testImplementation 'org.junit.jupiter:junit-jupiter:5.10.2' + implementation "org.springdoc:springdoc-openapi-starter-webmvc-ui:$versions.springdoc" } \ No newline at end of file diff --git a/apps/tps-messaging-service/settings.gradle b/apps/tps-messaging-service/settings.gradle index db135da9e41..4eef351ae4e 100644 --- a/apps/tps-messaging-service/settings.gradle +++ b/apps/tps-messaging-service/settings.gradle @@ -4,11 +4,12 @@ plugins { rootProject.name = 'tps-messaging-service' +includeBuild "../../plugins/java" + +includeBuild '../../libs/data-transfer-search-objects' includeBuild '../../libs/security-core' includeBuild '../../libs/servlet-core' includeBuild '../../libs/servlet-security' -includeBuild '../../libs/data-transfer-search-objects' - develocity { buildScan { diff --git a/apps/udi-stub/build.gradle b/apps/udi-stub/build.gradle index f821bc5598d..b9afdb2c571 100644 --- a/apps/udi-stub/build.gradle +++ b/apps/udi-stub/build.gradle @@ -1,41 +1,13 @@ plugins { - id "org.sonarqube" version "5.0.0.4638" - id 'java' - id "uk.co.boothen.gradle.wsimport" version "0.21" - id 'org.springframework.boot' version "3.2.6" - id 'io.spring.dependency-management' version "1.1.5" - id("org.openrewrite.rewrite") version("6.6.4") - id "jacoco" -} + id "dolly-apps" -test { - useJUnitPlatform() - jvmArgs '--add-opens', 'java.base/java.lang=ALL-UNNAMED' -} - -rewrite { - activeRecipe("org.openrewrite.java.spring.boot3.UpgradeSpringBoot_3_2") + id "uk.co.boothen.gradle.wsimport" version "0.21" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "udi-stub" property "sonar.projectName", "udi-stub" - property "sonar.sourceEncoding", "UTF-8" - } -} - -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1' } } @@ -48,74 +20,38 @@ configurations { jaxb } -bootJar { - duplicatesStrategy(DuplicatesStrategy.INCLUDE) - archiveFileName = "app.jar" -} - -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } -} - -repositories { - mavenCentral() - mavenLocal() - maven { - name = "GitHubPackages" - url = uri('https://maven.pkg.github.com/navikt/maven-release') - credentials(PasswordCredentials) { - password System.getenv("NAV_TOKEN") - username 'token' - } - } -} dependencies { - - rewrite('org.openrewrite.recipe:rewrite-spring:5.10.0') - implementation platform('org.testcontainers:testcontainers-bom:1.19.8') - implementation "com.sun.xml.ws:jaxws-rt:4.0.2" + implementation "com.sun.xml.ws:jaxws-rt:$versions.jaxws" implementation 'no.nav.testnav.libs:servlet-core' implementation 'no.nav.testnav.libs:servlet-security' implementation 'no.nav.testnav.libs:database' - implementation 'org.springframework.boot:spring-boot-starter-webflux' implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'org.springframework.boot:spring-boot-starter-security' implementation 'org.springframework.boot:spring-boot-starter-oauth2-client' implementation 'org.springframework.boot:spring-boot-starter-data-jpa' - implementation 'org.springframework.boot:spring-boot-configuration-processor' implementation 'org.springframework.boot:spring-boot-starter-web-services' implementation 'org.springframework.ws:spring-ws-security' jaxb 'org.glassfish.jaxb:jaxb-xjc' implementation 'wsdl4j:wsdl4j' implementation 'org.springframework.cloud:spring-cloud-vault-config-databases' - implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' implementation 'org.postgresql:postgresql' implementation 'org.flywaydb:flyway-core' implementation 'com.zaxxer:HikariCP' - implementation 'ma.glasnost.orika:orika-core:1.5.4' + implementation "ma.glasnost.orika:orika-core:$versions.orika" - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.3.0' - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' - implementation 'org.hibernate.validator:hibernate-validator' + implementation "org.springdoc:springdoc-openapi-starter-webmvc-ui:$versions.springdoc" testImplementation 'com.h2database:h2' - testImplementation 'org.junit.jupiter:junit-jupiter:5.10.2' testImplementation 'org.testcontainers:junit-jupiter' testImplementation 'org.testcontainers:postgresql' - testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' //TODO upgrade to JUnit5 testImplementation 'org.mockito:mockito-junit-jupiter:5.12.0' - implementation 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' } diff --git a/apps/udi-stub/settings.gradle b/apps/udi-stub/settings.gradle index 4aa740b5b88..8eabd549fb1 100644 --- a/apps/udi-stub/settings.gradle +++ b/apps/udi-stub/settings.gradle @@ -4,10 +4,12 @@ plugins { rootProject.name = 'udi-stub' -includeBuild '../../libs/servlet-core' -includeBuild '../../libs/servlet-security' +includeBuild "../../plugins/java" + includeBuild '../../libs/data-transfer-objects' includeBuild '../../libs/database' +includeBuild '../../libs/servlet-core' +includeBuild '../../libs/servlet-security' develocity { buildScan { diff --git a/apps/varslinger-service/build.gradle b/apps/varslinger-service/build.gradle index b78e4c2bbdf..1735ab74ece 100644 --- a/apps/varslinger-service/build.gradle +++ b/apps/varslinger-service/build.gradle @@ -1,51 +1,17 @@ plugins { - id 'java' - id "org.sonarqube" version "5.0.0.4638" - id 'org.springframework.boot' version "3.2.6" - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" -} - -test { - useJUnitPlatform() + id "dolly-apps" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnav-varslinger-service" property "sonar.projectName", "testnav-varslinger-service" - property "sonar.sourceEncoding", "UTF-8" - } -} -bootJar { - archiveFileName = "app.jar" -} - -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1' - } -} - -repositories { - mavenCentral() - mavenLocal() - maven { - url = uri('https://packages.confluent.io/maven/') } } dependencies { - implementation 'com.google.guava:guava:33.2.0-jre' + implementation "com.google.guava:guava:$versions.guava" implementation 'no.nav.testnav.libs:security-core' implementation 'no.nav.testnav.libs:servlet-core' implementation 'no.nav.testnav.libs:database' @@ -53,7 +19,6 @@ dependencies { implementation 'no.nav.testnav.libs:servlet-security' implementation 'org.springframework.cloud:spring-cloud-starter-bootstrap' // TODO remove legacy bootstrap config - implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' implementation 'org.springframework.cloud:spring-cloud-vault-config-databases' @@ -61,32 +26,15 @@ dependencies { implementation 'org.springframework.boot:spring-boot-starter-data-jpa' implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server' implementation 'org.springframework.boot:spring-boot-starter-web' - implementation 'org.springframework.boot:spring-boot-starter-webflux' - implementation 'org.springframework.boot:spring-boot-starter-actuator' - - implementation 'io.micrometer:micrometer-registry-prometheus' - - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.3.0' - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' - implementation 'org.hibernate.validator:hibernate-validator' + implementation "org.springdoc:springdoc-openapi-starter-webmvc-ui:$versions.springdoc" implementation 'com.h2database:h2' implementation 'com.zaxxer:HikariCP' implementation 'org.flywaydb:flyway-core' implementation 'org.postgresql:postgresql' - implementation 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' - - testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' } description = 'varslinger-service' -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } -} diff --git a/apps/varslinger-service/settings.gradle b/apps/varslinger-service/settings.gradle index 8dd27df6ad2..4f583e6c517 100644 --- a/apps/varslinger-service/settings.gradle +++ b/apps/varslinger-service/settings.gradle @@ -4,10 +4,12 @@ plugins { rootProject.name = 'varslinger-service' -includeBuild '../../libs/servlet-core' -includeBuild '../../libs/security-core' -includeBuild '../../libs/database' +includeBuild "../../plugins/java" + includeBuild '../../libs/data-transfer-objects' +includeBuild '../../libs/database' +includeBuild '../../libs/security-core' +includeBuild '../../libs/servlet-core' includeBuild '../../libs/servlet-security' develocity { diff --git a/examples/reactive-rest-example/build.gradle b/examples/reactive-rest-example/build.gradle index a798212b517..27ed8451880 100644 --- a/examples/reactive-rest-example/build.gradle +++ b/examples/reactive-rest-example/build.gradle @@ -1,45 +1,14 @@ plugins { - id 'java' - id "org.sonarqube" version "5.0.0.4638" - id 'org.springframework.boot' version "3.2.6" - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" -} - -test { - useJUnitPlatform() + id "dolly-apps" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnav-reactive-rest-example" property "sonar.projectName", "testnav-reactive-rest-example" - property "sonar.sourceEncoding", "UTF-8" - } -} - -bootJar { - archiveFileName = "app.jar" -} -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1' } } -repositories { - mavenCentral() - mavenLocal() -} - dependencies { implementation 'no.nav.testnav.libs:reactive-core' implementation 'no.nav.testnav.libs:reactive-security' @@ -59,16 +28,7 @@ dependencies { runtimeOnly 'org.postgresql:postgresql' runtimeOnly 'com.h2database:h2' - implementation 'org.springdoc:springdoc-openapi-starter-webflux-ui:2.5.0' - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' + implementation "org.springdoc:springdoc-openapi-starter-webflux-ui:$versions.springdoc" + implementation "net.logstash.logback:logstash-logback-encoder:$versions.logback" implementation 'org.hibernate.validator:hibernate-validator' - - implementation 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' -} -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } } diff --git a/examples/reactive-rest-example/settings.gradle b/examples/reactive-rest-example/settings.gradle index ae015c2baee..4b0053dd8f8 100644 --- a/examples/reactive-rest-example/settings.gradle +++ b/examples/reactive-rest-example/settings.gradle @@ -4,6 +4,7 @@ plugins { rootProject.name = 'reactive-rest-example' +includeBuild "../../plugins/java" includeBuild '../../libs/reactive-core' includeBuild '../../libs/reactive-security' diff --git a/libs/avro-schema/build.gradle b/libs/avro-schema/build.gradle index 17e85c91f90..09e3817af9a 100644 --- a/libs/avro-schema/build.gradle +++ b/libs/avro-schema/build.gradle @@ -1,50 +1,15 @@ plugins { - id "org.sonarqube" version "5.0.0.4638" - id 'java-library' - id 'maven-publish' + id "dolly-libs" + id "dolly-libs-publish" + id 'com.github.davidmc24.gradle.plugin.avro' version '1.9.1' } -group = 'no.nav.testnav.libs' - sonarqube { skipProject = true } -repositories { - mavenCentral() - mavenLocal() -} - -if (project.hasProperty("releaseVersion")) { - version = releaseVersion -} - -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } -} - -publishing { - repositories { - maven { - name = "github" - url = uri('https://maven.pkg.github.com/navikt/testnorge') - credentials(PasswordCredentials) { - username = System.getenv("GITHUB_ACTOR") - password = System.getenv("GITHUB_TOKEN") - } - } - } - publications { - gpr(MavenPublication) { - from(components.java) - } - } -} - dependencies { - implementation 'org.apache.avro:avro-compiler:1.11.3' - implementation 'org.apache.avro:avro-maven-plugin:1.11.3' + implementation "org.apache.avro:avro-compiler:$versions.apacheAvro" + implementation "org.apache.avro:avro-maven-plugin:$versions.apacheAvro" } \ No newline at end of file diff --git a/libs/avro-schema/settings.gradle b/libs/avro-schema/settings.gradle index aa4f4f9140f..a26d0793ec1 100644 --- a/libs/avro-schema/settings.gradle +++ b/libs/avro-schema/settings.gradle @@ -4,6 +4,7 @@ plugins { rootProject.name = 'avro-schema' +includeBuild "../../plugins/java" develocity { buildScan { diff --git a/libs/commands/build.gradle b/libs/commands/build.gradle index dd3d2127ac8..7ebfac2c873 100644 --- a/libs/commands/build.gradle +++ b/libs/commands/build.gradle @@ -1,50 +1,15 @@ plugins { - id "org.sonarqube" version "5.0.0.4638" - id 'java-library' - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" + id "dolly-libs" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnav-commands" property "sonar.projectName", "testnav-commands" - property "sonar.sourceEncoding", "UTF-8" - } -} - -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.boot:spring-boot-dependencies:3.2.1' - } -} - -group = 'no.nav.testnav.libs' - -repositories { - mavenCentral() - mavenLocal() -} - -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) } } dependencies { implementation "no.nav.testnav.libs:data-transfer-objects" implementation 'org.springframework.boot:spring-boot-starter-webflux' - - implementation 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' } diff --git a/libs/commands/settings.gradle b/libs/commands/settings.gradle index de45dffd1d7..55bac8531e8 100644 --- a/libs/commands/settings.gradle +++ b/libs/commands/settings.gradle @@ -4,6 +4,8 @@ plugins { rootProject.name = 'commands' +includeBuild "../../plugins/java" + includeBuild '../data-transfer-objects' develocity { diff --git a/libs/csv-converter/build.gradle b/libs/csv-converter/build.gradle index 6d30d766506..60118785d45 100644 --- a/libs/csv-converter/build.gradle +++ b/libs/csv-converter/build.gradle @@ -1,49 +1,14 @@ plugins { - id "org.sonarqube" version "5.0.0.4638" - id 'java-library' - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" + id "dolly-libs" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnav-csv-converter" property "sonar.projectName", "testnav-csv-converter" - property "sonar.sourceEncoding", "UTF-8" - } -} - -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.boot:spring-boot-dependencies:3.2.1' - } -} - -group = 'no.nav.testnav.libs' - -repositories { - mavenCentral() - mavenLocal() -} - -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) } } dependencies { implementation 'org.apache.commons:commons-csv:1.10.0' - - implementation 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' } \ No newline at end of file diff --git a/libs/csv-converter/settings.gradle b/libs/csv-converter/settings.gradle index 8d2def7c322..4a36f6b4364 100644 --- a/libs/csv-converter/settings.gradle +++ b/libs/csv-converter/settings.gradle @@ -4,6 +4,7 @@ plugins { rootProject.name = 'csv-converter' +includeBuild "../../plugins/java" develocity { buildScan { diff --git a/libs/data-transfer-objects/build.gradle b/libs/data-transfer-objects/build.gradle index 402f61a77d7..108ee4d21e2 100644 --- a/libs/data-transfer-objects/build.gradle +++ b/libs/data-transfer-objects/build.gradle @@ -1,92 +1,27 @@ plugins { - id "org.sonarqube" version "5.0.0.4638" - id 'java-library' - id 'maven-publish' - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" + id "dolly-libs" + id "dolly-libs-publish" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnav-data-transfer-objects" property "sonar.projectName", "testnav-data-transfer-objects" - property "sonar.sourceEncoding", "UTF-8" } } -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.boot:spring-boot-dependencies:3.2.1' - } -} - -group = 'no.nav.testnav.libs' - -repositories { - mavenCentral() - maven { - name = "GitHubPackages" - url = uri('https://maven.pkg.github.com/navikt/maven-release') - credentials(PasswordCredentials) { - password System.getenv("NAV_TOKEN") - username 'token' - } - } - mavenLocal() -} - dependencies { implementation 'com.fasterxml.jackson.core:jackson-annotations' implementation 'com.fasterxml.jackson.core:jackson-databind' implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-xml' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.21' - implementation 'jakarta.validation:jakarta.validation-api' - implementation 'jakarta.xml.bind:jakarta.xml.bind-api' + implementation "io.swagger.core.v3:swagger-annotations-jakarta:$versions.swagger" + implementation "jakarta.validation:jakarta.validation-api:$versions.jakartaValidation" + implementation "jakarta.xml.bind:jakarta.xml.bind-api:$versions.jakartaXmlBindApi" implementation 'javax.xml.bind:jaxb-api:2.4.0-b180830.0359' implementation 'org.apache.commons:commons-lang3' implementation 'org.springframework:spring-web' - implementation 'no.nav.tjenestespesifikasjoner:nav-altinn-inntektsmelding:1.2019.08.16-13.46-35cbdfd492d4' - - implementation 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' -} - -if (project.hasProperty("releaseVersion")) { - version = releaseVersion -} - -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } -} - -publishing { - repositories { - maven { - name = "github" - url = uri('https://maven.pkg.github.com/navikt/testnorge') - credentials(PasswordCredentials) { - username = System.getenv("GITHUB_ACTOR") - password = System.getenv("GITHUB_TOKEN") - } - } - } - publications { - gpr(MavenPublication) { - from(components.java) - } - } + implementation "no.nav.tjenestespesifikasjoner:nav-altinn-inntektsmelding:$versions.navAltinnInntektsmelding" } tasks.withType(JavaCompile) { diff --git a/libs/data-transfer-objects/settings.gradle b/libs/data-transfer-objects/settings.gradle index edc5eea9c79..bf0c2aedf48 100644 --- a/libs/data-transfer-objects/settings.gradle +++ b/libs/data-transfer-objects/settings.gradle @@ -4,6 +4,7 @@ plugins { rootProject.name = 'data-transfer-objects' +includeBuild "../../plugins/java" develocity { buildScan { diff --git a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/skattekortservice/v1/Arbeidsgiver.java b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/skattekortservice/v1/ArbeidsgiverSkatt.java similarity index 94% rename from libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/skattekortservice/v1/Arbeidsgiver.java rename to libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/skattekortservice/v1/ArbeidsgiverSkatt.java index 24de5895b0f..2aa7c31153c 100644 --- a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/skattekortservice/v1/Arbeidsgiver.java +++ b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/skattekortservice/v1/ArbeidsgiverSkatt.java @@ -14,7 +14,7 @@ @Builder @NoArgsConstructor @AllArgsConstructor -public class Arbeidsgiver { +public class ArbeidsgiverSkatt { private IdentifikatorForEnhetEllerPerson arbeidsgiveridentifikator; private List arbeidstaker; diff --git a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/skattekortservice/v1/SkattekortRequestDTO.java b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/skattekortservice/v1/SkattekortRequestDTO.java index 0aa629dd051..c11c69b16e3 100644 --- a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/skattekortservice/v1/SkattekortRequestDTO.java +++ b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/skattekortservice/v1/SkattekortRequestDTO.java @@ -16,9 +16,9 @@ @AllArgsConstructor public class SkattekortRequestDTO { - private List arbeidsgiver; + private List arbeidsgiver; - public List getArbeidsgiver() { + public List getArbeidsgiver() { if (isNull(arbeidsgiver)) { arbeidsgiver = new ArrayList<>(); diff --git a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/skattekortservice/v1/SkattekortResponseDTO.java b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/skattekortservice/v1/SkattekortResponseDTO.java index e0a95fe06c9..53228268f21 100644 --- a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/skattekortservice/v1/SkattekortResponseDTO.java +++ b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/skattekortservice/v1/SkattekortResponseDTO.java @@ -18,10 +18,10 @@ public class SkattekortResponseDTO { private String ident; private String inntektsaar; - private List arbeidsgiver; + private List arbeidsgiver; private String skattekortXml; - public List getArbeidsgiver() { + public List getArbeidsgiver() { if (isNull(arbeidsgiver)) { arbeidsgiver = new ArrayList<>(); diff --git a/libs/data-transfer-search-objects/build.gradle b/libs/data-transfer-search-objects/build.gradle index bccd8a03396..0ed6e488199 100644 --- a/libs/data-transfer-search-objects/build.gradle +++ b/libs/data-transfer-search-objects/build.gradle @@ -1,92 +1,27 @@ plugins { - id "org.sonarqube" version "5.0.0.4638" - id 'java-library' - id 'maven-publish' - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" + id "dolly-libs" + id "dolly-libs-publish" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnav-data-transfer-search-objects" property "sonar.projectName", "testnav-data-transfer-search-objects" - property "sonar.sourceEncoding", "UTF-8" } } -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.boot:spring-boot-dependencies:3.2.1' - } -} - -group = 'no.nav.testnav.libs' - -repositories { - mavenCentral() - maven { - name = "GitHubPackages" - url = uri('https://maven.pkg.github.com/navikt/maven-release') - credentials(PasswordCredentials) { - password System.getenv("NAV_TOKEN") - username 'token' - } - } - mavenLocal() -} - dependencies { implementation 'com.fasterxml.jackson.core:jackson-annotations' implementation 'com.fasterxml.jackson.core:jackson-databind' implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-xml' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.21' - implementation 'jakarta.validation:jakarta.validation-api' - implementation 'jakarta.xml.bind:jakarta.xml.bind-api' + implementation "io.swagger.core.v3:swagger-annotations-jakarta:$versions.swagger" + implementation "jakarta.validation:jakarta.validation-api:$versions.jakartaValidation" + implementation "jakarta.xml.bind:jakarta.xml.bind-api:$versions.jakartaXmlBindApi" implementation 'javax.xml.bind:jaxb-api:2.4.0-b180830.0359' implementation 'org.apache.commons:commons-lang3' implementation 'org.springframework:spring-web' implementation 'org.springframework.data:spring-data-elasticsearch' - - implementation 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' -} - -if (project.hasProperty("releaseVersion")) { - version = releaseVersion -} - -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } -} - -publishing { - repositories { - maven { - name = "github" - url = uri('https://maven.pkg.github.com/navikt/testnorge') - credentials(PasswordCredentials) { - username = System.getenv("GITHUB_ACTOR") - password = System.getenv("GITHUB_TOKEN") - } - } - } - publications { - gpr(MavenPublication) { - from(components.java) - } - } } tasks.withType(JavaCompile) { diff --git a/libs/data-transfer-search-objects/settings.gradle b/libs/data-transfer-search-objects/settings.gradle index 270d27385d6..7b9d9ce8240 100644 --- a/libs/data-transfer-search-objects/settings.gradle +++ b/libs/data-transfer-search-objects/settings.gradle @@ -4,6 +4,7 @@ plugins { rootProject.name = 'data-transfer-search-objects' +includeBuild "../../plugins/java" develocity { buildScan { diff --git a/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/pdlforvalter/v1/ForeldreansvarDTO.java b/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/pdlforvalter/v1/ForeldreansvarDTO.java index 4eb4bd0863d..4e1a6073b06 100644 --- a/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/pdlforvalter/v1/ForeldreansvarDTO.java +++ b/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/pdlforvalter/v1/ForeldreansvarDTO.java @@ -13,6 +13,7 @@ import java.time.LocalDateTime; import static org.apache.commons.lang3.BooleanUtils.isTrue; +import static org.apache.commons.lang3.StringUtils.isBlank; import static org.apache.commons.lang3.StringUtils.isNotBlank; @Data @@ -49,9 +50,16 @@ public boolean isAnsvarligMedIdentifikator() { return isNotBlank(ansvarlig); } + @JsonIgnore + public boolean isNotAnsvarssubjekt() { + + return isBlank(ansvarssubjekt); + } + @JsonIgnore @Override public String getIdentForRelasjon() { - return ansvarlig; + + return isNotBlank(ansvarlig) ? ansvarlig : ansvarssubjekt; } } \ No newline at end of file diff --git a/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/pdlforvalter/v1/PersonDTO.java b/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/pdlforvalter/v1/PersonDTO.java index 642193210bf..f6e6b038f93 100644 --- a/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/pdlforvalter/v1/PersonDTO.java +++ b/libs/data-transfer-search-objects/src/main/java/no/nav/testnav/libs/data/pdlforvalter/v1/PersonDTO.java @@ -16,6 +16,7 @@ import static no.nav.testnav.libs.data.pdlforvalter.v1.Identtype.DNR; import static no.nav.testnav.libs.data.pdlforvalter.v1.Identtype.FNR; import static no.nav.testnav.libs.data.pdlforvalter.v1.Identtype.NPID; +import static org.apache.commons.lang3.BooleanUtils.isTrue; @Data @Builder @@ -26,6 +27,7 @@ public class PersonDTO implements Serializable { private String ident; private Identtype identtype; + private Boolean standalone; private List adressebeskyttelse; private List bostedsadresse; @@ -288,4 +290,10 @@ public boolean isStrengtFortrolig() { return getAdressebeskyttelse().stream().anyMatch(AdressebeskyttelseDTO::isStrengtFortrolig); } + + @JsonIgnore + public boolean isStandalone() { + + return isTrue(standalone); + } } diff --git a/libs/database/build.gradle b/libs/database/build.gradle index cf83f9abf8e..4c3f4f3d551 100644 --- a/libs/database/build.gradle +++ b/libs/database/build.gradle @@ -1,45 +1,14 @@ plugins { - id "org.sonarqube" version "5.0.0.4638" - id 'java-library' - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" + id "dolly-libs" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnav-database" property "sonar.projectName", "testnav-database" - property "sonar.sourceEncoding", "UTF-8" } } -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.boot:spring-boot-dependencies:3.2.1' - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1' - } -} - -group = 'no.nav.testnav.libs' - -repositories { - mavenCentral() - mavenLocal() -} - -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } -} dependencies { implementation 'org.springframework.boot:spring-boot-starter-data-jpa' @@ -47,8 +16,4 @@ dependencies { implementation 'org.springframework.cloud:spring-cloud-vault-config-databases' implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' implementation 'org.flywaydb:flyway-core' - - implementation 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' } diff --git a/libs/database/settings.gradle b/libs/database/settings.gradle index be91471dc1b..8ad6f78209f 100644 --- a/libs/database/settings.gradle +++ b/libs/database/settings.gradle @@ -4,6 +4,7 @@ plugins { rootProject.name = 'database' +includeBuild "../../plugins/java" develocity { buildScan { diff --git a/libs/domain/build.gradle b/libs/domain/build.gradle index 1908e3f3b4f..a8586d3d0e8 100644 --- a/libs/domain/build.gradle +++ b/libs/domain/build.gradle @@ -1,55 +1,19 @@ plugins { - id "org.sonarqube" version "5.0.0.4638" - id 'java-library' - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" + id "dolly-libs" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnav-domain" property "sonar.projectName", "testnav-domain" - property "sonar.sourceEncoding", "UTF-8" } } -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.boot:spring-boot-dependencies:3.2.1' - } -} - -group = 'no.nav.testnav.libs' - -repositories { - mavenCentral() - mavenLocal() -} - -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } -} - - dependencies { implementation 'com.fasterxml.jackson.core:jackson-annotations' implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-xml' - implementation 'com.fasterxml.jackson.core:jackson-core:2.17.1' + implementation "com.fasterxml.jackson.core:jackson-core:$versions.jackson" - implementation 'jakarta.xml.bind:jakarta.xml.bind-api:4.0.2' + implementation "jakarta.xml.bind:jakarta.xml.bind-api:$versions.jakartaXmlBindApi" implementation 'io.springfox:springfox-swagger2:3.0.0' - - implementation 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' } \ No newline at end of file diff --git a/libs/domain/settings.gradle b/libs/domain/settings.gradle index 97962625795..429bfd5cf11 100644 --- a/libs/domain/settings.gradle +++ b/libs/domain/settings.gradle @@ -4,6 +4,7 @@ plugins { rootProject.name = 'domain' +includeBuild "../../plugins/java" develocity { buildScan { diff --git a/libs/integration-test/build.gradle b/libs/integration-test/build.gradle index df1149e1c4b..f7cc9d26991 100644 --- a/libs/integration-test/build.gradle +++ b/libs/integration-test/build.gradle @@ -1,58 +1,15 @@ plugins { - id "org.sonarqube" version "5.0.0.4638" - id 'java-library' - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" -} - -test { - useJUnitPlatform() + id "dolly-libs" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnav-integration-test" property "sonar.projectName", "testnav-integration-test" - property "sonar.sourceEncoding", "UTF-8" - } -} - -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.boot:spring-boot-dependencies:3.2.1' - } -} - -group = 'no.nav.testnav.libs' - -repositories { - mavenCentral() - mavenLocal() -} - -if (project.hasProperty("releaseVersion")) { - version = releaseVersion -} - -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) } } dependencies { implementation 'no.nav.testnav.libs:security-core' implementation 'org.springframework.boot:spring-boot-starter-webflux' - - implementation 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' } diff --git a/libs/integration-test/settings.gradle b/libs/integration-test/settings.gradle index 6c51a2805e4..fa42a1beedc 100644 --- a/libs/integration-test/settings.gradle +++ b/libs/integration-test/settings.gradle @@ -4,6 +4,8 @@ plugins { rootProject.name = 'integration-test' +includeBuild "../../plugins/java" + includeBuild '../security-core' develocity { diff --git a/libs/kafka-config/build.gradle b/libs/kafka-config/build.gradle index 20b402a233d..4c1b057e288 100644 --- a/libs/kafka-config/build.gradle +++ b/libs/kafka-config/build.gradle @@ -1,50 +1,14 @@ plugins { - id "org.sonarqube" version "5.0.0.4638" - id 'java-library' - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" + id "dolly-libs" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnav-kafka-config" property "sonar.projectName", "testnav-kafka-config" - property "sonar.sourceEncoding", "UTF-8" - } -} - -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.boot:spring-boot-dependencies:3.2.1' - } -} - - -group = 'no.nav.testnav.libs' - -repositories { - mavenCentral() - mavenLocal() -} - -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) } } dependencies { implementation 'org.springframework.boot:spring-boot-starter-web' - - implementation 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' } diff --git a/libs/kafka-config/settings.gradle b/libs/kafka-config/settings.gradle index 4f066b14ee1..475c79704c8 100644 --- a/libs/kafka-config/settings.gradle +++ b/libs/kafka-config/settings.gradle @@ -4,6 +4,8 @@ plugins { rootProject.name = 'kafka-config' +includeBuild "../../plugins/java" + develocity { buildScan { termsOfUseUrl = "https://gradle.com/terms-of-service" diff --git a/libs/kafka-producers/build.gradle b/libs/kafka-producers/build.gradle index 59251c883e4..1f09eb7b21d 100644 --- a/libs/kafka-producers/build.gradle +++ b/libs/kafka-producers/build.gradle @@ -1,58 +1,20 @@ plugins { - id "org.sonarqube" version "5.0.0.4638" - id 'java-library' - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" + id "dolly-libs" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnav-kafka-producers" property "sonar.projectName", "testnav-kafka-producers" - property "sonar.sourceEncoding", "UTF-8" } } -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.boot:spring-boot-dependencies:3.2.1' - } -} -group = 'no.nav.testnav.libs' - -repositories { - mavenCentral() - mavenLocal() - maven { - url = uri('https://packages.confluent.io/maven/') - } -} - -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } -} - - dependencies { implementation 'no.nav.testnav.libs:kafka-config' implementation 'no.nav.testnav.libs:avro-schema' implementation 'org.springframework.kafka:spring-kafka' - implementation 'io.confluent:kafka-avro-serializer:7.5.1' + implementation "io.confluent:kafka-avro-serializer:$versions.avro" implementation 'org.springframework.boot:spring-boot-starter-web' - - implementation 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' } \ No newline at end of file diff --git a/libs/kafka-producers/settings.gradle b/libs/kafka-producers/settings.gradle index 3b611ba488d..b1f8521a0c3 100644 --- a/libs/kafka-producers/settings.gradle +++ b/libs/kafka-producers/settings.gradle @@ -4,6 +4,8 @@ plugins { rootProject.name = 'kafka-producers' +includeBuild "../../plugins/java" + includeBuild '../kafka-config' includeBuild '../avro-schema' diff --git a/libs/reactive-core/build.gradle b/libs/reactive-core/build.gradle index f574020d41d..7af354a3b43 100644 --- a/libs/reactive-core/build.gradle +++ b/libs/reactive-core/build.gradle @@ -1,70 +1,18 @@ plugins { - id "org.sonarqube" version "5.0.0.4638" - id 'java-library' - id 'maven-publish' - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" -} - -test { - useJUnitPlatform() + id "dolly-libs" + id "dolly-libs-publish" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnav-reactive-core" property "sonar.projectName", "testnav-reactive-core" - property "sonar.sourceEncoding", "UTF-8" - } -} - -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.boot:spring-boot-dependencies:3.2.1' - } -} - - -group = 'no.nav.testnav.libs' - -repositories { - mavenCentral() - mavenLocal() -} - -if (project.hasProperty("releaseVersion")) { - version = releaseVersion -} - -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) } } publishing { - repositories { - maven { - name = "github" - url = uri('https://maven.pkg.github.com/navikt/testnorge') - credentials(PasswordCredentials) { - username = System.getenv("GITHUB_ACTOR") - password = System.getenv("GITHUB_TOKEN") - } - } - } publications { gpr(MavenPublication) { - from(components.java) - versionMapping { usage('java-api') { fromResolutionOf('runtimeClasspath') @@ -78,14 +26,8 @@ publishing { } dependencies { - - implementation 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' - implementation 'org.springframework.boot:spring-boot-starter-webflux' - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' + implementation "net.logstash.logback:logstash-logback-encoder:$versions.logback" - testImplementation 'org.springframework.boot:spring-boot-starter-test' - testImplementation 'io.projectreactor:reactor-test:3.6.5' + testImplementation "io.projectreactor:reactor-test:$versions.reactorTest" } \ No newline at end of file diff --git a/libs/reactive-core/settings.gradle b/libs/reactive-core/settings.gradle index 410e2bff48f..6c2e5fc542a 100644 --- a/libs/reactive-core/settings.gradle +++ b/libs/reactive-core/settings.gradle @@ -4,6 +4,8 @@ plugins { rootProject.name = 'reactive-core' +includeBuild "../../plugins/java" + develocity { buildScan { termsOfUseUrl = "https://gradle.com/terms-of-service" diff --git a/libs/reactive-frontend/build.gradle b/libs/reactive-frontend/build.gradle index eee5df3257a..b337a0fb293 100644 --- a/libs/reactive-frontend/build.gradle +++ b/libs/reactive-frontend/build.gradle @@ -1,53 +1,20 @@ plugins { - id "org.sonarqube" version "5.0.0.4638" - id 'java-library' + id "dolly-libs" + id 'maven-publish' - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnav-reactive-frontend" property "sonar.projectName", "testnav-reactive-frontend" - property "sonar.sourceEncoding", "UTF-8" } } - -group = 'no.nav.testnav.libs' - -repositories { - mavenCentral() - mavenLocal() -} - -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1' - mavenBom 'org.springframework.boot:spring-boot-dependencies:3.2.1' - } -} - - if (project.hasProperty("releaseVersion")) { version = releaseVersion } -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } -} - publishing { repositories { maven { @@ -78,10 +45,6 @@ publishing { dependencies { implementation 'no.nav.testnav.libs:security-core' - implementation 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' - implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server' implementation 'org.springframework.boot:spring-boot-starter-webflux' diff --git a/libs/reactive-frontend/settings.gradle b/libs/reactive-frontend/settings.gradle index cf279db27a9..9cb4b90d1eb 100644 --- a/libs/reactive-frontend/settings.gradle +++ b/libs/reactive-frontend/settings.gradle @@ -4,6 +4,8 @@ plugins { rootProject.name = 'reactive-frontend' +includeBuild "../../plugins/java" + includeBuild '../security-core' develocity { diff --git a/libs/reactive-proxy/build.gradle b/libs/reactive-proxy/build.gradle index d08bcb4e6b5..4cb6a426e9e 100644 --- a/libs/reactive-proxy/build.gradle +++ b/libs/reactive-proxy/build.gradle @@ -1,38 +1,13 @@ plugins { - id "org.sonarqube" version "5.0.0.4638" - id 'java-library' + id "dolly-libs" + id 'maven-publish' - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnav-reactive-proxy" property "sonar.projectName", "testnav-reactive-proxy" - property "sonar.sourceEncoding", "UTF-8" - } -} - -group = 'no.nav.testnav.libs' - -repositories { - mavenCentral() - mavenLocal() -} - -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1' - mavenBom 'org.springframework.boot:spring-boot-dependencies:3.2.1' } } @@ -40,12 +15,6 @@ if (project.hasProperty("releaseVersion")) { version = releaseVersion } -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } -} - publishing { repositories { maven { @@ -76,9 +45,6 @@ publishing { dependencies { implementation 'no.nav.testnav.libs:reactive-security' - implementation 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server' implementation 'org.springframework.boot:spring-boot-starter-webflux' diff --git a/libs/reactive-proxy/settings.gradle b/libs/reactive-proxy/settings.gradle index 88b8c3de9c9..1fb5ddc6adf 100644 --- a/libs/reactive-proxy/settings.gradle +++ b/libs/reactive-proxy/settings.gradle @@ -4,6 +4,8 @@ plugins { rootProject.name = 'reactive-proxy' +includeBuild "../../plugins/java" + includeBuild '../reactive-security' develocity { diff --git a/libs/reactive-security/build.gradle b/libs/reactive-security/build.gradle index 57a0a0c7f00..4f4646a99ae 100644 --- a/libs/reactive-security/build.gradle +++ b/libs/reactive-security/build.gradle @@ -1,47 +1,20 @@ plugins { - id "org.sonarqube" version "5.0.0.4638" - id 'java-library' - id 'maven-publish' - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" -} + id "dolly-libs" -test { - useJUnitPlatform() + id 'maven-publish' } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnav-reactive-security" property "sonar.projectName", "testnav-reactive-security" - property "sonar.sourceEncoding", "UTF-8" } } - -group = 'no.nav.testnav.libs' - -repositories { - mavenCentral() - mavenLocal() -} if (project.hasProperty("releaseVersion")) { version = releaseVersion } -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } -} - publishing { repositories { maven { @@ -69,27 +42,14 @@ publishing { } } -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.boot:spring-boot-dependencies:3.2.1' - } -} - dependencies { implementation 'no.nav.testnav.libs:security-core' - implementation 'com.auth0:java-jwt:4.4.0' + implementation "com.auth0:java-jwt:$versions.jwt" implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server' implementation 'org.springframework.boot:spring-boot-starter-webflux' implementation 'org.springframework.boot:spring-boot-starter-oauth2-client' implementation 'org.springframework.boot:spring-boot-starter-security' - implementation 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' - - testImplementation 'org.springframework.boot:spring-boot-starter-test' - } \ No newline at end of file diff --git a/libs/reactive-security/settings.gradle b/libs/reactive-security/settings.gradle index ff147ef435f..d817940ddef 100644 --- a/libs/reactive-security/settings.gradle +++ b/libs/reactive-security/settings.gradle @@ -4,6 +4,8 @@ plugins { rootProject.name = 'reactive-security' +includeBuild "../../plugins/java" + includeBuild '../security-core' develocity { diff --git a/libs/reactive-session-security/build.gradle b/libs/reactive-session-security/build.gradle index 8f4c127d702..d2a0c1ae784 100644 --- a/libs/reactive-session-security/build.gradle +++ b/libs/reactive-session-security/build.gradle @@ -1,48 +1,16 @@ plugins { - id "org.sonarqube" version "5.0.0.4638" - id 'java-library' - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" + id "dolly-libs" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnav-reactive-session-security" property "sonar.projectName", "testnav-reactive-session-security" - property "sonar.sourceEncoding", "UTF-8" - } -} - -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.boot:spring-boot-dependencies:3.2.1' - mavenBom 'org.springframework.session:spring-session-bom:2021.0.3' - } -} - -group = 'no.nav.testnav.libs' - -repositories { - mavenCentral() - mavenLocal() -} - -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) } } dependencies { - implementation 'com.auth0:java-jwt:4.4.0' + implementation "com.auth0:java-jwt:$versions.jwt" implementation 'no.nav.testnav.libs:security-core' implementation "org.springframework.session:spring-session-core" @@ -53,8 +21,4 @@ dependencies { implementation 'org.springframework.boot:spring-boot-starter-oauth2-client' implementation 'org.springframework.boot:spring-boot-starter-security' implementation 'org.springframework.boot:spring-boot-starter-data-redis' - - implementation 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' } \ No newline at end of file diff --git a/libs/reactive-session-security/settings.gradle b/libs/reactive-session-security/settings.gradle index 40cc147e68e..900e3f4ad3c 100644 --- a/libs/reactive-session-security/settings.gradle +++ b/libs/reactive-session-security/settings.gradle @@ -4,6 +4,7 @@ plugins { rootProject.name = 'reactive-session-security' +includeBuild "../../plugins/java" includeBuild '../security-core' diff --git a/libs/security-core/build.gradle b/libs/security-core/build.gradle index 62ff874fa90..c2f472acaa5 100644 --- a/libs/security-core/build.gradle +++ b/libs/security-core/build.gradle @@ -1,42 +1,11 @@ plugins { - id "org.sonarqube" version "5.0.0.4638" - id 'java-library' - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" + id "dolly-libs" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnav-security-core" property "sonar.projectName", "testnav-security-core" - property "sonar.sourceEncoding", "UTF-8" - } -} - -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.boot:spring-boot-dependencies:3.2.1' - } -} - -group = 'no.nav.testnav.libs' - -repositories { - mavenCentral() - mavenLocal() -} - -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) } } @@ -45,15 +14,9 @@ tasks.named('compileJava') { } dependencies { - implementation 'com.auth0:java-jwt:4.4.0' + implementation "com.auth0:java-jwt:$versions.jwt" - annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor' implementation 'org.springframework.boot:spring-boot-starter-oauth2-client' implementation 'org.springframework.boot:spring-boot-starter-validation' implementation 'org.springframework.boot:spring-boot-starter-webflux' - testImplementation 'org.springframework.boot:spring-boot-starter-test' - - annotationProcessor 'org.projectlombok:lombok' - implementation 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' } \ No newline at end of file diff --git a/libs/security-core/settings.gradle b/libs/security-core/settings.gradle index bf49db8ddb4..97da9574a43 100644 --- a/libs/security-core/settings.gradle +++ b/libs/security-core/settings.gradle @@ -4,6 +4,8 @@ plugins { rootProject.name = 'security-core' +includeBuild "../../plugins/java" + develocity { buildScan { termsOfUseUrl = "https://gradle.com/terms-of-service" diff --git a/libs/security-core/src/test/java/no/nav/testnav/libs/securitycore/domain/ServerPropertiesTest.java b/libs/security-core/src/test/java/no/nav/testnav/libs/securitycore/domain/ServerPropertiesTest.java index 62522781eef..c4fa5663fc1 100644 --- a/libs/security-core/src/test/java/no/nav/testnav/libs/securitycore/domain/ServerPropertiesTest.java +++ b/libs/security-core/src/test/java/no/nav/testnav/libs/securitycore/domain/ServerPropertiesTest.java @@ -13,6 +13,10 @@ class ServerPropertiesTest { void testAllPropertiesMissing() { try (var factory = Validation.buildDefaultValidatorFactory()) { var props = new TestServerProperties(); + props.setCluster(null); + props.setName(null); + props.setNamespace(null); + props.setUrl(null); var violations = factory.getValidator().validate(props); assertThat(violations) .hasSize(4) diff --git a/libs/security-token-service/build.gradle b/libs/security-token-service/build.gradle index 93fa5d5bedb..4268a403456 100644 --- a/libs/security-token-service/build.gradle +++ b/libs/security-token-service/build.gradle @@ -1,48 +1,14 @@ plugins { - id "org.sonarqube" version "5.0.0.4638" - id 'java-library' - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" + id "dolly-libs" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnav-security-token-service" property "sonar.projectName", "testnav-security-token-service" - property "sonar.sourceEncoding", "UTF-8" - } -} - -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.boot:spring-boot-dependencies:3.2.1' - } -} - -repositories { - mavenCentral() - mavenLocal() -} - -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) } } dependencies { - implementation 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' - implementation 'org.springframework.boot:spring-boot-starter-webflux' -} -group = 'no.nav.testnav.libs' \ No newline at end of file +} \ No newline at end of file diff --git a/libs/security-token-service/settings.gradle b/libs/security-token-service/settings.gradle index 393aeb31201..3f51d1f6555 100644 --- a/libs/security-token-service/settings.gradle +++ b/libs/security-token-service/settings.gradle @@ -4,6 +4,7 @@ plugins { rootProject.name = 'security-token-service' +includeBuild "../../plugins/java" develocity { buildScan { diff --git a/libs/servlet-core/build.gradle b/libs/servlet-core/build.gradle index d24eea9bd0b..37aba9ca55a 100644 --- a/libs/servlet-core/build.gradle +++ b/libs/servlet-core/build.gradle @@ -1,61 +1,20 @@ plugins { - id "org.sonarqube" version "5.0.0.4638" - id 'java-library' - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" -} - -test { - useJUnitPlatform() + id "dolly-libs" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnav-servlet-core" property "sonar.projectName", "testnav-servlet-core" - property "sonar.sourceEncoding", "UTF-8" - } -} - -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.boot:spring-boot-dependencies:3.2.1' - } -} - -group = 'no.nav.testnav.libs' - -repositories { - mavenCentral() - mavenLocal() -} - -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) } } dependencies { - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.21' - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' + implementation "io.swagger.core.v3:swagger-annotations-jakarta:$versions.swagger" + implementation "net.logstash.logback:logstash-logback-encoder:$versions.logback" implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'org.springframework.boot:spring-boot-starter-actuator' - - testImplementation "org.springframework.boot:spring-boot-starter-test" - - implementation 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' } \ No newline at end of file diff --git a/libs/servlet-core/settings.gradle b/libs/servlet-core/settings.gradle index cfb84c7c17e..4b9a208fed3 100644 --- a/libs/servlet-core/settings.gradle +++ b/libs/servlet-core/settings.gradle @@ -4,6 +4,7 @@ plugins { rootProject.name = 'servlet-core' +includeBuild "../../plugins/java" develocity { buildScan { diff --git a/libs/servlet-insecure-security/build.gradle b/libs/servlet-insecure-security/build.gradle index bf8f98918fa..21a166d7a93 100644 --- a/libs/servlet-insecure-security/build.gradle +++ b/libs/servlet-insecure-security/build.gradle @@ -1,42 +1,11 @@ plugins { - id "org.sonarqube" version "5.0.0.4638" - id 'java-library' - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" + id "dolly-libs" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnav-servlet-insecure-security" property "sonar.projectName", "testnav-servlet-insecure-security" - property "sonar.sourceEncoding", "UTF-8" - } -} - -group = 'no.nav.testnav.libs' - -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.boot:spring-boot-dependencies:3.2.1' - } -} - -repositories { - mavenCentral() - mavenLocal() -} - -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) } } @@ -49,8 +18,4 @@ dependencies { implementation 'org.springframework.boot:spring-boot-starter-webflux' implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'org.springframework.boot:spring-boot-starter-oauth2-client' - - implementation 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' } \ No newline at end of file diff --git a/libs/servlet-insecure-security/settings.gradle b/libs/servlet-insecure-security/settings.gradle index 53ea95bc271..5e531cbdd58 100644 --- a/libs/servlet-insecure-security/settings.gradle +++ b/libs/servlet-insecure-security/settings.gradle @@ -4,6 +4,7 @@ plugins { rootProject.name = 'servlet-insecure-security' +includeBuild "../../plugins/java" includeBuild '../security-core' diff --git a/libs/servlet-security/build.gradle b/libs/servlet-security/build.gradle index 6c8170e03c2..44a67aa7bed 100644 --- a/libs/servlet-security/build.gradle +++ b/libs/servlet-security/build.gradle @@ -1,58 +1,22 @@ plugins { - id "org.sonarqube" version "5.0.0.4638" - id 'java-library' - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" + id "dolly-libs" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnav-servlet-security" property "sonar.projectName", "testnav-servlet-security" - property "sonar.sourceEncoding", "UTF-8" - } -} - -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.boot:spring-boot-dependencies:3.2.1' - } -} - - -group = 'no.nav.testnav.libs' - -repositories { - mavenCentral() - mavenLocal() -} - -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) } } dependencies { implementation 'no.nav.testnav.libs:security-core' - implementation 'com.auth0:java-jwt:4.4.0' + implementation "com.auth0:java-jwt:$versions.jwt" implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server' implementation 'org.springframework.boot:spring-boot-starter-actuator' implementation 'org.springframework.boot:spring-boot-starter-webflux' implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'org.springframework.boot:spring-boot-starter-oauth2-client' - - implementation 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' } \ No newline at end of file diff --git a/libs/servlet-security/settings.gradle b/libs/servlet-security/settings.gradle index 6d44ec692cb..bf346e6828a 100644 --- a/libs/servlet-security/settings.gradle +++ b/libs/servlet-security/settings.gradle @@ -4,6 +4,7 @@ plugins { rootProject.name = 'servlet-security' +includeBuild "../../plugins/java" includeBuild '../security-core' diff --git a/libs/slack/build.gradle b/libs/slack/build.gradle index e0dd48d67c9..8c2b2a4064b 100644 --- a/libs/slack/build.gradle +++ b/libs/slack/build.gradle @@ -1,50 +1,15 @@ plugins { - id "org.sonarqube" version "5.0.0.4638" - id 'java-library' - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" + id "dolly-libs" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnav-slack" property "sonar.projectName", "testnav-slack" - property "sonar.sourceEncoding", "UTF-8" - } -} -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.boot:spring-boot-dependencies:3.2.1' - } -} - - -group = 'no.nav.testnav.libs' - -repositories { - mavenCentral() - mavenLocal() -} - -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) } } dependencies { implementation 'org.springframework.boot:spring-boot-starter-webflux' implementation 'org.springframework:spring-web' - - implementation 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' } \ No newline at end of file diff --git a/libs/slack/settings.gradle b/libs/slack/settings.gradle index 378a320c9b7..2b5e7dd90be 100644 --- a/libs/slack/settings.gradle +++ b/libs/slack/settings.gradle @@ -4,6 +4,7 @@ plugins { rootProject.name = 'slack' +includeBuild "../../plugins/java" develocity { buildScan { diff --git a/libs/testing/build.gradle b/libs/testing/build.gradle index b8b683be3e5..8e52747b710 100644 --- a/libs/testing/build.gradle +++ b/libs/testing/build.gradle @@ -1,53 +1,16 @@ plugins { - id "org.sonarqube" version "5.0.0.4638" - id 'java-library' - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" + id "dolly-libs" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnav-testing" property "sonar.projectName", "testnav-testing" - property "sonar.sourceEncoding", "UTF-8" - } -} - -group = 'no.nav.testnav.libs' - -repositories { - mavenCentral() - mavenLocal() -} - -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1' - mavenBom 'org.springframework.boot:spring-boot-dependencies:3.2.1' - } -} - -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) } } dependencies { - implementation 'org.springframework.boot:spring-boot-starter-test' implementation 'org.springframework.cloud:spring-cloud-contract-wiremock' - implementation 'com.fasterxml.jackson.core:jackson-core' + implementation "com.fasterxml.jackson.core:jackson-core:$versions.jackson" implementation 'com.fasterxml.jackson.core:jackson-databind' - - implementation 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' } \ No newline at end of file diff --git a/libs/testing/settings.gradle b/libs/testing/settings.gradle index f47f547a9de..8680009f9bc 100644 --- a/libs/testing/settings.gradle +++ b/libs/testing/settings.gradle @@ -4,6 +4,8 @@ plugins { rootProject.name = 'testing' +includeBuild "../../plugins/java" + develocity { buildScan { termsOfUseUrl = "https://gradle.com/terms-of-service" diff --git a/mocks/azuread-mock/gradle/wrapper/gradle-wrapper.properties b/mocks/azuread-mock/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/mocks/maskinporten-mock/build.gradle b/mocks/maskinporten-mock/build.gradle index b8a94843de2..2ee420309f3 100644 --- a/mocks/maskinporten-mock/build.gradle +++ b/mocks/maskinporten-mock/build.gradle @@ -1,31 +1,9 @@ plugins { - id 'java' - id 'org.springframework.boot' version "3.2.6" - id 'io.spring.dependency-management' version "1.1.5" -} - -bootJar { - archiveFileName = "app.jar" -} - -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1' - } -} - -test { - useJUnitPlatform() -} - -repositories { - mavenCentral() - mavenLocal() + id "dolly-apps" } dependencies { - implementation 'com.auth0:java-jwt:4.4.0' + implementation "com.auth0:java-jwt:$versions.jwt" implementation 'no.nav.testnav.libs:security-core' implementation 'no.nav.testnav.libs:reactive-core' @@ -33,16 +11,7 @@ dependencies { implementation 'org.springframework.boot:spring-boot-starter-security' implementation 'org.springframework.boot:spring-boot-starter-webflux' implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server' - implementation 'org.springdoc:springdoc-openapi-starter-webflux-ui:2.5.0' + implementation "org.springdoc:springdoc-openapi-starter-webflux-ui:$versions.springdoc" - compileOnly 'jakarta.servlet:jakarta.servlet-api:6.0.0' - - implementation 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' -} -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } + compileOnly 'jakarta.servlet:jakarta.servlet-api' } diff --git a/mocks/maskinporten-mock/settings.gradle b/mocks/maskinporten-mock/settings.gradle index 898f175ed43..19d2870c4fa 100644 --- a/mocks/maskinporten-mock/settings.gradle +++ b/mocks/maskinporten-mock/settings.gradle @@ -4,8 +4,10 @@ plugins { rootProject.name = 'maskinporten-mock' -includeBuild '../../libs/security-core' +includeBuild "../../plugins/java" + includeBuild '../../libs/reactive-core' +includeBuild '../../libs/security-core' develocity { buildScan { diff --git a/mocks/tokendings-mock/build.gradle b/mocks/tokendings-mock/build.gradle index c31677834d6..f5f11a9570d 100644 --- a/mocks/tokendings-mock/build.gradle +++ b/mocks/tokendings-mock/build.gradle @@ -1,31 +1,9 @@ plugins { - id 'java' - id 'org.springframework.boot' version "3.2.6" - id 'io.spring.dependency-management' version "1.1.5" -} - -bootJar { - archiveFileName = "app.jar" -} - -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1' - } -} - -test { - useJUnitPlatform() -} - -repositories { - mavenCentral() - mavenLocal() + id "dolly-apps" } dependencies { - implementation 'com.auth0:java-jwt:4.4.0' + implementation "com.auth0:java-jwt:$versions.jwt" implementation 'no.nav.testnav.libs:security-core' implementation 'no.nav.testnav.libs:reactive-core' @@ -34,15 +12,7 @@ dependencies { implementation 'org.springframework.boot:spring-boot-starter-security' implementation 'org.springframework.boot:spring-boot-starter-webflux' implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server' - implementation 'org.springdoc:springdoc-openapi-starter-webflux-ui:2.5.0' + implementation "org.springdoc:springdoc-openapi-starter-webflux-ui:$versions.springdoc" - compileOnly 'jakarta.servlet:jakarta.servlet-api:6.0.0' - implementation 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' -} -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } + compileOnly 'jakarta.servlet:jakarta.servlet-api' } diff --git a/mocks/tokendings-mock/settings.gradle b/mocks/tokendings-mock/settings.gradle index 121f6831265..280e84b5bd9 100644 --- a/mocks/tokendings-mock/settings.gradle +++ b/mocks/tokendings-mock/settings.gradle @@ -4,8 +4,10 @@ plugins { rootProject.name = 'tokendings-mock' -includeBuild '../../libs/security-core' +includeBuild "../../plugins/java" + includeBuild '../../libs/reactive-core' +includeBuild '../../libs/security-core' develocity { buildScan { diff --git a/plugins/java/src/main/groovy/dolly-apps.gradle b/plugins/java/src/main/groovy/dolly-apps.gradle new file mode 100644 index 00000000000..3426f98bdd1 --- /dev/null +++ b/plugins/java/src/main/groovy/dolly-apps.gradle @@ -0,0 +1,82 @@ +plugins { + id "dolly-sonar" + id "dolly-versions" + + id "io.spring.dependency-management" // See ../../../build.gradle for version. + id "java" + id "org.springframework.boot" // See ../../../build.gradle for version. +} + +configurations { + compileOnly { + extendsFrom annotationProcessor + } +} + +dependencies { + annotationProcessor "org.projectlombok:lombok" + annotationProcessor "org.springframework.boot:spring-boot-configuration-processor" + + compileOnly "org.projectlombok:lombok" + + developmentOnly "org.springframework.boot:spring-boot-devtools" + + implementation "net.logstash.logback:logstash-logback-encoder:$versions.logback" + implementation "org.hibernate.validator:hibernate-validator" + implementation "org.projectlombok:lombok" + implementation "org.springframework.boot:spring-boot-starter-actuator" + implementation "org.springframework.boot:spring-boot-starter-webflux" + implementation "org.springframework.cloud:spring-cloud-starter-vault-config" + + runtimeOnly "io.micrometer:micrometer-registry-prometheus" + + testAnnotationProcessor "org.projectlombok:lombok" + + testImplementation "org.springframework.boot:spring-boot-starter-test" +} + +dependencyManagement { + applyMavenExclusions = false + imports { + mavenBom "org.springframework.boot:spring-boot-dependencies:$versions.springBoot" + mavenBom "org.springframework.cloud:spring-cloud-dependencies:$versions.springCloud" + mavenBom "org.springframework.session:spring-session-bom:$versions.springSession" + } +} + +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} + +repositories { + mavenCentral() + maven { + name = "GitHub Packages" + url = uri("https://maven.pkg.github.com/navikt/maven-release") + credentials(PasswordCredentials) { + username "token" + password System.getenv("NAV_TOKEN") + } + } + maven { + name = "Confluent" + url = uri("https://packages.confluent.io/maven/") + } + maven { + name = "Shibboleth" + url = uri("https://build.shibboleth.net/maven/releases/") + } + mavenLocal() +} + +tasks.bootJar { + archiveFileName = "app.jar" + duplicatesStrategy = DuplicatesStrategy.WARN +} + +tasks.test { + useJUnitPlatform() + jvmArgs "--add-opens", "java.base/java.lang=ALL-UNNAMED" +} \ No newline at end of file diff --git a/plugins/java/src/main/groovy/dolly-java-conventions.gradle b/plugins/java/src/main/groovy/dolly-java-conventions.gradle deleted file mode 100644 index ee03bb4d25f..00000000000 --- a/plugins/java/src/main/groovy/dolly-java-conventions.gradle +++ /dev/null @@ -1,81 +0,0 @@ -plugins { - id "io.spring.dependency-management" // See ../../../build.gradle for version. - id "jacoco" - id "java" - id "org.sonarqube" // See ../../../build.gradle for version. - id "org.springframework.boot" // See ../../../build.gradle for version. -} - -tasks.bootJar { - archiveFileName = "app.jar" -} - -configurations { - compileOnly { - extendsFrom annotationProcessor - } -} - -dependencies { - annotationProcessor 'org.projectlombok:lombok' - annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor' - - compileOnly 'org.projectlombok:lombok' - - developmentOnly 'org.springframework.boot:spring-boot-devtools' - - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' - implementation 'org.projectlombok:lombok' - implementation 'org.springframework.boot:spring-boot-starter-actuator' - - runtimeOnly 'io.micrometer:micrometer-registry-prometheus' - - testAnnotationProcessor 'org.projectlombok:lombok' - - testImplementation "org.junit.jupiter:junit-jupiter:5.10.1" - testImplementation 'org.springframework.boot:spring-boot-starter-test' -} - -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom "org.springframework.cloud:spring-cloud-dependencies:2023.0.0" - } -} - -repositories { - mavenLocal() - mavenCentral() - maven { - name = "GitHubPackages" - url = uri('https://maven.pkg.github.com/navikt/maven-release') - credentials(PasswordCredentials) { - username 'token' - password System.getenv("NAV_TOKEN") - } - } -} - -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } -} - -sonarqube { - properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true - property "sonar.sourceEncoding", "UTF-8" - } -} - -tasks.test { - useJUnitPlatform() - jvmArgs '--add-opens', 'java.base/java.lang=ALL-UNNAMED' -} \ No newline at end of file diff --git a/plugins/java/src/main/groovy/dolly-libs-publish.gradle b/plugins/java/src/main/groovy/dolly-libs-publish.gradle new file mode 100644 index 00000000000..7a0a47d8ff1 --- /dev/null +++ b/plugins/java/src/main/groovy/dolly-libs-publish.gradle @@ -0,0 +1,25 @@ +plugins { + id "maven-publish" +} + +if (project.hasProperty("releaseVersion")) { + version = releaseVersion +} + +publishing { + repositories { + maven { + name = "github" + url = uri('https://maven.pkg.github.com/navikt/testnorge') + credentials(PasswordCredentials) { + username = System.getenv("GITHUB_ACTOR") + password = System.getenv("GITHUB_TOKEN") + } + } + } + publications { + gpr(MavenPublication) { + from(components.java) + } + } +} \ No newline at end of file diff --git a/plugins/java/src/main/groovy/dolly-libs.gradle b/plugins/java/src/main/groovy/dolly-libs.gradle new file mode 100644 index 00000000000..9002e295ad3 --- /dev/null +++ b/plugins/java/src/main/groovy/dolly-libs.gradle @@ -0,0 +1,54 @@ +plugins { + id "dolly-sonar" + id "dolly-versions" + + id "io.spring.dependency-management" // See ../../../build.gradle for version. + id "java-library" +} + +group = "no.nav.testnav.libs" + +configurations { + compileOnly { + extendsFrom annotationProcessor + } +} + +dependencyManagement { + applyMavenExclusions = false + imports { + mavenBom "org.springframework.boot:spring-boot-dependencies:$versions.springBoot" + mavenBom "org.springframework.cloud:spring-cloud-dependencies:$versions.springCloud" + } +} + +dependencies { + annotationProcessor "org.projectlombok:lombok" + annotationProcessor "org.springframework.boot:spring-boot-configuration-processor" + + implementation "org.projectlombok:lombok" + + testAnnotationProcessor "org.projectlombok:lombok" + + testImplementation "org.springframework.boot:spring-boot-starter-test" +} + +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} + +repositories { + mavenCentral() + maven { + name = "Confluent" + url = uri("https://packages.confluent.io/maven/") + } + mavenLocal() +} + +tasks.test { + useJUnitPlatform() + jvmArgs "--add-opens", "java.base/java.lang=ALL-UNNAMED" +} \ No newline at end of file diff --git a/plugins/java/src/main/groovy/dolly-proxies.gradle b/plugins/java/src/main/groovy/dolly-proxies.gradle new file mode 100644 index 00000000000..ea907c260bf --- /dev/null +++ b/plugins/java/src/main/groovy/dolly-proxies.gradle @@ -0,0 +1,85 @@ +plugins { + id "dolly-sonar" + id "dolly-versions" + + id "io.spring.dependency-management" // See ../../../build.gradle for version. + id "java" + id "org.springframework.boot" // See ../../../build.gradle for version. +} + +configurations { + compileOnly { + extendsFrom annotationProcessor + } +} + +dependencies { + annotationProcessor "org.projectlombok:lombok" + annotationProcessor "org.springframework.boot:spring-boot-configuration-processor" + + compileOnly "org.projectlombok:lombok" + + developmentOnly "org.springframework.boot:spring-boot-devtools" + + implementation "net.logstash.logback:logstash-logback-encoder:$versions.logback" + implementation "no.nav.testnav.libs:reactive-core" + implementation "no.nav.testnav.libs:reactive-proxy" + implementation "org.hibernate.validator:hibernate-validator" + implementation "org.projectlombok:lombok" + implementation "org.springframework.boot:spring-boot-starter-actuator" + implementation "org.springframework.boot:spring-boot-starter-oauth2-resource-server" + implementation "org.springframework.cloud:spring-cloud-starter-gateway" + + runtimeOnly "io.micrometer:micrometer-registry-prometheus" + + testAnnotationProcessor "org.projectlombok:lombok" + + testImplementation "org.springframework.boot:spring-boot-starter-test" + testImplementation "org.springframework.cloud:spring-cloud-contract-wiremock" +} + +dependencyManagement { + applyMavenExclusions = false + imports { + mavenBom "org.springframework.boot:spring-boot-dependencies:$versions.springBoot" + mavenBom "org.springframework.cloud:spring-cloud-dependencies:$versions.springCloud" + mavenBom "org.springframework.session:spring-session-bom:$versions.springSession" + } +} + +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} + +repositories { + mavenCentral() + maven { + name = "GitHub Packages" + url = uri("https://maven.pkg.github.com/navikt/maven-release") + credentials(PasswordCredentials) { + username "token" + password System.getenv("NAV_TOKEN") + } + } + maven { + name = "Confluent" + url = uri("https://packages.confluent.io/maven/") + } + maven { + name = "Shibboleth" + url = uri("https://build.shibboleth.net/maven/releases/") + } + mavenLocal() +} + +tasks.bootJar { + archiveFileName = "app.jar" + duplicatesStrategy = DuplicatesStrategy.WARN +} + +tasks.test { + useJUnitPlatform() + jvmArgs "--add-opens", "java.base/java.lang=ALL-UNNAMED" +} \ No newline at end of file diff --git a/plugins/java/src/main/groovy/dolly-sonar.gradle b/plugins/java/src/main/groovy/dolly-sonar.gradle new file mode 100644 index 00000000000..7ef76b56442 --- /dev/null +++ b/plugins/java/src/main/groovy/dolly-sonar.gradle @@ -0,0 +1,17 @@ +plugins { + id "jacoco" + id "org.sonarqube" // See ../../../build.gradle for version. +} + +sonarqube { + properties { + property "sonar.dynamicAnalysis", "reuseReports" + property "sonar.host.url", "https://sonarcloud.io" + property "sonar.java.coveragePlugin", "jacoco" + property "sonar.language", "java" + property "sonar.organization", "navikt" + property "sonar.project.monorepo.enabled", true + property "sonar.sourceEncoding", "UTF-8" + property "sonar.token", System.getenv("SONAR_TOKEN") + } +} \ No newline at end of file diff --git a/plugins/java/src/main/groovy/dolly-versions.gradle b/plugins/java/src/main/groovy/dolly-versions.gradle new file mode 100644 index 00000000000..27445a6f0da --- /dev/null +++ b/plugins/java/src/main/groovy/dolly-versions.gradle @@ -0,0 +1,36 @@ +extensions.create("versions", DollyVersionCatalog) + +class DollyVersionCatalog { + String navAltinnInntektsmelding = "1.2019.08.16-13.46-35cbdfd492d4" + String navFellesregister = "2020.08.27-09.53-183ead3d81eb" + + String springBoot = "3.2.1" + String springCloud = "2023.0.1" + String springSession = "2021.2.3" + + String apacheAvro = "1.11.3" + String apacheKafka = "3.7.0" + String apachePoi = "5.2.5" + String assertj = "3.26.0" + String avro = "7.6.1" + String guava = "33.2.0-jre" + String jackson = "2.17.1" + String jakartaActivation = "2.1.3" + String jakartaValidation = "3.1.0" + String jakartaXmlBindApi = "4.0.2" + String javaxActivation = "1.1.1" + String javaxAnnotation = "1.3.2" + String jaxb = "4.0.5" + String jaxws = "4.0.2" + String jweaver = "1.9.22" + String jwt = "4.4.0" + String logback = "7.4" + String mq = "3.2.3" + String okhttp = "4.10.0" + String opensearch = "1.4.0" + String orika = "1.5.4" + String reactorSpring = "1.0.1.RELEASE" + String reactorTest = "3.6.5" + String springdoc = "2.5.0" + String swagger = "2.2.21" +} \ No newline at end of file diff --git a/proxies/aareg-proxy/build.gradle b/proxies/aareg-proxy/build.gradle index 10f5e78eb73..aa9e185cc03 100644 --- a/proxies/aareg-proxy/build.gradle +++ b/proxies/aareg-proxy/build.gradle @@ -1,72 +1,17 @@ plugins { - id 'io.spring.dependency-management' version "1.1.5" - id 'java' - id "org.sonarqube" version "5.0.0.4638" - id 'org.springframework.boot' version "3.2.6" - id "jacoco" -} - -test { - useJUnitPlatform() + id "dolly-proxies" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnav-aareg-proxy" property "sonar.projectName", "testnav-aareg-proxy" - property "sonar.sourceEncoding", "UTF-8" } } -bootJar { - archiveFileName = "app.jar" -} - -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1' - } -} - -repositories { - mavenCentral() - mavenLocal() -} dependencies { - - annotationProcessor "org.springframework.boot:spring-boot-configuration-processor" - - implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server' - implementation 'org.springframework.boot:spring-boot-starter-webflux' - - implementation 'org.springframework.cloud:spring-cloud-starter-gateway' - implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' - - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' - implementation 'org.hibernate.validator:hibernate-validator' - - implementation 'no.nav.testnav.libs:reactive-core' - implementation 'no.nav.testnav.libs:reactive-proxy' - implementation 'no.nav.testnav.libs:reactive-security' - implementation 'no.nav.testnav.libs:security-core' - - testImplementation 'org.springframework.boot:spring-boot-starter-test' - testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' - - implementation 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' -} -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } + implementation "no.nav.testnav.libs:reactive-security" + implementation "no.nav.testnav.libs:security-core" + implementation "org.springframework.boot:spring-boot-starter-webflux" + implementation "org.springframework.cloud:spring-cloud-starter-vault-config" } diff --git a/proxies/aareg-proxy/config.yml b/proxies/aareg-proxy/config.yml index f733815cdce..9265c224f6a 100644 --- a/proxies/aareg-proxy/config.yml +++ b/proxies/aareg-proxy/config.yml @@ -52,6 +52,8 @@ spec: cluster: dev-gcp - application: testnorge-statisk-data-forvalter cluster: dev-fss + - application: testnav-levende-arbeidsforhold-ansettelse + cluster: dev-gcp liveness: path: /internal/isAlive initialDelay: 4 diff --git a/proxies/aareg-proxy/settings.gradle b/proxies/aareg-proxy/settings.gradle index 99ed0360802..a2b3817b5a1 100644 --- a/proxies/aareg-proxy/settings.gradle +++ b/proxies/aareg-proxy/settings.gradle @@ -4,10 +4,12 @@ plugins { rootProject.name = 'aareg-proxy' +includeBuild "../../plugins/java" + includeBuild '../../libs/reactive-core' includeBuild '../../libs/reactive-proxy' -includeBuild '../../libs/security-core' includeBuild '../../libs/reactive-security' +includeBuild '../../libs/security-core' develocity { buildScan { diff --git a/proxies/aareg-synt-services-proxy/build.gradle b/proxies/aareg-synt-services-proxy/build.gradle index d32ca22ddbd..71c8a758344 100644 --- a/proxies/aareg-synt-services-proxy/build.gradle +++ b/proxies/aareg-synt-services-proxy/build.gradle @@ -1,63 +1,10 @@ plugins { - id 'java' - id "org.sonarqube" version "5.0.0.4638" - id 'org.springframework.boot' version "3.2.6" - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" -} - -test { - useJUnitPlatform() + id "dolly-proxies" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "aareg-synt-services-proxy" property "sonar.projectName", "aareg-synt-services-proxy" - property "sonar.sourceEncoding", "UTF-8" - } -} -bootJar { - archiveFileName = "app.jar" -} - -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1' - } -} - -repositories { - mavenCentral() - mavenLocal() -} - -dependencies { - - implementation 'no.nav.testnav.libs:reactive-core' - implementation 'no.nav.testnav.libs:reactive-proxy' - - implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server' - implementation 'org.springframework.boot:spring-boot-starter-webflux' - implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' - implementation 'org.springframework.cloud:spring-cloud-starter-gateway' - - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' - implementation 'org.hibernate.validator:hibernate-validator' - - testImplementation 'org.springframework.boot:spring-boot-starter-test' - testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' -} -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) } } diff --git a/proxies/aareg-synt-services-proxy/settings.gradle b/proxies/aareg-synt-services-proxy/settings.gradle index 3526329c16a..f3bd3e404e8 100644 --- a/proxies/aareg-synt-services-proxy/settings.gradle +++ b/proxies/aareg-synt-services-proxy/settings.gradle @@ -4,6 +4,7 @@ plugins { rootProject.name = 'aareg-synt-services-proxy' +includeBuild "../../plugins/java" includeBuild '../../libs/reactive-core' includeBuild '../../libs/reactive-proxy' diff --git a/proxies/arbeidsplassencv-proxy/build.gradle b/proxies/arbeidsplassencv-proxy/build.gradle index 738744f1b9d..79f23c05157 100644 --- a/proxies/arbeidsplassencv-proxy/build.gradle +++ b/proxies/arbeidsplassencv-proxy/build.gradle @@ -1,70 +1,17 @@ plugins { - id 'java' - id "org.sonarqube" version "5.0.0.4638" - id 'org.springframework.boot' version "3.2.6" - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" -} - -test { - useJUnitPlatform() + id "dolly-proxies" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnav-arbeidsplassencv-proxy" property "sonar.projectName", "testnav-arbeidsplassencv-proxy" - property "sonar.sourceEncoding", "UTF-8" - } -} - -bootJar { - archiveFileName = "app.jar" -} - -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1' } } -repositories { - mavenCentral() - mavenLocal() -} - dependencies { - - implementation 'no.nav.testnav.libs:reactive-core' - implementation 'no.nav.testnav.libs:reactive-proxy' - implementation 'no.nav.testnav.libs:reactive-security' - implementation 'no.nav.testnav.libs:security-core' - - implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server' - implementation 'org.springframework.boot:spring-boot-starter-webflux' - - implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' - implementation 'org.springframework.cloud:spring-cloud-starter-gateway' - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' - implementation 'org.hibernate.validator:hibernate-validator' - - testImplementation 'org.springframework.boot:spring-boot-starter-test' - testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' - - implementation 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' -} -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } + implementation "no.nav.testnav.libs:reactive-security" + implementation "no.nav.testnav.libs:security-core" + implementation "org.springframework.boot:spring-boot-starter-webflux" + implementation "org.springframework.cloud:spring-cloud-starter-vault-config" } diff --git a/proxies/arbeidsplassencv-proxy/settings.gradle b/proxies/arbeidsplassencv-proxy/settings.gradle index 77a3c02d1c1..fffa0bc93a9 100644 --- a/proxies/arbeidsplassencv-proxy/settings.gradle +++ b/proxies/arbeidsplassencv-proxy/settings.gradle @@ -4,10 +4,12 @@ plugins { rootProject.name = 'arbeidsplassencv-proxy' +includeBuild "../../plugins/java" + includeBuild '../../libs/reactive-core' includeBuild '../../libs/reactive-proxy' -includeBuild '../../libs/security-core' includeBuild '../../libs/reactive-security' +includeBuild '../../libs/security-core' develocity { buildScan { diff --git a/proxies/arena-forvalteren-proxy/build.gradle b/proxies/arena-forvalteren-proxy/build.gradle index 24103d0b473..c6f0b1257e3 100644 --- a/proxies/arena-forvalteren-proxy/build.gradle +++ b/proxies/arena-forvalteren-proxy/build.gradle @@ -1,71 +1,15 @@ plugins { - id 'java' - id "org.sonarqube" version "5.0.0.4638" - id 'org.springframework.boot' version "3.2.6" - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" -} - -test { - useJUnitPlatform() + id "dolly-proxies" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnav-arena-forvalteren-proxy" property "sonar.projectName", "testnav-arena-forvalteren-proxy" - property "sonar.sourceEncoding", "UTF-8" } } -bootJar { - archiveFileName = "app.jar" -} - -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1' - } -} - -repositories { - mavenCentral() - mavenLocal() -} - dependencies { - - implementation 'no.nav.testnav.libs:reactive-core' - implementation 'no.nav.testnav.libs:reactive-proxy' implementation 'no.nav.testnav.libs:security-core' implementation 'no.nav.testnav.libs:data-transfer-objects' - - implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server' - implementation 'org.springframework.boot:spring-boot-starter-webflux' - - implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' - implementation 'org.springframework.cloud:spring-cloud-starter-gateway' - - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' - implementation 'org.hibernate.validator:hibernate-validator' - - testImplementation 'org.springframework.boot:spring-boot-starter-test' - testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' - - implementation 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' -} -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } } diff --git a/proxies/arena-forvalteren-proxy/settings.gradle b/proxies/arena-forvalteren-proxy/settings.gradle index c8a340ea0db..0cff2b5dcf1 100644 --- a/proxies/arena-forvalteren-proxy/settings.gradle +++ b/proxies/arena-forvalteren-proxy/settings.gradle @@ -4,11 +4,12 @@ plugins { rootProject.name = 'arena-forvalteren-proxy' +includeBuild "../../plugins/java" +includeBuild '../../libs/data-transfer-objects' includeBuild '../../libs/reactive-core' includeBuild '../../libs/reactive-proxy' includeBuild '../../libs/security-core' -includeBuild '../../libs/data-transfer-objects' develocity { buildScan { diff --git a/proxies/batch-adeo-proxy/build.gradle b/proxies/batch-adeo-proxy/build.gradle index 118492dccb3..12df8fce778 100644 --- a/proxies/batch-adeo-proxy/build.gradle +++ b/proxies/batch-adeo-proxy/build.gradle @@ -1,64 +1,10 @@ plugins { - id 'java' - id "org.sonarqube" version "5.0.0.4638" - id 'org.springframework.boot' version "3.2.6" - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" -} - -test { - useJUnitPlatform() + id "dolly-proxies" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnorge-batch-adeo-proxy" property "sonar.projectName", "testnorge-batch-adeo-proxy" - property "sonar.sourceEncoding", "UTF-8" - } -} -bootJar { - archiveFileName = "app.jar" -} - -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1' - } -} - -repositories { - mavenCentral() - mavenLocal() -} - -dependencies { - - implementation 'no.nav.testnav.libs:reactive-core' - implementation 'no.nav.testnav.libs:reactive-proxy' - - implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server' - implementation 'org.springframework.boot:spring-boot-starter-webflux' - - implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' - implementation 'org.springframework.cloud:spring-cloud-starter-gateway' - - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' - implementation 'org.hibernate.validator:hibernate-validator' - - testImplementation 'org.springframework.boot:spring-boot-starter-test' - testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' -} -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) } } diff --git a/proxies/batch-adeo-proxy/settings.gradle b/proxies/batch-adeo-proxy/settings.gradle index f6d53c5bbe2..f9b06323d97 100644 --- a/proxies/batch-adeo-proxy/settings.gradle +++ b/proxies/batch-adeo-proxy/settings.gradle @@ -4,6 +4,7 @@ plugins { rootProject.name = 'batch-adeo-proxy' +includeBuild "../../plugins/java" includeBuild '../../libs/reactive-core' includeBuild '../../libs/reactive-proxy' diff --git a/proxies/brregstub-proxy/build.gradle b/proxies/brregstub-proxy/build.gradle index aeb3b502796..d01cc5da0b9 100644 --- a/proxies/brregstub-proxy/build.gradle +++ b/proxies/brregstub-proxy/build.gradle @@ -1,66 +1,14 @@ plugins { - id 'java' - id "org.sonarqube" version "5.0.0.4638" - id 'org.springframework.boot' version "3.2.6" - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" -} - -test { - useJUnitPlatform() + id "dolly-proxies" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnav-brregstub-proxy" property "sonar.projectName", "testnav-brregstub-proxy" - property "sonar.sourceEncoding", "UTF-8" - } -} - -bootJar { - archiveFileName = "app.jar" -} - -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1' } } -repositories { - mavenCentral() - mavenLocal() -} - dependencies { - - implementation 'no.nav.testnav.libs:reactive-core' - implementation 'no.nav.testnav.libs:reactive-proxy' implementation 'no.nav.testnav.libs:data-transfer-objects' - - implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server' - implementation 'org.springframework.boot:spring-boot-starter-webflux' - - implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' - implementation 'org.springframework.cloud:spring-cloud-starter-gateway' - - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' - implementation 'org.hibernate.validator:hibernate-validator' - - testImplementation 'org.springframework.boot:spring-boot-starter-test' - testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' -} -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } } diff --git a/proxies/brregstub-proxy/settings.gradle b/proxies/brregstub-proxy/settings.gradle index e4d8f5a1350..d62fa6c4630 100644 --- a/proxies/brregstub-proxy/settings.gradle +++ b/proxies/brregstub-proxy/settings.gradle @@ -4,9 +4,10 @@ plugins { rootProject.name = 'brregstub-proxy' +includeBuild "../../plugins/java" -includeBuild '../../libs/reactive-core' includeBuild '../../libs/data-transfer-objects' +includeBuild '../../libs/reactive-core' includeBuild '../../libs/reactive-proxy' develocity { diff --git a/proxies/dokarkiv-proxy/build.gradle b/proxies/dokarkiv-proxy/build.gradle index 9a4b6390331..8af2a3da534 100644 --- a/proxies/dokarkiv-proxy/build.gradle +++ b/proxies/dokarkiv-proxy/build.gradle @@ -1,73 +1,18 @@ plugins { - id 'java' - id "org.sonarqube" version "5.0.0.4638" - id 'org.springframework.boot' version "3.2.6" - id 'io.spring.dependency-management' version '1.0.11.RELEASE' - id "jacoco" -} - -test { - useJUnitPlatform() + id "dolly-proxies" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnav-dokarkiv-proxy" property "sonar.projectName", "testnav-dokarkiv-proxy" - property "sonar.sourceEncoding", "UTF-8" } } -bootJar { - archiveFileName = "app.jar" -} - -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1' - } -} - -repositories { - mavenCentral() - mavenLocal() -} - dependencies { - - implementation 'no.nav.testnav.libs:security-core' - implementation 'no.nav.testnav.libs:reactive-core' - implementation 'no.nav.testnav.libs:reactive-proxy' - implementation 'no.nav.testnav.libs:reactive-security' - implementation 'no.nav.testnav.libs:data-transfer-objects' - - implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server' - implementation 'org.springframework.boot:spring-boot-starter-webflux' - - implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' - implementation 'org.springframework.cloud:spring-cloud-starter-gateway' - - - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' - implementation 'org.hibernate.validator:hibernate-validator' - - testImplementation 'org.springframework.boot:spring-boot-starter-test' - testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' - - annotationProcessor 'org.projectlombok:lombok' - implementation 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' -} -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } + implementation "no.nav.testnav.libs:data-transfer-objects" + implementation "no.nav.testnav.libs:reactive-security" + implementation "no.nav.testnav.libs:security-core" + implementation "org.springframework.boot:spring-boot-starter-webflux" + implementation "org.springframework.cloud:spring-cloud-starter-vault-config" } diff --git a/proxies/dokarkiv-proxy/settings.gradle b/proxies/dokarkiv-proxy/settings.gradle index 42e8c0c238d..67900969191 100644 --- a/proxies/dokarkiv-proxy/settings.gradle +++ b/proxies/dokarkiv-proxy/settings.gradle @@ -4,11 +4,13 @@ plugins { rootProject.name = 'dokarkiv-proxy' +includeBuild "../../plugins/java" + +includeBuild '../../libs/data-transfer-objects' includeBuild '../../libs/reactive-core' includeBuild '../../libs/reactive-proxy' -includeBuild '../../libs/security-core' includeBuild '../../libs/reactive-security' -includeBuild '../../libs/data-transfer-objects' +includeBuild '../../libs/security-core' develocity { buildScan { diff --git a/proxies/ereg-proxy/build.gradle b/proxies/ereg-proxy/build.gradle index 5dddd389be2..c6691217659 100644 --- a/proxies/ereg-proxy/build.gradle +++ b/proxies/ereg-proxy/build.gradle @@ -1,66 +1,14 @@ plugins { - id 'java' - id "org.sonarqube" version "5.0.0.4638" - id 'org.springframework.boot' version "3.2.6" - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" -} - -test { - useJUnitPlatform() + id "dolly-proxies" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnav-ereg-proxy" property "sonar.projectName", "testnav-ereg-proxy" - property "sonar.sourceEncoding", "UTF-8" - } -} - -bootJar { - archiveFileName = "app.jar" -} - -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1' } } -repositories { - mavenCentral() - mavenLocal() -} - dependencies { - - implementation 'no.nav.testnav.libs:reactive-core' - implementation 'no.nav.testnav.libs:reactive-proxy' - - implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server' - implementation 'org.springframework.boot:spring-boot-starter-webflux' implementation 'org.springframework.cloud:spring-cloud-starter-bootstrap' // TODO remove legacy bootstrap config - implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' - implementation 'org.springframework.cloud:spring-cloud-starter-gateway' - - - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' - implementation 'org.hibernate.validator:hibernate-validator' - - testImplementation 'org.springframework.boot:spring-boot-starter-test' - testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' -} -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } } diff --git a/proxies/ereg-proxy/settings.gradle b/proxies/ereg-proxy/settings.gradle index e2dbc9336c0..e9af2b16174 100644 --- a/proxies/ereg-proxy/settings.gradle +++ b/proxies/ereg-proxy/settings.gradle @@ -4,6 +4,7 @@ plugins { rootProject.name = 'ereg-proxy' +includeBuild "../../plugins/java" includeBuild '../../libs/reactive-core' includeBuild '../../libs/reactive-proxy' diff --git a/proxies/histark-proxy/build.gradle b/proxies/histark-proxy/build.gradle index 1ad1986ef3e..8f7add698c7 100644 --- a/proxies/histark-proxy/build.gradle +++ b/proxies/histark-proxy/build.gradle @@ -1,66 +1,14 @@ plugins { - id 'java' - id "org.sonarqube" version "5.0.0.4638" - id 'org.springframework.boot' version "3.2.6" - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" -} - -test { - useJUnitPlatform() + id "dolly-proxies" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnav-histark-proxy" property "sonar.projectName", "testnav-histark-proxy" - property "sonar.sourceEncoding", "UTF-8" - } -} -bootJar { - archiveFileName = "app.jar" -} - -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1' } } -repositories { - mavenCentral() - mavenLocal() -} - dependencies { - - implementation 'no.nav.testnav.libs:reactive-core' - implementation 'no.nav.testnav.libs:reactive-proxy' implementation 'no.nav.testnav.libs:data-transfer-objects' - - implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server' - implementation 'org.springframework.boot:spring-boot-starter-webflux' - - implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' - implementation 'org.springframework.cloud:spring-cloud-starter-gateway' - - - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' - implementation 'org.hibernate.validator:hibernate-validator' - - testImplementation 'org.springframework.boot:spring-boot-starter-test' - testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' -} -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } } diff --git a/proxies/histark-proxy/settings.gradle b/proxies/histark-proxy/settings.gradle index 3bf954de439..bc95d92dfa8 100644 --- a/proxies/histark-proxy/settings.gradle +++ b/proxies/histark-proxy/settings.gradle @@ -4,10 +4,11 @@ plugins { rootProject.name = 'histark-proxy' +includeBuild "../../plugins/java" +includeBuild '../../libs/data-transfer-objects' includeBuild '../../libs/reactive-core' includeBuild '../../libs/reactive-proxy' -includeBuild '../../libs/data-transfer-objects' develocity { buildScan { diff --git a/proxies/inntektstub-proxy/build.gradle b/proxies/inntektstub-proxy/build.gradle index 0022ee70a81..9eb49e640bc 100644 --- a/proxies/inntektstub-proxy/build.gradle +++ b/proxies/inntektstub-proxy/build.gradle @@ -1,66 +1,14 @@ plugins { - id 'java' - id "org.sonarqube" version "5.0.0.4638" - id 'org.springframework.boot' version "3.2.6" - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" -} - -test { - useJUnitPlatform() + id "dolly-proxies" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnav-inntektstub-proxy" property "sonar.projectName", "testnav-inntektstub-proxy" - property "sonar.sourceEncoding", "UTF-8" - } -} -bootJar { - archiveFileName = "app.jar" -} - -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1' } } -repositories { - mavenCentral() - mavenLocal() -} - dependencies { - - implementation 'no.nav.testnav.libs:reactive-core' - implementation 'no.nav.testnav.libs:reactive-proxy' implementation 'no.nav.testnav.libs:data-transfer-objects' - - implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server' - implementation 'org.springframework.boot:spring-boot-starter-webflux' - - implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' - implementation 'org.springframework.cloud:spring-cloud-starter-gateway' - - - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' - implementation 'org.hibernate.validator:hibernate-validator' - - testImplementation 'org.springframework.boot:spring-boot-starter-test' - testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' -} -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } } diff --git a/proxies/inntektstub-proxy/settings.gradle b/proxies/inntektstub-proxy/settings.gradle index 4876362e467..cbfbd25ac18 100644 --- a/proxies/inntektstub-proxy/settings.gradle +++ b/proxies/inntektstub-proxy/settings.gradle @@ -4,10 +4,11 @@ plugins { rootProject.name = 'inntektstub-proxy' +includeBuild "../../plugins/java" +includeBuild '../../libs/data-transfer-objects' includeBuild '../../libs/reactive-core' includeBuild '../../libs/reactive-proxy' -includeBuild '../../libs/data-transfer-objects' develocity { buildScan { diff --git a/proxies/inst-proxy/build.gradle b/proxies/inst-proxy/build.gradle index f09ffa9d631..118496766d2 100644 --- a/proxies/inst-proxy/build.gradle +++ b/proxies/inst-proxy/build.gradle @@ -1,70 +1,16 @@ plugins { - id 'java' - id "org.sonarqube" version "5.0.0.4638" - id 'org.springframework.boot' version "3.2.6" - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" -} - -test { - useJUnitPlatform() + id "dolly-proxies" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnav-inst-proxy" property "sonar.projectName", "testnav-inst-proxy" - property "sonar.sourceEncoding", "UTF-8" - } -} - -bootJar { - archiveFileName = "app.jar" -} - -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1' } } -repositories { - mavenCentral() - mavenLocal() -} - dependencies { - implementation 'no.nav.testnav.libs:security-core' - implementation 'no.nav.testnav.libs:reactive-core' - implementation 'no.nav.testnav.libs:reactive-proxy' implementation 'no.nav.testnav.libs:data-transfer-objects' implementation 'no.nav.testnav.libs:reactive-security' - - implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server' - implementation 'org.springframework.boot:spring-boot-starter-webflux' - implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' - implementation 'org.springframework.cloud:spring-cloud-starter-gateway' - - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' - implementation 'org.hibernate.validator:hibernate-validator' - - annotationProcessor 'org.projectlombok:lombok' - implementation 'org.projectlombok:lombok' - - testImplementation 'org.springframework.boot:spring-boot-starter-test' - testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' -} -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } } \ No newline at end of file diff --git a/proxies/inst-proxy/settings.gradle b/proxies/inst-proxy/settings.gradle index 1d831e8cc34..c45b408e9f9 100644 --- a/proxies/inst-proxy/settings.gradle +++ b/proxies/inst-proxy/settings.gradle @@ -4,12 +4,13 @@ plugins { rootProject.name = 'inst-proxy' +includeBuild "../../plugins/java" -includeBuild '../../libs/security-core' +includeBuild '../../libs/data-transfer-objects' includeBuild '../../libs/reactive-core' includeBuild '../../libs/reactive-proxy' includeBuild '../../libs/reactive-security' -includeBuild '../../libs/data-transfer-objects' +includeBuild '../../libs/security-core' develocity { buildScan { diff --git a/proxies/kontoregister-person-proxy/build.gradle b/proxies/kontoregister-person-proxy/build.gradle index 9d82da61997..fc7754f76fd 100644 --- a/proxies/kontoregister-person-proxy/build.gradle +++ b/proxies/kontoregister-person-proxy/build.gradle @@ -1,72 +1,18 @@ plugins { - id 'java' - id "org.sonarqube" version "5.0.0.4638" - id 'org.springframework.boot' version "3.2.6" - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" -} - -test { - useJUnitPlatform() + id "dolly-proxies" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnav-kontoregister-person-proxy" property "sonar.projectName", "testnav-kontoregister-person-proxy" - property "sonar.sourceEncoding", "UTF-8" - } -} -bootJar { - archiveFileName = "app.jar" -} - -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1' } } -repositories { - mavenCentral() - mavenLocal() -} - dependencies { - - implementation 'no.nav.testnav.libs:security-core' - implementation 'no.nav.testnav.libs:reactive-core' - implementation 'no.nav.testnav.libs:reactive-proxy' - implementation 'no.nav.testnav.libs:reactive-security' - implementation 'no.nav.testnav.libs:data-transfer-objects' - - implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server' - implementation 'org.springframework.boot:spring-boot-starter-webflux' - - implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' - implementation 'org.springframework.cloud:spring-cloud-starter-gateway' - - - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' - implementation 'org.hibernate.validator:hibernate-validator' - - testImplementation 'org.springframework.boot:spring-boot-starter-test' - testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' - - annotationProcessor 'org.projectlombok:lombok' - implementation 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' -} -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } + implementation "no.nav.testnav.libs:data-transfer-objects" + implementation "no.nav.testnav.libs:reactive-security" + implementation "no.nav.testnav.libs:security-core" + implementation "org.springframework.boot:spring-boot-starter-webflux" + implementation "org.springframework.cloud:spring-cloud-starter-vault-config" } diff --git a/proxies/kontoregister-person-proxy/settings.gradle b/proxies/kontoregister-person-proxy/settings.gradle index 858370e65a0..308e11806f5 100644 --- a/proxies/kontoregister-person-proxy/settings.gradle +++ b/proxies/kontoregister-person-proxy/settings.gradle @@ -4,12 +4,13 @@ plugins { rootProject.name = 'kontoregister-person-proxy' +includeBuild "../../plugins/java" +includeBuild '../../libs/data-transfer-objects' includeBuild '../../libs/reactive-core' includeBuild '../../libs/reactive-proxy' -includeBuild '../../libs/security-core' includeBuild '../../libs/reactive-security' -includeBuild '../../libs/data-transfer-objects' +includeBuild '../../libs/security-core' develocity { buildScan { diff --git a/proxies/krrstub-proxy/build.gradle b/proxies/krrstub-proxy/build.gradle index aa0ceba8adb..1efccd36a7e 100644 --- a/proxies/krrstub-proxy/build.gradle +++ b/proxies/krrstub-proxy/build.gradle @@ -1,71 +1,17 @@ plugins { - id 'java' - id "org.sonarqube" version "5.0.0.4638" - id 'org.springframework.boot' version "3.2.6" - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" -} - -test { - useJUnitPlatform() + id "dolly-proxies" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnav-krrstub-proxy" property "sonar.projectName", "testnav-krrstub-proxy" - property "sonar.sourceEncoding", "UTF-8" - } -} -bootJar { - archiveFileName = "app.jar" -} - -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1' } } -repositories { - mavenCentral() - mavenLocal() -} - dependencies { - - implementation 'no.nav.testnav.libs:security-core' - implementation 'no.nav.testnav.libs:reactive-core' - implementation 'no.nav.testnav.libs:reactive-proxy' - implementation 'no.nav.testnav.libs:reactive-security' - - implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server' - implementation 'org.springframework.boot:spring-boot-starter-webflux' - - implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' - implementation 'org.springframework.cloud:spring-cloud-starter-gateway' - - - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' - implementation 'org.hibernate.validator:hibernate-validator' - - testImplementation 'org.springframework.boot:spring-boot-starter-test' - testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' - - annotationProcessor 'org.projectlombok:lombok' - implementation 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' -} -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } + implementation "no.nav.testnav.libs:reactive-security" + implementation "no.nav.testnav.libs:security-core" + implementation "org.springframework.boot:spring-boot-starter-webflux" + implementation "org.springframework.cloud:spring-cloud-starter-vault-config" } diff --git a/proxies/krrstub-proxy/settings.gradle b/proxies/krrstub-proxy/settings.gradle index f85d04c3a5e..c78c01fb986 100644 --- a/proxies/krrstub-proxy/settings.gradle +++ b/proxies/krrstub-proxy/settings.gradle @@ -4,11 +4,12 @@ plugins { rootProject.name = 'krrstub-proxy' +includeBuild "../../plugins/java" includeBuild '../../libs/reactive-core' includeBuild '../../libs/reactive-proxy' -includeBuild '../../libs/security-core' includeBuild '../../libs/reactive-security' +includeBuild '../../libs/security-core' develocity { buildScan { diff --git a/proxies/medl-proxy/build.gradle b/proxies/medl-proxy/build.gradle index 20046c06ab6..5ca42ccd62f 100644 --- a/proxies/medl-proxy/build.gradle +++ b/proxies/medl-proxy/build.gradle @@ -1,71 +1,17 @@ plugins { - id 'java' - id "org.sonarqube" version "5.0.0.4638" - id 'org.springframework.boot' version "3.2.6" - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" -} - -test { - useJUnitPlatform() + id "dolly-proxies" } sonarqube { properties { - property "sonar.sourceEncoding", "UTF-8" property "sonar.projectKey", "testnav-medl-proxy" property "sonar.projectName", "testnav-medl-proxy" - property "sonar.organization", "navikt" - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.project.monorepo.enabled", true - } -} -bootJar { - archiveFileName = "app.jar" -} - -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1' } } -repositories { - mavenCentral() - mavenLocal() -} - dependencies { - - implementation 'no.nav.testnav.libs:security-core' - implementation 'no.nav.testnav.libs:reactive-core' - implementation 'no.nav.testnav.libs:reactive-proxy' - implementation 'no.nav.testnav.libs:reactive-security' - - implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server' - implementation 'org.springframework.boot:spring-boot-starter-webflux' - - implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' - implementation 'org.springframework.cloud:spring-cloud-starter-gateway' - - - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' - implementation 'org.hibernate.validator:hibernate-validator' - - testImplementation 'org.springframework.boot:spring-boot-starter-test' - testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' - - annotationProcessor 'org.projectlombok:lombok' - implementation 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' -} -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } + implementation "no.nav.testnav.libs:reactive-security" + implementation "no.nav.testnav.libs:security-core" + implementation "org.springframework.boot:spring-boot-starter-webflux" + implementation "org.springframework.cloud:spring-cloud-starter-vault-config" } diff --git a/proxies/medl-proxy/settings.gradle b/proxies/medl-proxy/settings.gradle index bb438579e70..e59a1fa89e2 100644 --- a/proxies/medl-proxy/settings.gradle +++ b/proxies/medl-proxy/settings.gradle @@ -4,11 +4,12 @@ plugins { rootProject.name = 'medl-proxy' +includeBuild "../../plugins/java" includeBuild '../../libs/reactive-core' includeBuild '../../libs/reactive-proxy' -includeBuild '../../libs/security-core' includeBuild '../../libs/reactive-security' +includeBuild '../../libs/security-core' develocity { buildScan { diff --git a/proxies/modapp-ereg-proxy/build.gradle b/proxies/modapp-ereg-proxy/build.gradle index 095366f635b..329955971cd 100644 --- a/proxies/modapp-ereg-proxy/build.gradle +++ b/proxies/modapp-ereg-proxy/build.gradle @@ -1,71 +1,15 @@ plugins { - id 'java' - id "org.sonarqube" version "5.0.0.4638" - id 'org.springframework.boot' version "3.2.6" - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" -} - -test { - useJUnitPlatform() + id "dolly-proxies" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnav-modapp-ereg-proxy" property "sonar.projectName", "testnav-modapp-ereg-proxy" - property "sonar.sourceEncoding", "UTF-8" - } -} -bootJar { - archiveFileName = "app.jar" -} - -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1' } } -repositories { - mavenCentral() - mavenLocal() -} - dependencies { - implementation 'no.nav.testnav.libs:security-core' - implementation 'no.nav.testnav.libs:reactive-core' - implementation 'no.nav.testnav.libs:reactive-proxy' implementation 'no.nav.testnav.libs:reactive-security' - - implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server' - implementation 'org.springframework.boot:spring-boot-starter-webflux' - - implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' - implementation 'org.springframework.cloud:spring-cloud-starter-gateway' - - - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' - implementation 'org.hibernate.validator:hibernate-validator' - - testImplementation 'org.springframework.boot:spring-boot-starter-test' - testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' - - annotationProcessor 'org.projectlombok:lombok' - implementation 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' -} -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } } diff --git a/proxies/modapp-ereg-proxy/settings.gradle b/proxies/modapp-ereg-proxy/settings.gradle index 6e1b87dfcf5..0cbbadb0020 100644 --- a/proxies/modapp-ereg-proxy/settings.gradle +++ b/proxies/modapp-ereg-proxy/settings.gradle @@ -4,11 +4,12 @@ plugins { rootProject.name = 'modapp-ereg-proxy' +includeBuild "../../plugins/java" includeBuild '../../libs/reactive-core' includeBuild '../../libs/reactive-proxy' -includeBuild '../../libs/security-core' includeBuild '../../libs/reactive-security' +includeBuild '../../libs/security-core' develocity { buildScan { diff --git a/proxies/norg2-proxy/build.gradle b/proxies/norg2-proxy/build.gradle index d49d5278547..270390b7e8f 100644 --- a/proxies/norg2-proxy/build.gradle +++ b/proxies/norg2-proxy/build.gradle @@ -1,66 +1,16 @@ plugins { - id 'java' - id "org.sonarqube" version "5.0.0.4638" - id 'org.springframework.boot' version "3.2.6" - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" -} - -test { - useJUnitPlatform() + id "dolly-proxies" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnav-norg2-proxy" property "sonar.projectName", "testnav-norg2-proxy" - property "sonar.sourceEncoding", "UTF-8" } } -bootJar { - archiveFileName = "app.jar" -} - -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1' - } -} - -repositories { - mavenCentral() - mavenLocal() -} dependencies { - - implementation 'no.nav.testnav.libs:reactive-core' - implementation 'no.nav.testnav.libs:reactive-proxy' implementation 'no.nav.testnav.libs:data-transfer-objects' - implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server' - implementation 'org.springframework.boot:spring-boot-starter-webflux' implementation 'org.springframework.cloud:spring-cloud-starter-bootstrap' // TODO remove legacy bootstrap config - implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' - implementation 'org.springframework.cloud:spring-cloud-starter-gateway' - - - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' - implementation 'org.hibernate.validator:hibernate-validator' - - testImplementation 'org.springframework.boot:spring-boot-starter-test' - testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' -} -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } } diff --git a/proxies/norg2-proxy/settings.gradle b/proxies/norg2-proxy/settings.gradle index c7c427ab008..5a5b5daafb2 100644 --- a/proxies/norg2-proxy/settings.gradle +++ b/proxies/norg2-proxy/settings.gradle @@ -4,10 +4,11 @@ plugins { rootProject.name = 'norg2-proxy' +includeBuild "../../plugins/java" +includeBuild '../../libs/data-transfer-objects' includeBuild '../../libs/reactive-core' includeBuild '../../libs/reactive-proxy' -includeBuild '../../libs/data-transfer-objects' develocity { buildScan { diff --git a/proxies/pdl-proxy/build.gradle b/proxies/pdl-proxy/build.gradle index 0ac8c44103f..25af4e6c02a 100644 --- a/proxies/pdl-proxy/build.gradle +++ b/proxies/pdl-proxy/build.gradle @@ -1,72 +1,19 @@ plugins { - id 'java' - id "org.sonarqube" version "5.0.0.4638" - id 'org.springframework.boot' version "3.2.6" - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" -} - -test { - useJUnitPlatform() + id "dolly-proxies" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnav-pdl-proxy" property "sonar.projectName", "testnav-pdl-proxy" - property "sonar.sourceEncoding", "UTF-8" - } -} -bootJar { - archiveFileName = "app.jar" -} - -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1' } } -repositories { - mavenCentral() - mavenLocal() -} - dependencies { - - implementation 'no.nav.testnav.libs:security-core' - implementation 'no.nav.testnav.libs:reactive-core' - implementation 'no.nav.testnav.libs:reactive-proxy' - implementation 'no.nav.testnav.libs:reactive-security' - implementation 'no.nav.testnav.libs:data-transfer-objects' - - implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server' - implementation 'org.springframework.boot:spring-boot-starter-webflux' - implementation 'org.springframework.cloud:spring-cloud-starter-bootstrap' // TODO remove legacy bootstrap config. - implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' - implementation 'org.springframework.cloud:spring-cloud-starter-gateway' - - - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' - implementation 'org.hibernate.validator:hibernate-validator' - - testImplementation 'org.springframework.boot:spring-boot-starter-test' - testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' - - implementation 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' -} -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } + implementation "no.nav.testnav.libs:data-transfer-objects" + implementation "no.nav.testnav.libs:reactive-security" + implementation "no.nav.testnav.libs:security-core" + implementation "org.springframework.boot:spring-boot-starter-webflux" + implementation "org.springframework.cloud:spring-cloud-starter-bootstrap" // TODO remove legacy bootstrap config. + implementation "org.springframework.cloud:spring-cloud-starter-vault-config" } diff --git a/proxies/pdl-proxy/config.yml b/proxies/pdl-proxy/config.yml index 323e598ede3..fd0abde46da 100644 --- a/proxies/pdl-proxy/config.yml +++ b/proxies/pdl-proxy/config.yml @@ -58,6 +58,8 @@ spec: cluster: dev-gcp - application: testnav-tenor-search-service cluster: dev-gcp + - application: testnav-levende-arbeidsforhold-ansettelse + cluster: dev-gcp outbound: rules: - application: pdl-testdata diff --git a/proxies/pdl-proxy/settings.gradle b/proxies/pdl-proxy/settings.gradle index 6b78346bf9f..a1b491845af 100644 --- a/proxies/pdl-proxy/settings.gradle +++ b/proxies/pdl-proxy/settings.gradle @@ -4,11 +4,13 @@ plugins { rootProject.name = 'pdl-proxy' -includeBuild '../../libs/security-core' +includeBuild "../../plugins/java" + includeBuild '../../libs/data-transfer-objects' includeBuild '../../libs/reactive-core' includeBuild '../../libs/reactive-proxy' includeBuild '../../libs/reactive-security' +includeBuild '../../libs/security-core' develocity { buildScan { diff --git a/proxies/pensjon-testdata-facade-proxy/build.gradle b/proxies/pensjon-testdata-facade-proxy/build.gradle index dba4d691a91..2878fc888db 100644 --- a/proxies/pensjon-testdata-facade-proxy/build.gradle +++ b/proxies/pensjon-testdata-facade-proxy/build.gradle @@ -1,72 +1,18 @@ plugins { - id 'java' - id "org.sonarqube" version "5.0.0.4638" - id 'org.springframework.boot' version "3.2.6" - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" -} - -test { - useJUnitPlatform() + id "dolly-proxies" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnav-pensjon-testdata-facade-proxy" property "sonar.projectName", "testnav-pensjon-testdata-facade-proxy" - property "sonar.sourceEncoding", "UTF-8" - } -} -bootJar { - archiveFileName = "app.jar" -} - -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1' } } -repositories { - mavenCentral() - mavenLocal() -} - dependencies { - - implementation 'no.nav.testnav.libs:security-core' - implementation 'no.nav.testnav.libs:reactive-core' - implementation 'no.nav.testnav.libs:reactive-proxy' - implementation 'no.nav.testnav.libs:reactive-security' - implementation 'no.nav.testnav.libs:data-transfer-objects' - - implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server' - implementation 'org.springframework.boot:spring-boot-starter-webflux' - - implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' - implementation 'org.springframework.cloud:spring-cloud-starter-gateway' - - - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' - implementation 'org.hibernate.validator:hibernate-validator' - - testImplementation 'org.springframework.boot:spring-boot-starter-test' - testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' - - implementation 'org.projectlombok:lombok' - annotationProcessor 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' -} -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } + implementation "no.nav.testnav.libs:data-transfer-objects" + implementation "no.nav.testnav.libs:reactive-security" + implementation "no.nav.testnav.libs:security-core" + implementation "org.springframework.boot:spring-boot-starter-webflux" + implementation "org.springframework.cloud:spring-cloud-starter-vault-config" } diff --git a/proxies/pensjon-testdata-facade-proxy/settings.gradle b/proxies/pensjon-testdata-facade-proxy/settings.gradle index 7ef3a7a29fc..4f1d9f4f7fa 100644 --- a/proxies/pensjon-testdata-facade-proxy/settings.gradle +++ b/proxies/pensjon-testdata-facade-proxy/settings.gradle @@ -4,12 +4,13 @@ plugins { rootProject.name = 'pensjon-testdata-facade-proxy' +includeBuild "../../plugins/java" +includeBuild '../../libs/data-transfer-objects' includeBuild '../../libs/reactive-core' includeBuild '../../libs/reactive-proxy' -includeBuild '../../libs/security-core' includeBuild '../../libs/reactive-security' -includeBuild '../../libs/data-transfer-objects' +includeBuild '../../libs/security-core' develocity { buildScan { diff --git a/proxies/saf-proxy/build.gradle b/proxies/saf-proxy/build.gradle index a778eaa8c7d..21e34da52ab 100644 --- a/proxies/saf-proxy/build.gradle +++ b/proxies/saf-proxy/build.gradle @@ -1,72 +1,16 @@ plugins { - id 'java' - id "org.sonarqube" version "5.0.0.4638" - id 'org.springframework.boot' version "3.2.6" - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" -} - -test { - useJUnitPlatform() + id "dolly-proxies" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnav-saf-proxy" property "sonar.projectName", "testnav-saf-proxy" - property "sonar.sourceEncoding", "UTF-8" - } -} -bootJar { - archiveFileName = "app.jar" -} - -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1' } } -repositories { - mavenCentral() - mavenLocal() -} - dependencies { - implementation 'no.nav.testnav.libs:security-core' - implementation 'no.nav.testnav.libs:reactive-core' - implementation 'no.nav.testnav.libs:reactive-proxy' implementation 'no.nav.testnav.libs:reactive-security' implementation 'no.nav.testnav.libs:data-transfer-objects' - - implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server' - implementation 'org.springframework.boot:spring-boot-starter-webflux' - - implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' - implementation 'org.springframework.cloud:spring-cloud-starter-gateway' - - - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' - implementation 'org.hibernate.validator:hibernate-validator' - - testImplementation 'org.springframework.boot:spring-boot-starter-test' - testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' - - annotationProcessor 'org.projectlombok:lombok' - implementation 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' -} -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } } diff --git a/proxies/saf-proxy/settings.gradle b/proxies/saf-proxy/settings.gradle index 62d62463c5f..c9a953f65f9 100644 --- a/proxies/saf-proxy/settings.gradle +++ b/proxies/saf-proxy/settings.gradle @@ -4,12 +4,13 @@ plugins { rootProject.name = 'saf-proxy' +includeBuild "../../plugins/java" +includeBuild '../../libs/data-transfer-objects' includeBuild '../../libs/reactive-core' includeBuild '../../libs/reactive-proxy' -includeBuild '../../libs/security-core' includeBuild '../../libs/reactive-security' -includeBuild '../../libs/data-transfer-objects' +includeBuild '../../libs/security-core' develocity { buildScan { diff --git a/proxies/sigrunstub-proxy/build.gradle b/proxies/sigrunstub-proxy/build.gradle index cba116b6582..c04eb27cc23 100644 --- a/proxies/sigrunstub-proxy/build.gradle +++ b/proxies/sigrunstub-proxy/build.gradle @@ -1,65 +1,14 @@ plugins { - id 'java' - id "org.sonarqube" version "5.0.0.4638" - id 'org.springframework.boot' version "3.2.6" - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" -} - -test { - useJUnitPlatform() + id "dolly-proxies" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnav-sigrunstub-proxy" property "sonar.projectName", "testnav-sigrunstub-proxy" - property "sonar.sourceEncoding", "UTF-8" - } -} -bootJar { - archiveFileName = "app.jar" -} - -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1' } } -repositories { - mavenCentral() - mavenLocal() -} - dependencies { - - implementation 'no.nav.testnav.libs:reactive-core' - implementation 'no.nav.testnav.libs:reactive-proxy' implementation 'no.nav.testnav.libs:data-transfer-objects' - - implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server' - implementation 'org.springframework.boot:spring-boot-starter-webflux' - - implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' - implementation 'org.springframework.cloud:spring-cloud-starter-gateway' - - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' - implementation 'org.hibernate.validator:hibernate-validator' - - testImplementation 'org.springframework.boot:spring-boot-starter-test' - testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' -} -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } } diff --git a/proxies/sigrunstub-proxy/settings.gradle b/proxies/sigrunstub-proxy/settings.gradle index a5b701b492f..f932ff84792 100644 --- a/proxies/sigrunstub-proxy/settings.gradle +++ b/proxies/sigrunstub-proxy/settings.gradle @@ -4,10 +4,11 @@ plugins { rootProject.name = 'sigrunstub-proxy' +includeBuild "../../plugins/java" +includeBuild '../../libs/data-transfer-objects' includeBuild '../../libs/reactive-core' includeBuild '../../libs/reactive-proxy' -includeBuild '../../libs/data-transfer-objects' develocity { buildScan { diff --git a/proxies/skjermingsregister-proxy/build.gradle b/proxies/skjermingsregister-proxy/build.gradle index 1ba2ac69875..920b573d608 100644 --- a/proxies/skjermingsregister-proxy/build.gradle +++ b/proxies/skjermingsregister-proxy/build.gradle @@ -1,73 +1,18 @@ plugins { - id 'java' - id "org.sonarqube" version "5.0.0.4638" - id 'org.springframework.boot' version "3.2.6" - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" -} - -test { - useJUnitPlatform() + id "dolly-proxies" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.login", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnav-skjermingsregister-proxy" property "sonar.projectName", "testnav-skjermingsregister-proxy" - property "sonar.sourceEncoding", "UTF-8" - } -} - -bootJar { - archiveFileName = "app.jar" -} - -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1' } } -repositories { - mavenCentral() - mavenLocal() -} - dependencies { - implementation 'no.nav.testnav.libs:security-core' - implementation 'no.nav.testnav.libs:reactive-core' - implementation 'no.nav.testnav.libs:reactive-proxy' implementation 'no.nav.testnav.libs:reactive-security' implementation 'no.nav.testnav.libs:data-transfer-objects' - implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server' - implementation 'org.springframework.boot:spring-boot-starter-webflux' - - implementation 'org.springframework.cloud:spring-cloud-starter-gateway' - - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' - implementation 'org.hibernate.validator:hibernate-validator' - - testImplementation 'org.springframework.boot:spring-boot-starter-test' - testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' testImplementation 'org.springframework.security:spring-security-test' - - annotationProcessor 'org.projectlombok:lombok' - implementation 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' -} - -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } } diff --git a/proxies/skjermingsregister-proxy/settings.gradle b/proxies/skjermingsregister-proxy/settings.gradle index 46db687b832..2e2c0d9128d 100644 --- a/proxies/skjermingsregister-proxy/settings.gradle +++ b/proxies/skjermingsregister-proxy/settings.gradle @@ -4,11 +4,12 @@ plugins { rootProject.name = 'skjermingsregister-proxy' +includeBuild "../../plugins/java" +includeBuild '../../libs/data-transfer-objects' includeBuild '../../libs/reactive-core' includeBuild '../../libs/reactive-proxy' includeBuild '../../libs/security-token-service' -includeBuild '../../libs/data-transfer-objects' develocity { buildScan { diff --git a/proxies/synthdata-meldekort-proxy/build.gradle b/proxies/synthdata-meldekort-proxy/build.gradle index 0d86e0ece22..2ae52b3d2af 100644 --- a/proxies/synthdata-meldekort-proxy/build.gradle +++ b/proxies/synthdata-meldekort-proxy/build.gradle @@ -1,77 +1,24 @@ plugins { - id 'java' - id "org.sonarqube" version "5.0.0.4638" - id 'org.springframework.boot' version "3.2.6" - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" -} - -test { - useJUnitPlatform() + id "dolly-proxies" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnav-synthdata-meldekort-proxy" property "sonar.projectName", "testnav-synthdata-meldekort-proxy" - property "sonar.sourceEncoding", "UTF-8" - } -} -bootJar { - archiveFileName = "app.jar" -} - -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1' } } configurations { configureEach { - exclude group: 'org.springframework.boot', module: 'spring-boot-starter-actuator' + exclude group: "org.springframework.boot", module: "spring-boot-starter-actuator" } } -repositories { - mavenCentral() - mavenLocal() -} - dependencies { - - implementation 'no.nav.testnav.libs:security-core' - implementation 'no.nav.testnav.libs:reactive-core' - implementation 'no.nav.testnav.libs:reactive-proxy' - implementation 'no.nav.testnav.libs:reactive-security' - implementation 'no.nav.testnav.libs:data-transfer-objects' - - implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server' - implementation 'org.springframework.boot:spring-boot-starter-webflux' - implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' - implementation 'org.springframework.cloud:spring-cloud-starter-gateway' - - - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' - implementation 'org.hibernate.validator:hibernate-validator' - - testImplementation 'org.springframework.boot:spring-boot-starter-test' - testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' - - annotationProcessor 'org.projectlombok:lombok' - implementation 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' -} -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } + implementation "no.nav.testnav.libs:data-transfer-objects" + implementation "no.nav.testnav.libs:reactive-security" + implementation "no.nav.testnav.libs:security-core" + implementation "org.springframework.boot:spring-boot-starter-webflux" + implementation "org.springframework.cloud:spring-cloud-starter-vault-config" } \ No newline at end of file diff --git a/proxies/synthdata-meldekort-proxy/settings.gradle b/proxies/synthdata-meldekort-proxy/settings.gradle index 137c4a11356..51a14287d37 100644 --- a/proxies/synthdata-meldekort-proxy/settings.gradle +++ b/proxies/synthdata-meldekort-proxy/settings.gradle @@ -4,12 +4,13 @@ plugins { rootProject.name = 'synthdata-meldekort-proxy' +includeBuild "../../plugins/java" +includeBuild '../../libs/data-transfer-objects' includeBuild '../../libs/reactive-core' includeBuild '../../libs/reactive-proxy' -includeBuild '../../libs/security-core' includeBuild '../../libs/reactive-security' -includeBuild '../../libs/data-transfer-objects' +includeBuild '../../libs/security-core' develocity { buildScan { diff --git a/proxies/udistub-proxy/build.gradle b/proxies/udistub-proxy/build.gradle index 3daffc90326..9fc11aa32fc 100644 --- a/proxies/udistub-proxy/build.gradle +++ b/proxies/udistub-proxy/build.gradle @@ -1,73 +1,18 @@ plugins { - id 'java' - id "org.sonarqube" version "5.0.0.4638" - id 'org.springframework.boot' version "3.2.6" - id 'io.spring.dependency-management' version "1.1.5" - id "jacoco" -} - -test { - useJUnitPlatform() + id "dolly-proxies" } sonarqube { properties { - property "sonar.dynamicAnalysis", "reuseReports" - property "sonar.host.url", "https://sonarcloud.io" - property "sonar.java.coveragePlugin", "jacoco" - property "sonar.language", "java" - property "sonar.token", System.getenv("SONAR_TOKEN") - property "sonar.organization", "navikt" - property "sonar.project.monorepo.enabled", true property "sonar.projectKey", "testnav-udistub-proxy" property "sonar.projectName", "testnav-udistub-proxy" - property "sonar.sourceEncoding", "UTF-8" - } -} - -bootJar { - archiveFileName = "app.jar" -} - -dependencyManagement { - applyMavenExclusions = false - imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.1' } } -repositories { - mavenCentral() - mavenLocal() -} - dependencies { - implementation 'no.nav.testnav.libs:security-core' - implementation 'no.nav.testnav.libs:reactive-core' - implementation 'no.nav.testnav.libs:reactive-proxy' implementation 'no.nav.testnav.libs:reactive-security' implementation 'no.nav.testnav.libs:data-transfer-objects' - implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server' - implementation 'org.springframework.boot:spring-boot-starter-webflux' implementation 'org.springframework.cloud:spring-cloud-starter-bootstrap' // TODO remove legacy bootstrap config - implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' - implementation 'org.springframework.cloud:spring-cloud-starter-gateway' - - - implementation 'net.logstash.logback:logstash-logback-encoder:7.4' - implementation 'org.hibernate.validator:hibernate-validator' - - testImplementation 'org.springframework.boot:spring-boot-starter-test' - testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' - - annotationProcessor 'org.projectlombok:lombok' - implementation 'org.projectlombok:lombok' - testAnnotationProcessor 'org.projectlombok:lombok' -} -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } } diff --git a/proxies/udistub-proxy/settings.gradle b/proxies/udistub-proxy/settings.gradle index 9a60f8f83c5..0c5fe7eb36a 100644 --- a/proxies/udistub-proxy/settings.gradle +++ b/proxies/udistub-proxy/settings.gradle @@ -4,12 +4,13 @@ plugins { rootProject.name = 'udistub-proxy' +includeBuild "../../plugins/java" +includeBuild '../../libs/data-transfer-objects' includeBuild '../../libs/reactive-core' includeBuild '../../libs/reactive-proxy' -includeBuild '../../libs/security-core' includeBuild '../../libs/reactive-security' -includeBuild '../../libs/data-transfer-objects' +includeBuild '../../libs/security-core' develocity { buildScan { diff --git a/xsd/arbeidsforhold-xsd/build.gradle b/xsd/arbeidsforhold-xsd/build.gradle index 8f5ae356516..c5174f16d0d 100644 --- a/xsd/arbeidsforhold-xsd/build.gradle +++ b/xsd/arbeidsforhold-xsd/build.gradle @@ -1,6 +1,6 @@ plugins { - id "org.sonarqube" version "5.0.0.4638" - id 'java-library' + id "dolly-libs" + id 'com.github.edeandrea.xjc-generation' version '1.6' } @@ -10,24 +10,13 @@ sonarqube { group = 'no.nav.testnav.xsd' -repositories { - mavenCentral() - mavenLocal() -} - -java { - toolchain { - languageVersion = JavaLanguageVersion.of(21) - } -} - dependencies { - implementation 'jakarta.activation:jakarta.activation-api:2.1.3' - implementation 'jakarta.xml.bind:jakarta.xml.bind-api:4.0.2' + implementation "jakarta.activation:jakarta.activation-api:$versions.jakartaActivation" + implementation "jakarta.xml.bind:jakarta.xml.bind-api:$versions.jakartaXmlBindApi" - xjc 'jakarta.xml.bind:jakarta.xml.bind-api:4.0.2' + xjc "jakarta.xml.bind:jakarta.xml.bind-api:$versions.jakartaXmlBindApi" xjc 'org.glassfish.jaxb:jaxb-xjc:4.0.5' - xjc 'com.sun.xml.bind:jaxb-impl:4.0.5' + xjc "com.sun.xml.bind:jaxb-impl:$versions.jaxb" xjc 'com.sun.istack:istack-commons-runtime:4.2.0' } diff --git a/xsd/arbeidsforhold-xsd/settings.gradle b/xsd/arbeidsforhold-xsd/settings.gradle index 0a345fb24f3..7a53de06949 100644 --- a/xsd/arbeidsforhold-xsd/settings.gradle +++ b/xsd/arbeidsforhold-xsd/settings.gradle @@ -4,6 +4,7 @@ plugins { rootProject.name = 'arbeidsforhold-xsd' +includeBuild "../../plugins/java" develocity { buildScan {