Skip to content

docs(prefetch): add experimental Maven prefetch documentation#620

Open
adambkaplan wants to merge 1 commit into
konflux-ci:mainfrom
adambkaplan:doc-secure-java-onboarding
Open

docs(prefetch): add experimental Maven prefetch documentation#620
adambkaplan wants to merge 1 commit into
konflux-ci:mainfrom
adambkaplan:doc-secure-java-onboarding

Conversation

@adambkaplan
Copy link
Copy Markdown
Contributor

Add documentation for enabling Maven dependency prefetching with Hermeto. The new section covers generating a lockfile using the Maven Lockfile plugin with SHA-512 checksums computed locally for post-quantum cryptography readiness, including Maven plugins in the lockfile, validating the lockfile, and configuring the Tekton pipeline with the experimental x-maven type.

Assisted-by: Claude Opus 4.6

Add documentation for enabling Maven dependency prefetching with Hermeto.
The new section covers generating a lockfile using the Maven Lockfile plugin
with SHA-512 checksums computed locally for post-quantum cryptography
readiness, including Maven plugins in the lockfile, validating the lockfile,
and configuring the Tekton pipeline with the experimental x-maven type.

Assisted-by: Claude Opus 4.6
Signed-off-by: Adam Kaplan <adam.kaplan@redhat.com>
@adambkaplan adambkaplan requested a review from a team as a code owner June 3, 2026 21:22
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds documentation for experimental Maven prefetch support in Hermeto, including instructions on generating and validating a lockfile and configuring the Tekton pipeline. The review feedback suggests avoiding inline callouts within multi-line bash commands to prevent copy-paste syntax errors, and refining the description of Hermeto's Maven integration for improved clarity and technical accuracy.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment on lines +18 to +27
[source,bash]
----
mvn io.github.chains-project:maven-lockfile:generate \
-DincludeMavenPlugins=true \ <1>
-DchecksumAlgorithm=SHA-512 \ <2>
-DchecksumMode=local <3>
----
<1> Include all Maven build plugins and their transitive dependencies in the lockfile. This ensures that plugin artifacts are also prefetched and available during hermetic builds.
<2> Use the SHA-512 algorithm for checksum computation to ensure post-quantum cryptography readiness.
<3> Compute checksums locally from artifacts in your local Maven repository (`.m2`), rather than downloading pre-computed checksums from remote repositories.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Using backslashes for line continuation followed by a space and an AsciiDoc callout (e.g., \\ <1>) can cause syntax errors when users copy and paste the command into their terminal. If the callout is stripped or copied, the trailing space after the backslash escapes the space instead of the newline, breaking the command.

To prevent copy-paste issues and improve readability, consider removing the callouts from the code block and describing the parameters in an imperative list below the command.

[source,bash]
----
mvn io.github.chains-project:maven-lockfile:generate \\
  -DincludeMavenPlugins=true \\
  -DchecksumAlgorithm=SHA-512 \\
  -DchecksumMode=local
----

The command uses the following parameters:

* `-DincludeMavenPlugins=true`: Include all Maven build plugins and their transitive dependencies in the lockfile to ensure that plugin artifacts are also prefetched and available during hermetic builds.
* `-DchecksumAlgorithm=SHA-512`: Use the SHA-512 algorithm for checksum computation to ensure post-quantum cryptography readiness.
* `-DchecksumMode=local`: Compute checksums locally from artifacts in your local Maven repository (`.m2`), rather than downloading pre-computed checksums from remote repositories.
References
  1. Use imperative mood language in documentation. (link)


WARNING: Maven support in Hermeto is experimental and may change without prior notice.

Hermeto supports Maven by reading a `lockfile.json` file in the project directory. To generate this file, use the link:https://github.com/chains-project/maven-lockfile[Maven Lockfile] plugin, which records resolved dependencies, plugins, and parent POM graphs. Hermeto downloads those artifacts into a local Maven repository layout and writes Maven settings so the build can run offline against that cache only.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Improve the clarity and precision of the description. Specifying 'configures Maven settings' or 'writes a Maven settings.xml file' is more accurate than 'writes Maven settings'. Also, 'these' is more appropriate than 'those' when referring to the resolved artifacts.

Hermeto supports Maven by reading a `lockfile.json` file in the project directory. To generate this file, use the link:https://github.com/chains-project/maven-lockfile[Maven Lockfile] plugin, which records resolved dependencies, plugins, and parent POM graphs. Hermeto downloads these artifacts into a local Maven repository layout and configures Maven settings so that the build can run offline using only that cache.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 3, 2026

🚀 Preview is available at: https://pr-620--konflux-docs.netlify.app

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant