Skip to content

Commit 1226256

Browse files
angela-zhangclaude
andauthored
update libraries.cgr.dev/java browsing docs following r2 migration (#3450)
## What Updates the **Java overview** doc to accurately describe how to access the Chainguard Libraries for Java repository at `https://libraries.cgr.dev/java/`. - The repository root is not browsable. The doc now leads with how to access artifacts directly by their Maven-format path. - **Find available versions** via the library's `maven-metadata.xml` file. - **List the files for a version** at that version's directory (the version-leaf directory is browsable). - Download individual files by full path (with `-L` to follow redirects to object storage). ## Why Following the R2 migration, the repository no longer renders directory listings above the version level, so the previous docs (which described general Maven-style directory browsing and pointed readers at the `groupId`/`artifactId` directory to find versions) were inaccurate. This caused customer confusion (see [internal thread](https://chainguard-dev.slack.com/archives/C085187D8RE/p1782165183164049)). The doc now reflects the supported access pattern. ## Also - Refreshed example versions to artifacts that actually exist in the repository: `commons-lang3` 3.18.0 → **3.13.0**, `commons-io` 2.17.0 → **2.13.0**, `commons-compress` 1.28.0 → **1.23.0** (the prior versions 404'd). - Fixed a missing backtick in the SBOM file-extension list. ## Testing Verified against `libraries.cgr.dev/java` with an entitlement token: - `…/commons-lang3/maven-metadata.xml` → 200 - `…/commons-lang3/3.13.0/` → 200 (browsable file listing) - `…/commons-io/commons-io/2.13.0/commons-io-2.13.0.pom` → 200 (via `-L`) - `…/commons-compress/1.23.0/` and its `.pom` / `.jar` / `.slsa-attestation.json` / `.spdx.json` → 200 - Repository root and intermediate directories → 404 (consistent with the doc) ## Scope `content/chainguard/libraries/java/overview.md` only. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 1d83663 commit 1226256

1 file changed

Lines changed: 46 additions & 35 deletions

File tree

content/chainguard/libraries/java/overview.md

Lines changed: 46 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ The URL for the repository is:
7070
https://libraries.cgr.dev/java/
7171
```
7272

73-
This site provides a directory browsing and file listing capability similar to the Maven Central repository, allowing you to find available libraries, library versions, and available files. Learn more under [Manual access](#manual).
73+
The repository root at `https://libraries.cgr.dev/java/` is not browsable, but you can access artifacts directly by their [Maven repository format](https://maven.apache.org/repository/layout.html) path: list the available versions of a library through its `maven-metadata.xml` file, view the files for a specific version in that version's directory, and download individual files by their full path. Learn more under [Manual access](#manual).
7474

7575
This Chainguard Libraries for Java repository uses the Maven repository format
7676
and only includes release artifacts of the libraries built by Chainguard from
@@ -133,40 +133,51 @@ To manually access artifacts in the Chainguard Libraries for Java repository, us
133133
with your [username and password retrieved with
134134
chainctl](/chainguard/libraries/access/).
135135

136-
This site provides a directory browsing and file listing capability similar to
137-
the Maven Central repository at
138-
[`https://repo1.maven.org/maven2/`](https://repo1.maven.org/maven2/). The
139-
structure follows the [Maven repository
140-
format](https://maven.apache.org/repository/layout.html). The `groupId` and
141-
`artifactId` of a library is used to create a nested directory structure,
142-
similar to the package structure within Java projects.
136+
The repository follows the [Maven repository
137+
format](https://maven.apache.org/repository/layout.html), where the `groupId` and
138+
`artifactId` of a library form a nested directory structure, similar to the
139+
package structure within Java projects. The repository root at
140+
[`https://libraries.cgr.dev/java/`](https://libraries.cgr.dev/java/) is not
141+
browsable, but you can discover and retrieve artifacts directly as described
142+
below.
143143

144144
For example, the Maven coordinates for [Apache Commons
145-
Lang](https://commons.apache.org/proper/commons-lang/) 3.18.0 are the following:
145+
Lang](https://commons.apache.org/proper/commons-lang/) are the following:
146146

147147
```xml
148148
<groupId>org.apache.commons</groupId>
149149
<artifactId>commons-lang3</artifactId>
150-
<version>3.18.0</version>
150+
<version>3.13.0</version>
151151
```
152152

153-
All available versions can be found in
154-
[https://libraries.cgr.dev/java/org/apache/commons/commons-lang3](https://libraries.cgr.dev/java/org/apache/commons/commons-lang3)
155-
since the `groupId` is used to create separate, nested directories `org`
156-
`apache`, and `commons`, and the `artifactId` results in the `commons-lang3`
157-
directory.
153+
**Find available versions**
158154

159-
The final leaf directory is created from the `version`, in the example `3.18.0`.
160-
All leaf directories are allocated for a specific version of a specific library
161-
and contain all relevant files.
155+
List the versions that Chainguard has built for a library by requesting its
156+
`maven-metadata.xml` file at the `groupId`/`artifactId` path. The `groupId`
157+
`org.apache.commons` becomes the nested directories `org/apache/commons`, and the
158+
`artifactId` adds the `commons-lang3` directory:
162159

163-
For example, the directory at
164-
`https://libraries.cgr.dev/java/org/apache/commons/commons-lang3` contains all
165-
files for the `org.apache.commons:commons-lang3:3.18.0` library. Specifically,
166-
this includes the file `commons-lang3-3.18.0.pom` for the main Maven metadata
167-
from the project and main JAR file `commons-lang3-3.18.0.jar`. The directory
168-
also includes numerous other files, and related checksum files. Specific files
169-
vary between the different libraries.
160+
```
161+
https://libraries.cgr.dev/java/org/apache/commons/commons-lang3/maven-metadata.xml
162+
```
163+
164+
The repository only includes release artifacts that Chainguard builds from source,
165+
so the versions listed may differ from those available on Maven Central.
166+
167+
**List the files for a version**
168+
169+
Each version has its own leaf directory, formed by appending the `version` to the
170+
`groupId`/`artifactId` path. This version directory is browsable and lists all
171+
files for that specific library version:
172+
173+
```
174+
https://libraries.cgr.dev/java/org/apache/commons/commons-lang3/3.13.0/
175+
```
176+
177+
For the `org.apache.commons:commons-lang3:3.13.0` library, this directory includes
178+
the main Maven metadata file `commons-lang3-3.13.0.pom`, the main JAR file
179+
`commons-lang3-3.13.0.jar`, related checksum files, and the SBOM and attestation
180+
files described below. Specific files vary between libraries.
170181

171182
All filenames can be used to download individual files.
172183

@@ -178,14 +189,14 @@ With [.netrc authentication](/chainguard/libraries/access/#netrc):
178189

179190
```shell
180191
curl -n -L \
181-
-O https://libraries.cgr.dev/java/commons-io/commons-io/2.17.0/commons-io-2.17.0.pom
192+
-O https://libraries.cgr.dev/java/commons-io/commons-io/2.13.0/commons-io-2.13.0.pom
182193
```
183194

184195
With [environment variables](/chainguard/libraries/access/#env):
185196

186197
```shell
187198
curl -L --user "$CHAINGUARD_JAVA_IDENTITY_ID:$CHAINGUARD_JAVA_TOKEN" \
188-
-O https://libraries.cgr.dev/java/commons-io/commons-io/2.17.0/commons-io-2.17.0.pom
199+
-O https://libraries.cgr.dev/java/commons-io/commons-io/2.13.0/commons-io-2.13.0.pom
189200
```
190201

191202
The option `-L` is required to follow redirects for the actual file locations.
@@ -207,14 +218,14 @@ version and uses the same `artifactId-version` naming convention with the
207218
following extensions:
208219

209220
* `.slsa-attestation.json` for the SLSA provenance attestation
210-
* `.spdx.json for the SBOM information
221+
* `.spdx.json` for the SBOM information
211222

212-
For example, the file location for artifactId `commons-compress` and version
213-
`1.28.0` is
214-
[https://libraries.cgr.dev/java/org/apache/commons/commons-compress/1.28.0/](https://libraries.cgr.dev/java/org/apache/commons/commons-compress/1.28.0/).
223+
For example, the files for artifactId `commons-compress` and version
224+
`1.23.0` are located in the version directory
225+
[https://libraries.cgr.dev/java/org/apache/commons/commons-compress/1.23.0/](https://libraries.cgr.dev/java/org/apache/commons/commons-compress/1.23.0/).
215226
It includes the following files:
216227

217-
* `commons-compress-1.28.0.pom`
218-
* `commons-compress-1.28.0.jar`
219-
* `commons-compress-1.28.0.slsa-attestation.json`
220-
* `commons-compress-1.28.0.spdx.json`
228+
* `commons-compress-1.23.0.pom`
229+
* `commons-compress-1.23.0.jar`
230+
* `commons-compress-1.23.0.slsa-attestation.json`
231+
* `commons-compress-1.23.0.spdx.json`

0 commit comments

Comments
 (0)