diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index d097fa4bed..6aadee33f8 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,10 +1,4 @@ -FROM mcr.microsoft.com/devcontainers/java:8 - -ARG MAVEN_VERSION="" -RUN \ - su vscode -c "umask 0002 && \ - . /usr/local/sdkman/bin/sdkman-init.sh && \ - sdk install maven \"${MAVEN_VERSION}\"" +FROM mcr.microsoft.com/devcontainers/java:21 RUN \ apt-get update && \ diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index ee33fd0e31..1f3bb1de5d 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,44 +1,21 @@ { "name": "SchemaCrawler", - "build": { - "dockerfile": "Dockerfile", - "args": { - "INSTALL_MAVEN": "true", - "INSTALL_GRADLE": "true", - "NODE_VERSION": "none" - } - }, - "settings": { - "workbench.startupEditor": "none", - "java.home": "/docker-java-home", - "java.import.gradle.java.home": "/usr/local/sdkman/candidates/java/current", - "java.configuration.runtimes": [ - { - "default": true, - "name": "JavaSE-1.8", - "path": "/usr/local/sdkman/candidates/java/current" - } - ], - "files.exclude": { - "workspace": true + "features": { + "ghcr.io/devcontainers/features/java:1": { + "version": "21", + "installMaven": "true" }, - "java.configuration.updateBuildConfiguration": "automatic", - "java.format.settings.profile": "GoogleStyle", - "java.format.settings.url": "https://raw.githubusercontent.com/google/styleguide/gh-pages/eclipse-java-google-style.xml", - "editor.tabSize": 2, - "editor.foldingImportsByDefault": true, - "files.trimTrailingWhitespace": true, - "git.enableCommitSigning": true + "ghcr.io/devcontainers/features/github-cli:1": {} + }, + "customizations": { + "vscode": { + "settings": { + }, + "extensions": [ + "vscjava.vscode-java-pack", + "editorconfig.editorconfig" + ] + } }, - "extensions": [ - "vscjava.vscode-java-pack", - "shengchen.vscode-checkstyle", - "editorconfig.editorconfig", - "pivotal.vscode-boot-dev-pack", - "pivotal.vscode-spring-boot", - "redhat.vscode-xml", - "jebbs.markdown-extended", - "davidanson.vscode-markdownlint" - ], - "remoteUser": "vscode" + "postCreateCommand": "mvn dependency:resolve" } diff --git a/.vscode/settings.json b/.vscode/settings.json index efe2584b2f..b49ebffc7d 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,6 +1,9 @@ { "github.codespaces.defaultExtensions": [ "vscjava.vscode-java-pack", + "vscjava.vscode-maven", + "vscjava.vscode-java-test", + "editorconfig.editorconfig", "GitHub.codespaces", "GitHub.vscode-pull-request-github" ], @@ -8,4 +11,4 @@ "scm.showActionButton": false, "java.compile.nullAnalysis.mode": "automatic", "java.jdt.ls.vmargs": "-XX:+UseParallelGC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xmx2G -Xms100m -Xlog:disable" -} \ No newline at end of file +}