This is an automated email from the ASF dual-hosted git repository.

olamy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-dist-tool.git


The following commit(s) were added to refs/heads/master by this push:
     new 448e205  Add documentation about the API_TOKEN and do not use it for 
JsoupRetry
448e205 is described below

commit 448e2052bed2b219650fd57c891699152c35d4cf
Author: Olivier Lamy <[email protected]>
AuthorDate: Thu Oct 29 16:44:49 2026 +1000

    Add documentation about the API_TOKEN and do not use it for JsoupRetry
    
    Signed-off-by: Olivier Lamy <[email protected]>
---
 README.md                                                 | 7 +++++--
 src/main/java/org/apache/maven/dist/tools/JsoupRetry.java | 1 -
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/README.md b/README.md
index 1aa87f9..7b479f7 100644
--- a/README.md
+++ b/README.md
@@ -36,10 +36,13 @@ Configuration
 
 ### API_TOKEN
 
-The `API_TOKEN` environment variable is required to authenticate HTTP requests 
against the
-[Apache Jenkins instance](https://ci-maven.apache.org/) and other Apache 
infrastructure.
+The `API_TOKEN` environment variable is needed by the two Jenkins reports 
(`list-master-jobs` and
+`list-branches`), since `ci-maven.apache.org` doesn't allow anonymous access 
to its JSON API.
 It is a Base64-encoded `username:apitoken` string used for HTTP Basic 
Authentication.
 
+Everything else (gitbox, maven.apache.org, dist/archive.apache.org, 
lists.apache.org) is read
+anonymously. Without the token the two reports still build, but come out empty.
+
 #### Generating the Token
 
 1. Log in to the [Apache Jenkins instance](https://ci-maven.apache.org/).
diff --git a/src/main/java/org/apache/maven/dist/tools/JsoupRetry.java 
b/src/main/java/org/apache/maven/dist/tools/JsoupRetry.java
index c08b8ef..f8366e5 100644
--- a/src/main/java/org/apache/maven/dist/tools/JsoupRetry.java
+++ b/src/main/java/org/apache/maven/dist/tools/JsoupRetry.java
@@ -49,7 +49,6 @@ public class JsoupRetry {
         for (int i = 1; i <= MAX_RETRY; i++) {
             try {
                 return Jsoup.connect(url)
-                        .header("Authorization", "Basic " + 
System.getenv("API_TOKEN"))
                         .userAgent("Mozilla/5.0 (Windows NT 6.1; Win64; x64; 
rv:25.0) Gecko/20100101 Firefox/25.0")
                         .maxBodySize(0)
                         .get();

Reply via email to