Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"image": "mcr.microsoft.com/devcontainers/java:21",
"customizations": {
"vscode": {
"extensions": [
"redhat.java",
"vscjava.vscode-java-pack",
"confluentinc.vscode-confluent"
]
}
},

"features": {
"ghcr.io/devcontainers/features/java:1": {
"version": "none",
"installMaven": "true"
}
},

"workspaceMount": "source=${localWorkspaceFolder},target=/workspace,type=bind",
"workspaceFolder": "/workspace/exercises",

"remoteEnv": {
"JAVA_HOME": "/usr/lib/jvm/msopenjdk-current"
},

"mounts": [
{
"source": "${localWorkspaceFolder}/solutions",
"target": "/workspace/exercises/solutions",
"type": "bind"
},
{
"source": "${localWorkspaceFolder}/README.md",
"target": "/workspace/exercises/README.md",
"type": "bind"
}
],

"onCreateCommand": "sudo curl -L --http1.1 https://cnfl.io/cli | sudo sh -s -- -b /usr/local/bin"
}
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
*.iml
.idea

# VSCode
.vscode

# Java
target

Expand All @@ -29,7 +32,6 @@ cloud.properties
# Exercises folder
exercises/*
!exercises/exercise.sh
!exercises/README.md

/flink*

1 change: 1 addition & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
image: gitpod/workspace-java-21

tasks:
- init: sudo curl -L --http1.1 https://cnfl.io/cli | sudo sh -s -- -b /usr/local/bin
- command: gp open /workspace/learn-apache-flink-table-api-for-java-exercises/README.md && exit
- name: exercises
command: |
Expand Down
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,9 @@

## Version 0.3.2

* Added a basic Gitpod configuration file.
* Added a basic Gitpod configuration file.

## Version 0.3.3

* Added a dev container file.
* Updated the Gitpod configuration.
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,29 @@ The `solutions` folder contains complete solutions for each exercise. These will

In general, you can ignore this folder, but you might find it helpful to reference if you get stuck.

## Development Container

This repo contains a [.devcontainer.json](.devcontainer.json) file.

If you are using a Development Container compatible IDE (Eg. VS Code, IntelliJ Ultimate) and have Docker running, you can use the `.devcontainer.json` file to automatically configure your development environment with the required settings. This includes automatically setting up the correct version of the JVM, installing Maven, installing the Confluent CLI, and potentially configuring your IDE with any required plugins. It will give you a fully functional development environment in moments.
Depending on what IDE you are using, the process can vary.

In VS Code, open the folder that contains the `.devcontainer.json` file. When prompted, re-open it in the container. Please note that you may need to install the Dev Containers plugin for VS Code prior to opening.

In IntelliJ Ultimate, right-click on the `.devcontainer.json` file, select the **Dev Containers** menu, and then choose **Create Dev Container and Mount Sources**. Once it has finished it will prompt you to connect to the container.

See here for more details:

- [Development Containers](https://containers.dev/)
- [Development Containers in VS Code](https://code.visualstudio.com/docs/devcontainers/containers)
- [Development Containers in IntelliJ](https://www.jetbrains.com/help/idea/connect-to-devcontainer.html)

If you are working in the Development Container and intend to use the Confluent CLI, you will need to login to the CLI using the [--no-browser](https://docs.confluent.io/confluent-cli/current/command-reference/confluent_login.html) flag.

## Gitpod

This repository contains a [Gitpod](https://www.gitpod.io/) configuration file. You can use Gitpod to spin up a browser-based development environment for working on these exercises.

[Open In Gitpod](https://gitpod.io/new/#https://github.com/confluentinc/learn-apache-flink-table-api-for-java-exercises)
[Open In Gitpod](https://gitpod.io/new/#https://github.com/confluentinc/learn-apache-flink-table-api-for-java-exercises)

If you are working in Gitpod and intend to use the Confluent CLI, you will need to login to the CLI using the [--no-browser](https://docs.confluent.io/confluent-cli/current/command-reference/confluent_login.html) flag.