Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update maven example to handle "cannot create resource output directory" error #1538

Closed
noelmcloughlin opened this issue Apr 29, 2024 · 1 comment

Comments

@noelmcloughlin
Copy link

noelmcloughlin commented Apr 29, 2024

Describe the bug

Maven-resources-plugin cannot create resource output directory (/home/build/target/) because maven lacks permissions to remove subdirectories under /home/build/ (see similar issue).

To Reproduce

  1. Open terminal as some random user
  2. Follow https://edu.chainguard.dev/chainguard/chainguard-images/reference/maven#springboot until you execute this command:
docker run --platform=linux/amd64 --rm -v ${PWD}:/home/build cgr.dev/chainguard/maven:openjdk-17 clean install
  1. See error from maven-resources-plugin

Expected behavior

This worked for me:

chmod o+w ../demo
docker run --platform=linux/amd64 --rm -v ${PWD}:/home/build cgr.dev/chainguard/maven:openjdk-17 clean install
chmod o-w ../demo     # optional, its just demo
@ltagliaferri
Copy link
Collaborator

Thanks for flagging this, I copied this over to the Images repo, where the readmes live. chainguard-images/images#2624

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants