From 25bc9fbca01bcde82f4e5b04e343fc156d1b96be Mon Sep 17 00:00:00 2001 From: Jinbo Wang Date: Thu, 25 Apr 2019 16:29:36 +0800 Subject: [PATCH] Rename the template title to Java 12 Signed-off-by: Jinbo Wang --- .../java-12-maven/.devcontainer/Dockerfile | 12 ---------- .../.devcontainer/devcontainer.json | 8 ------- containers/java-12/.devcontainer/Dockerfile | 23 +++++++++++++++++++ .../java-12/.devcontainer/devcontainer.json | 7 ++++++ .../{java-12-maven => java-12}/.npmignore | 0 .../.vscode/launch.json | 0 .../{java-12-maven => java-12}/README.md | 14 +++++------ .../test-project/.classpath | 0 .../test-project/.gitignore | 0 .../test-project/.project | 0 .../.settings/org.eclipse.jdt.apt.core.prefs | 0 .../.settings/org.eclipse.jdt.core.prefs | 0 .../.settings/org.eclipse.m2e.core.prefs | 0 .../test-project/pom.xml | 0 .../src/main/java/com/mycompany/app/App.java | 0 .../test/java/com/mycompany/app/AppTest.java | 0 16 files changed, 37 insertions(+), 27 deletions(-) delete mode 100644 containers/java-12-maven/.devcontainer/Dockerfile delete mode 100644 containers/java-12-maven/.devcontainer/devcontainer.json create mode 100644 containers/java-12/.devcontainer/Dockerfile create mode 100644 containers/java-12/.devcontainer/devcontainer.json rename containers/{java-12-maven => java-12}/.npmignore (100%) rename containers/{java-12-maven => java-12}/.vscode/launch.json (100%) rename containers/{java-12-maven => java-12}/README.md (82%) rename containers/{java-12-maven => java-12}/test-project/.classpath (100%) rename containers/{java-12-maven => java-12}/test-project/.gitignore (100%) rename containers/{java-12-maven => java-12}/test-project/.project (100%) rename containers/{java-12-maven => java-12}/test-project/.settings/org.eclipse.jdt.apt.core.prefs (100%) rename containers/{java-12-maven => java-12}/test-project/.settings/org.eclipse.jdt.core.prefs (100%) rename containers/{java-12-maven => java-12}/test-project/.settings/org.eclipse.m2e.core.prefs (100%) rename containers/{java-12-maven => java-12}/test-project/pom.xml (100%) rename containers/{java-12-maven => java-12}/test-project/src/main/java/com/mycompany/app/App.java (100%) rename containers/{java-12-maven => java-12}/test-project/src/test/java/com/mycompany/app/AppTest.java (100%) diff --git a/containers/java-12-maven/.devcontainer/Dockerfile b/containers/java-12-maven/.devcontainer/Dockerfile deleted file mode 100644 index baee7dc312..0000000000 --- a/containers/java-12-maven/.devcontainer/Dockerfile +++ /dev/null @@ -1,12 +0,0 @@ -#----------------------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See LICENSE in the project root for license information. -#----------------------------------------------------------------------------------------- - -FROM maven:3-jdk-12 - -# Install git, process tools -RUN yum update -y && yum install -y git procps - -# Clean yum cache -RUN yum clean all diff --git a/containers/java-12-maven/.devcontainer/devcontainer.json b/containers/java-12-maven/.devcontainer/devcontainer.json deleted file mode 100644 index 7c931e8a6e..0000000000 --- a/containers/java-12-maven/.devcontainer/devcontainer.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "Java 12 & Maven", - "dockerFile": "Dockerfile", - "extensions": [ - "vscjava.vscode-java-pack", - "redhat.vscode-xml" - ] -} diff --git a/containers/java-12/.devcontainer/Dockerfile b/containers/java-12/.devcontainer/Dockerfile new file mode 100644 index 0000000000..e37ad6a913 --- /dev/null +++ b/containers/java-12/.devcontainer/Dockerfile @@ -0,0 +1,23 @@ +#----------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See LICENSE in the project root for license information. +#----------------------------------------------------------------------------------------- + +FROM maven:3-jdk-12 + +# Install git, process tools +RUN yum update -y && yum install -y git procps unzip + +# Install Gradle +ENV GRADLE_HOME /opt/gradle +ENV GRADLE_VERSION 5.4 +ARG GRADLE_DOWNLOAD_SHA256=c8c17574245ecee9ed7fe4f6b593b696d1692d1adbfef425bef9b333e3a0e8de +RUN curl -SL --output gradle.zip "https://services.gradle.org/distributions/gradle-${GRADLE_VERSION}-bin.zip" \ + && echo "${GRADLE_DOWNLOAD_SHA256} *gradle.zip" | sha256sum --check - \ + && unzip gradle.zip \ + && rm gradle.zip \ + && mv "gradle-${GRADLE_VERSION}" "${GRADLE_HOME}/" \ + && ln -s "${GRADLE_HOME}/bin/gradlec" /usr/bin/gradle + +# Clean yum cache +RUN yum clean all diff --git a/containers/java-12/.devcontainer/devcontainer.json b/containers/java-12/.devcontainer/devcontainer.json new file mode 100644 index 0000000000..611f4fd9a8 --- /dev/null +++ b/containers/java-12/.devcontainer/devcontainer.json @@ -0,0 +1,7 @@ +{ + "name": "Java 12", + "dockerFile": "Dockerfile", + "extensions": [ + "vscjava.vscode-java-pack" + ] +} diff --git a/containers/java-12-maven/.npmignore b/containers/java-12/.npmignore similarity index 100% rename from containers/java-12-maven/.npmignore rename to containers/java-12/.npmignore diff --git a/containers/java-12-maven/.vscode/launch.json b/containers/java-12/.vscode/launch.json similarity index 100% rename from containers/java-12-maven/.vscode/launch.json rename to containers/java-12/.vscode/launch.json diff --git a/containers/java-12-maven/README.md b/containers/java-12/README.md similarity index 82% rename from containers/java-12-maven/README.md rename to containers/java-12/README.md index 48b5f6d10e..972f2f5287 100644 --- a/containers/java-12-maven/README.md +++ b/containers/java-12/README.md @@ -1,14 +1,14 @@ -# Java 12 & Maven +# Java 12 ## Summary -*Develop Java applications. Includes the JDK 12, XML tools, along with any dependencies Maven requires.* +*Develop Java applications. Includes the JDK 12, Maven and Gradle build tools.* | Metadata | Value | |----------|-------| | *Contributors* | The VS Code Java Team | | *Definition type* | Dockerfile | -| *Languages, platforms* | Java, Maven | +| *Languages, platforms* | Java, Maven, Gradle | ## Using this definition with an existing folder @@ -25,11 +25,11 @@ Beyond that, just follow these steps to use the definition: 2. To use VS Code's copy of this definition: 1. Start VS Code and open your project folder. 2. Press F1 select and **Remote-Containers: Create Container Configuration File...** from the command palette. - 3. Select the Java 12 & Maven definition. + 3. Select the Java 12 definition. 3. To use latest-and-greatest copy of this definition from the repository: 1. Clone this repository. - 2. Copy the contents of `containers/java-12-maven/.devcontainer` to the root of your project folder. + 2. Copy the contents of `containers/java-12/.devcontainer` to the root of your project folder. 3. Start VS Code and open your project folder. 4. After following step 2 or 3, the contents of the `.devcontainer` folder in your project can be adapted to meet your needs. @@ -43,9 +43,9 @@ This definition includes some test code that will help you verify it is working 1. If this is your first time using a development container, please follow the [getting started steps](https://aka.ms/vscode-remote/containers/getting-started) to set up your machine. 2. Clone this repository. 3. Start VS Code, press F1, and select **Remote-Containers: Open Folder in Container...** -4. Select the `containers/java-12-maven` folder. +4. Select the `containers/java-12` folder. 5. After the folder has opened in the container, press F5 to start the project. -6. You should see "Hello Weekday" in the a Debug Console after the program executes. +6. You should see "Hello Weekday" in the Debug Console after the program executes. 7. From here, you can add breakpoints or edit the contents of the `test-project` folder to do further testing. ## License diff --git a/containers/java-12-maven/test-project/.classpath b/containers/java-12/test-project/.classpath similarity index 100% rename from containers/java-12-maven/test-project/.classpath rename to containers/java-12/test-project/.classpath diff --git a/containers/java-12-maven/test-project/.gitignore b/containers/java-12/test-project/.gitignore similarity index 100% rename from containers/java-12-maven/test-project/.gitignore rename to containers/java-12/test-project/.gitignore diff --git a/containers/java-12-maven/test-project/.project b/containers/java-12/test-project/.project similarity index 100% rename from containers/java-12-maven/test-project/.project rename to containers/java-12/test-project/.project diff --git a/containers/java-12-maven/test-project/.settings/org.eclipse.jdt.apt.core.prefs b/containers/java-12/test-project/.settings/org.eclipse.jdt.apt.core.prefs similarity index 100% rename from containers/java-12-maven/test-project/.settings/org.eclipse.jdt.apt.core.prefs rename to containers/java-12/test-project/.settings/org.eclipse.jdt.apt.core.prefs diff --git a/containers/java-12-maven/test-project/.settings/org.eclipse.jdt.core.prefs b/containers/java-12/test-project/.settings/org.eclipse.jdt.core.prefs similarity index 100% rename from containers/java-12-maven/test-project/.settings/org.eclipse.jdt.core.prefs rename to containers/java-12/test-project/.settings/org.eclipse.jdt.core.prefs diff --git a/containers/java-12-maven/test-project/.settings/org.eclipse.m2e.core.prefs b/containers/java-12/test-project/.settings/org.eclipse.m2e.core.prefs similarity index 100% rename from containers/java-12-maven/test-project/.settings/org.eclipse.m2e.core.prefs rename to containers/java-12/test-project/.settings/org.eclipse.m2e.core.prefs diff --git a/containers/java-12-maven/test-project/pom.xml b/containers/java-12/test-project/pom.xml similarity index 100% rename from containers/java-12-maven/test-project/pom.xml rename to containers/java-12/test-project/pom.xml diff --git a/containers/java-12-maven/test-project/src/main/java/com/mycompany/app/App.java b/containers/java-12/test-project/src/main/java/com/mycompany/app/App.java similarity index 100% rename from containers/java-12-maven/test-project/src/main/java/com/mycompany/app/App.java rename to containers/java-12/test-project/src/main/java/com/mycompany/app/App.java diff --git a/containers/java-12-maven/test-project/src/test/java/com/mycompany/app/AppTest.java b/containers/java-12/test-project/src/test/java/com/mycompany/app/AppTest.java similarity index 100% rename from containers/java-12-maven/test-project/src/test/java/com/mycompany/app/AppTest.java rename to containers/java-12/test-project/src/test/java/com/mycompany/app/AppTest.java