Skip to content

Commit a40241c

Browse files
authored
Remove shadowJar task and related imports (#185)
* Remove shadowJar task and related imports
1 parent 1b0c296 commit a40241c

File tree

4 files changed

+6
-26
lines changed

4 files changed

+6
-26
lines changed

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ permissions:
1010

1111
jobs:
1212
jar-app:
13-
uses: navikt/teamsykmelding-github-actions-workflows/.github/workflows/jar-app-21.yaml@main
13+
uses: navikt/teamsykmelding-github-actions-workflows/.github/workflows/plain-jar-app-21.yaml@main
1414
secrets: inherit
1515
with:
1616
app: syfosmapprec

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
FROM gcr.io/distroless/java21-debian12@sha256:6826e286459c15a54bc0bb746cf19a12cefc5d35923ebe49ef88008858f3ac00
1+
FROM gcr.io/distroless/java21-debian12@sha256:914d2e4d0aef6afe6167a11de8d87a4bfcd9325f36d1b45c03c04e6f16ba94d8
22
WORKDIR /app
3-
COPY build/libs/app-*.jar app.jar
3+
COPY build/install/*/lib /lib
44
ENV JAVA_OPTS="-Dlogback.configurationFile=logback.xml"
55
ENV TZ="Europe/Oslo"
66
EXPOSE 8080
77
USER nonroot
8-
CMD [ "app.jar" ]
8+
ENTRYPOINT ["java", "-cp", "/lib/*", "no.nav.syfo.BootstrapKt"]

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ This project creates and sends an apprec message to eMottak, which in turn sends
2121
#### Compile and package application
2222
To build locally and run the integration tests you can simply run
2323
``` bash
24-
./gradlew shadowJar
24+
./gradlew installDist
2525
```
2626
or on windows
27-
`gradlew.bat shadowJar`
27+
`gradlew.bat installDist`
2828

2929
#### Creating a docker image
3030
Creating a docker image should be as simple as

build.gradle.kts

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import com.github.jengelman.gradle.plugins.shadow.transformers.ServiceFileTransformer
2-
31
group = "no.nav.syfo"
42
version = "1.0.0"
53

@@ -28,7 +26,6 @@ plugins {
2826
id("application")
2927
kotlin("jvm") version "2.2.0"
3028
id("com.diffplug.spotless") version "7.1.0"
31-
id("com.gradleup.shadow") version "8.3.8"
3229
}
3330

3431
application {
@@ -103,23 +100,6 @@ dependencies {
103100

104101

105102
tasks {
106-
shadowJar {
107-
archiveBaseName.set("app")
108-
archiveClassifier.set("")
109-
isZip64 = true
110-
manifest {
111-
attributes(
112-
mapOf(
113-
"Main-Class" to "no.nav.syfo.BootstrapKt",
114-
),
115-
)
116-
}
117-
transform(ServiceFileTransformer::class.java) {
118-
setPath("META-INF/cxf")
119-
include("bus-extensions.txt")
120-
}
121-
}
122-
123103

124104
test {
125105
useJUnitPlatform {}

0 commit comments

Comments
 (0)