Azure / Azure/azure-sdk-for-java

[FEATURE REQ] Improve Java devcontainer setup for contributors

Open
#49,617 0 comments 0 reactions 2 assignees Claimed by @alzimmermsft View on GitHub
customer-reported feature-request needs-team-attention
Dominant language
Java
Stars
2.6k
Forks
2.2k
Avg merge
1d 22h
Merged PRs (30d)
159

Description

**Is your feature request related to a problem? Please describe.**

The current devcontainer configuration can be improved for contributors using GitHub Codespaces or VS Code Dev Containers. Some settings use older top-level devcontainer properties, and the container setup can be made clearer for Java development by using the official Java devcontainer image and Java feature configuration.

**Describe the solution you'd like**

Update the repository devcontainer configuration to:

- Use the official Java 21 devcontainer image.
- Install Maven through the Dev Containers Java feature.
- Set `JAVA_HOME` in the container environment.
- Move VS Code settings and extensions under `customizations.vscode`.
- Configure the VS Code Java runtime.
- Ignore the generated `.devcontainer/devcontainer-lock.json` file.

**Describe alternatives you've considered**

An alternative would be to keep the existing devcontainer configuration unchanged. However, updating it makes the development environment easier to use for contributors opening the repository in Codespaces or VS Code Dev Containers.

Another alternative would be to pin exact tool versions. The current change keeps Maven configured through the devcontainer Java feature while preserving a simple setup.

**Additional context**

This is a development-environment-only improvement. It does not change SDK source code, generated clients, tests, Maven project structure, or runtime behavior of any Azure SDK package.

Validation performed locally:

```text
java -version
mvn -version
git diff --cached --check
git check-ignore -v .devcontainer/devcontainer-lock.json

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.