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 #2624

Open
ltagliaferri opened this issue May 2, 2024 · 0 comments
Labels
needs-triage applied to all new customer/user issues. Removed after triage occurs.

Comments

@ltagliaferri
Copy link
Contributor

ltagliaferri commented May 2, 2024

Which image/versions are related to this issue/feature request?

maven:openjdk-17

Issue/Feature description

Copying this over from the edu repo as the Images Readmes live here. cc @noelmcloughlin

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 ltagliaferri added the needs-triage applied to all new customer/user issues. Removed after triage occurs. label May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-triage applied to all new customer/user issues. Removed after triage occurs.
Projects
None yet
Development

No branches or pull requests

1 participant