When running:
./mvnw package -Pprod verify -DskipTests jib:build -Djib.to.image=$IMAGE_TAG -Djib.to.auth.username=gitlab-ci-token -Djib.to.auth.password=$CI_BUILD_TOKEN -Dmaven.repo.local=$MAVEN_USER_HOME
I get an error that says:
An unhandled exception occurred: EBUSY: resource busy or locked, unlink '/builds/PATH/target/node/.nfs000000007cb56ba90067282d'
It happens when ./mvnw package
reaches:
[INFO] > ng build --configuration production
[INFO]
[INFO] An unhandled exception occurred: EBUSY: resource busy or locked, unlink '/builds/sharing/codeability-sharing-platform/target/node/.nfs000000007cb56ba90067282d'
I have tried all possible solutions from here: Error: EBUSY: resource busy or locked, rmdir
However, none of these solutions worked because they are not executed in a pipeline and during the mvnw package command.