Skip to content

Commit ec742d7

Browse files
committed
Legg til jar task for fritekstAvslag
1 parent 716a86e commit ec742d7

File tree

5 files changed

+47
-0
lines changed

5 files changed

+47
-0
lines changed

client/build.gradle.kts

+11
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,15 @@ dependencies {
3535
implementation(rootProject.libs.cxf.rt.ws.security) {
3636
// https://security.snyk.io/vuln/SNYK-JAVA-ORGAPACHEVELOCITY-3116414
3737
exclude(group = "org.apache.velocity")
38+
exclude(group = "org.bouncycastle", module = "bcprov-jdk15on")
3839
}
3940
implementation("javax.xml.ws:jaxws-api:2.3.1")
4041
implementation("javax.jws:javax.jws-api:1.1")
4142
// Fails to find SAAJMetaFactoryImpl when either missing or if you upgrade to 2.0.0
4243
implementation("com.sun.xml.messaging.saaj:saaj-impl:1.5.2")
4344
implementation("com.nimbusds:nimbus-jose-jwt:9.37.3")
45+
// We exclude jdk15on because of security issues. We use jdk18on instead.
46+
implementation("org.bouncycastle:bcprov-jdk18on:1.77")
4447

4548
testImplementation(project(":test-common"))
4649
implementation(rootProject.libs.wiremock) {
@@ -63,3 +66,11 @@ configure<SourceSetContainer> {
6366
java.srcDir(wsdl2javaDir.map { it.asFile })
6467
}
6568
}
69+
70+
configurations {
71+
all {
72+
// Ref dependabot PR 8 - https://github.com/navikt/su-se-bakover/security/dependabot/1 https://github.com/advisories/GHSA-6xx3-rg99-gc3p https://github.com/navikt/su-se-bakover/security/dependabot/8 https://github.com/advisories/GHSA-hr8g-6v94-x4m9
73+
// We exclude this and include jdk18on instead.
74+
exclude(group = "org.bouncycastle", module = "bcprov-jdk15on")
75+
}
76+
}

common/infrastructure/cxf/build.gradle.kts

+11
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,20 @@ dependencies {
88
implementation(rootProject.libs.cxf.rt.ws.security) {
99
// https://security.snyk.io/vuln/SNYK-JAVA-ORGAPACHEVELOCITY-3116414
1010
exclude(group = "org.apache.velocity")
11+
exclude(group = "org.bouncycastle", module = "bcprov-jdk15on")
1112
}
13+
// We exclude jdk15on because of security issues. We use jdk18on instead.
14+
implementation("org.bouncycastle:bcprov-jdk18on:1.77")
1215
}
1316

1417
tasks.named<Jar>("jar") {
1518
archiveBaseName.set("common-infrastructure-cxf")
1619
}
20+
21+
configurations {
22+
all {
23+
// Ref dependabot PR 8 - https://github.com/navikt/su-se-bakover/security/dependabot/1 https://github.com/advisories/GHSA-6xx3-rg99-gc3p https://github.com/navikt/su-se-bakover/security/dependabot/8 https://github.com/advisories/GHSA-hr8g-6v94-x4m9
24+
// We exclude this and include jdk18on instead.
25+
exclude(group = "org.bouncycastle", module = "bcprov-jdk15on")
26+
}
27+
}

datapakker/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ Hovedpoenget med en datapakke er å hente fram data, og lagre det i en BigQuery
5050
3. konfigurer GCP/BigQuery
5151
4. Lag en nais.yml & dockerfile for å kjøre jobben i nais
5252
5. Husk å oppdatere '.github/workflows/datapakker.yml'. Per nå dupliserer vi litt mye, så du kan gjerne gjøre noe smart istedenfor :)
53+
6. Kopier build.gradle.kts i sin helhet og endre på navn og dependencies. jar-tasken er viktig, da den bygger en jar-fil som støttes av baseimages.
5354

5455
#### GCP
5556
1. Gå til `console.cloud.google.com`

datapakker/fritekstAvslag/build.gradle.kts

+21
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,24 @@
1+
tasks.named<Jar>("jar") {
2+
archiveBaseName.set("app")
3+
archiveVersion.set("")
4+
manifest {
5+
attributes["Main-Class"] = "no.nav.su.se.bakover.datapakker.fritekstAvslag.AppKt"
6+
attributes["Class-Path"] =
7+
configurations.runtimeClasspath.get().joinToString(separator = " ") {
8+
it.name
9+
}
10+
}
11+
doLast {
12+
configurations.runtimeClasspath.get().forEach {
13+
val fileProvider: Provider<RegularFile> = layout.buildDirectory.file("libs/${it.name}")
14+
val targetFile = File(fileProvider.get().toString())
15+
if (!targetFile.exists()) {
16+
it.copyTo(targetFile)
17+
}
18+
}
19+
}
20+
}
21+
122
dependencies {
223
implementation(platform("com.google.cloud:libraries-bom:26.34.0"))
324
implementation("com.google.cloud:google-cloud-bigquery")

tilbakekreving/infrastructure/build.gradle.kts

+3
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,13 @@ dependencies {
2222
implementation(rootProject.libs.cxf.rt.ws.security) {
2323
// https://security.snyk.io/vuln/SNYK-JAVA-ORGAPACHEVELOCITY-3116414
2424
exclude(group = "org.apache.velocity")
25+
exclude(group = "org.bouncycastle", module = "bcprov-jdk15on")
2526
}
2627

2728
testImplementation(project(":test-common"))
2829
testImplementation(project(":satser"))
30+
// We exclude jdk15on because of security issues. We use jdk18on instead.
31+
implementation("org.bouncycastle:bcprov-jdk18on:1.77")
2932
}
3033

3134
tasks.named<Jar>("jar") {

0 commit comments

Comments
 (0)