Z
Zerops2mo ago
slowhog

Java Service Maven Permission Denied

I'm trying to deploy a spring boot service with a standard default zeroops yaml file but it fails, the error is get on ./mvnw clean install ━━━ is -i: line 1: ./mvnw: Permission denied appreciate any help with this
Solution:
Ok, it looks like you changed the permissions of the nvmw file and the chmod command will fix it.
Jump to solution
7 Replies
nermal
nermal2mo ago
@Michal hey michal can sudo work in this case ?
Michal Saloň
Michal Saloň2mo ago
I am not sure why it's failing for him, since in our recipe it's working ok. https://github.com/zeropsio/recipe-spring/blob/main/zerops.yml Do you have build.base set to java@21?
Jan Saidl
Jan Saidl2mo ago
Hi @slowhog , prepareCommands is one stage before the source code is available.
build:
axis: alpine
base: java@21
buildCommands:
- chmod +x mvnw
- ./mvnw clean install
deployFiles: target/admin-0.0.1-SNAPSHOT.jar
run:
axis: alpine
base: java@21
start: java -jar target/admin-0.0.1-SNAPSHOT.jar
port:
- port: 8080
httpSupport: true
build:
axis: alpine
base: java@21
buildCommands:
- chmod +x mvnw
- ./mvnw clean install
deployFiles: target/admin-0.0.1-SNAPSHOT.jar
run:
axis: alpine
base: java@21
start: java -jar target/admin-0.0.1-SNAPSHOT.jar
port:
- port: 8080
httpSupport: true
Just give me a minute. I'll take a look.
Solution
Jan Saidl
Jan Saidl2mo ago
Ok, it looks like you changed the permissions of the nvmw file and the chmod command will fix it.
Jan Saidl
Jan Saidl2mo ago
If you need npm in your build you can add nodejs@20
build:
os: alpine
base: [ java@21 , nodejs@20 ]
build:
os: alpine
base: [ java@21 , nodejs@20 ]
slowhog
slowhogOP2mo ago
thanks, that worked @Jan Saidl love the platform, i think it's well designed for devs
Jan Saidl
Jan Saidl2mo ago
💓 Glad to hear it. We're trying to do our best. And we still have much to improve.
Want results from more Discord servers?
Add your server