Skip to content
Draft
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Below is a list with included features, click on the link for more details.
| [gonovate](./features/src/gonovate/README.md) | Installs Gonovate. |
| [goreleaser](./features/src/goreleaser/README.md) | Installs GoReleaser. |
| [instant-client](./features/src/instant-client/README.md) | Installs the Oracle Instant Client Basic package. |
| [java](./features/src/java/README.md) | Installs Java (Temurin/OpenJDK), Maven, Gradle, and Ant. |
| [jfrog-cli](./features/src/jfrog-cli/README.md) | Installs the JFrog CLI. |
| [kubectl](./features/src/kubectl/README.md) | Installs kubectl and other tools for managing kubernetes. |
| [locale](./features/src/locale/README.md) | Allows setting the locale. |
Expand Down
4 changes: 4 additions & 0 deletions build/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,10 @@ func init() {
gotaskr.Task("Feature:gonovate:Package", func() error { return packageFeature("gonovate") })
gotaskr.Task("Feature:gonovate:Test", func() error { return testFeature("gonovate") })

////////// java
gotaskr.Task("Feature:java:Package", func() error { return packageFeature("java") })
gotaskr.Task("Feature:java:Test", func() error { return testFeature("java") })

////////// goreleaser
gotaskr.Task("Feature:goreleaser:Package", func() error { return packageFeature("goreleaser") })
gotaskr.Task("Feature:goreleaser:Test", func() error { return testFeature("goreleaser") })
Expand Down
19 changes: 19 additions & 0 deletions features/src/java/NOTES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
## Notes

### System Compatibility

Debian, Ubuntu

### Accessed Urls

Needs access to the following URLs for downloading and resolving Java (Temurin/OpenJDK):
* https://api.adoptium.net

Needs access to the following URL for downloading and resolving Maven:
* https://downloads.apache.org/maven

Needs access to the following URLs for downloading and resolving Gradle:
* https://services.gradle.org

Needs access to the following URL for downloading and resolving Ant:
* https://downloads.apache.org/ant
69 changes: 69 additions & 0 deletions features/src/java/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Java (java)

Installs Java (Temurin/OpenJDK), Maven, Gradle, and Ant.

## Example Usage

```json
"features": {
"ghcr.io/postfinance/devcontainer-features/java:1.0.0": {
"version": "latest",
"mavenVersion": "none",
"gradleVersion": "none",
"antVersion": "none",
"downloadUrl": "",
"versionsUrl": "",
"latestUrl": "",
"mavenDownloadUrl": "",
"mavenVersionsUrl": "",
"gradleDownloadUrl": "",
"gradleVersionsUrl": "",
"antDownloadUrl": "",
"antVersionsUrl": ""
}
}
```

## Options

| Option | Description | Type | Default Value | Proposals |
|-----|-----|-----|-----|-----|
| version | The version of Java (Temurin/OpenJDK) to install. Use a major version (e.g. '21') to get the latest patch release. | string | latest | latest, 21, 17, 11, 21.0.5 |
| mavenVersion | The version of Maven to install. Use 'none' to skip. | string | none | none, latest, 3.9, 3.9.9 |
| gradleVersion | The version of Gradle to install. Use 'none' to skip. | string | none | none, latest, 8, 8.14 |
| antVersion | The version of Ant to install. Use 'none' to skip. | string | none | none, latest, 1.10, 1.10.15 |
| downloadUrl | The download URL to use for Java (Temurin) binaries. | string | <empty> | https://mycompany.com/artifactory/adoptium-remote/v3/binary |
| versionsUrl | The URL to fetch the available Java (Temurin) versions from. | string | <empty> | |
| latestUrl | The URL to fetch the latest Java (Temurin) release information from. | string | <empty> | |
| mavenDownloadUrl | The download URL to use for Maven binaries. | string | <empty> | https://mycompany.com/artifactory/apache-maven-remote |
| mavenVersionsUrl | The URL to fetch the available Maven versions from. | string | <empty> | |
| gradleDownloadUrl | The download URL to use for Gradle binaries. | string | <empty> | https://mycompany.com/artifactory/gradle-distributions-remote |
| gradleVersionsUrl | The URL to fetch the available Gradle versions from. | string | <empty> | |
| antDownloadUrl | The download URL to use for Ant binaries. | string | <empty> | https://mycompany.com/artifactory/apache-ant-remote |
| antVersionsUrl | The URL to fetch the available Ant versions from. | string | <empty> | |

## Customizations

### VS Code Extensions

- `vscjava.vscode-java-pack`

## Notes

### System Compatibility

Debian, Ubuntu

### Accessed Urls

Needs access to the following URLs for downloading and resolving Java (Temurin/OpenJDK):
* https://api.adoptium.net

Needs access to the following URL for downloading and resolving Maven:
* https://downloads.apache.org/maven

Needs access to the following URLs for downloading and resolving Gradle:
* https://services.gradle.org

Needs access to the following URL for downloading and resolving Ant:
* https://downloads.apache.org/ant
121 changes: 121 additions & 0 deletions features/src/java/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
{
"id": "java",
"version": "1.0.0",
"name": "Java",
"description": "Installs Java (Temurin/OpenJDK), Maven, Gradle, and Ant.",
"options": {
"version": {
"type": "string",
"proposals": [
"latest",
"21",
"17",
"11",
"21.0.5"
],
"default": "latest",
"description": "The version of Java (Temurin/OpenJDK) to install. Use a major version (e.g. '21') to get the latest patch release."
},
"mavenVersion": {
"type": "string",
"proposals": [
"none",
"latest",
"3.9",
"3.9.9"
],
"default": "none",
"description": "The version of Maven to install. Use 'none' to skip."
},
"gradleVersion": {
"type": "string",
"proposals": [
"none",
"latest",
"8",
"8.14"
],
"default": "none",
"description": "The version of Gradle to install. Use 'none' to skip."
},
"antVersion": {
"type": "string",
"proposals": [
"none",
"latest",
"1.10",
"1.10.15"
],
"default": "none",
"description": "The version of Ant to install. Use 'none' to skip."
},
"downloadUrl": {
"type": "string",
"default": "",
"proposals": [
"https://mycompany.com/artifactory/adoptium-remote/v3/binary"
],
"description": "The download URL to use for Java (Temurin) binaries."
},
"versionsUrl": {
"type": "string",
"default": "",
"description": "The URL to fetch the available Java (Temurin) versions from."
},
"latestUrl": {
"type": "string",
"default": "",
"description": "The URL to fetch the latest Java (Temurin) release information from."
},
"mavenDownloadUrl": {
"type": "string",
"default": "",
"proposals": [
"https://mycompany.com/artifactory/apache-maven-remote"
],
"description": "The download URL to use for Maven binaries."
},
"mavenVersionsUrl": {
"type": "string",
"default": "",
"description": "The URL to fetch the available Maven versions from."
},
"gradleDownloadUrl": {
"type": "string",
"default": "",
"proposals": [
"https://mycompany.com/artifactory/gradle-distributions-remote"
],
"description": "The download URL to use for Gradle binaries."
},
"gradleVersionsUrl": {
"type": "string",
"default": "",
"description": "The URL to fetch the available Gradle versions from."
},
"antDownloadUrl": {
"type": "string",
"default": "",
"proposals": [
"https://mycompany.com/artifactory/apache-ant-remote"
],
"description": "The download URL to use for Ant binaries."
},
"antVersionsUrl": {
"type": "string",
"default": "",
"description": "The URL to fetch the available Ant versions from."
}
},
"customizations": {
"vscode": {
"extensions": [
"vscjava.vscode-java-pack"
]
}
},
"containerEnv": {
"JAVA_HOME": "/usr/local/java",
"PATH": "/usr/local/java/bin:${PATH}"
}
}
16 changes: 16 additions & 0 deletions features/src/java/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
. ./functions.sh

"./installer_$(detect_arch)" \
-version="${VERSION:-"latest"}" \
-mavenVersion="${MAVENVERSION:-"none"}" \
-gradleVersion="${GRADLEVERSION:-"none"}" \
-antVersion="${ANTVERSION:-"none"}" \
-downloadUrl="${DOWNLOADURL:-""}" \
-versionsUrl="${VERSIONSURL:-""}" \
-latestUrl="${LATESTURL:-""}" \
-mavenDownloadUrl="${MAVENDOWNLOADURL:-""}" \
-mavenVersionsUrl="${MAVENVERSIONSURL:-""}" \
-gradleDownloadUrl="${GRADLEDOWNLOADURL:-""}" \
-gradleVersionsUrl="${GRADLEVERSIONSURL:-""}" \
-antDownloadUrl="${ANTDOWNLOADURL:-""}" \
-antVersionsUrl="${ANTVERSIONSURL:-""}"
Loading