Skip to content

fix(devcontainer): use Maven wrapper for dependency caching#330

Merged
MohsinHashmi-DataInn merged 6 commits intodevelopfrom
fix/devcontainer-workspace-mount
Dec 22, 2025
Merged

fix(devcontainer): use Maven wrapper for dependency caching#330
MohsinHashmi-DataInn merged 6 commits intodevelopfrom
fix/devcontainer-workspace-mount

Conversation

@MohsinHashmi-DataInn
Copy link
Copy Markdown
Contributor

Summary

  • Fixes failing devcontainer prebuild workflow (exit code 127: mvn: command not found)
  • The base image mcr.microsoft.com/devcontainers/java:21-bookworm does not have Maven pre-installed
  • Uses Maven wrapper (./mvnw) which is already present in the project
  • Adds graceful fallbacks for partial dependency caching

Changes

  • Copy mvnw and .mvn/ directory alongside pom.xml
  • Use ./mvnw dependency:resolve instead of mvn dependency:go-offline
  • Add || true fallbacks so image builds even if some dependencies fail
  • Add npm install fallback when lockfiles are out of sync

Test plan

  • Tested Docker build locally with docker buildx build --platform linux/amd64 -f .devcontainer/Dockerfile .
  • Verify GitHub Actions workflow passes after merge

Fixes: https://github.com/SimpleAccounts/SimpleAccounts-UAE/actions/runs/20424643047

🤖 Generated with Claude Code

mohsin-wiser and others added 6 commits December 22, 2025 01:22
- add explicit workspace mount ../:/workspaces/SimpleAccounts-UAE
- use fixed workspace path instead of variable
- fixes 'lstat /workspaces/content: no such file or directory' error

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Bake Playwright system dependencies into Dockerfile
- Combine apt-get layers for efficiency
- Pre-cache Maven and NPM dependencies during build
- Update post-create.sh to utilize pre-seeded caches
The base image mcr.microsoft.com/devcontainers/java:21-bookworm does not
have Maven pre-installed, causing the prebuild to fail with exit code 127
(mvn: command not found).

Changes:
- Use Maven wrapper (./mvnw) instead of mvn command
- Copy mvnw and .mvn/ directory for wrapper to work
- Use dependency:resolve instead of go-offline to avoid HTTP repo blocking
- Add graceful fallbacks (|| true) for partial dependency caching
- Add npm install fallback when lockfiles are out of sync

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@nazia-datainn nazia-datainn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GTG

@MohsinHashmi-DataInn MohsinHashmi-DataInn merged commit aac6630 into develop Dec 22, 2025
19 checks passed
@MohsinHashmi-DataInn MohsinHashmi-DataInn deleted the fix/devcontainer-workspace-mount branch December 22, 2025 07:45
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

Successfully merging this pull request may close these issues.

3 participants