Repository navigation
Maven build failures #474
Copy link
Copy link
Closed
Labels
questionFurther information is requestedFurther information is requested
Description
Highly likely this is human error on my part but I'm struggling with some errors on my maven builds in forgejo where I've injected this maven config. Most of a dependencies are working, i.e downloading from the proxy.
<settings xmlns="http://maven.apache.org/SETTINGS/1.2.0">
<mirrors>
<mirror>
<id>pkgsproxy</id>
<mirrorOf>central</mirrorOf>
<url>http://<pkgproxy>:8080/maven/</url>
</mirror>
</mirrors>
</settings>
cat config.yaml
# Ansible managed
listen: "0.0.0.0:8080"
base_url: "http://<pkgsproxy>:8080"
http_timeout: "5m"
cache_metadata: true
storage:
url: "file:///var/cache/pkgsproxy"
max_size: ""
database:
driver: "sqlite"
path: "/var/lib/pkgsproxy/proxy.db"
url: ""
log:
level: "info"
format: "text"
access_log:
path: ""
upstream:
allow_private_hosts: []
allow_loopback: false
generic:
apache-archive: https://archive.apache.org
github: https://github.com
github-api: https://api.github.com
godl: https://dl.google.com/go
gosumdb: https://sum.golang.org
nodejs: https://nodejs.org
generic_artifacts:
apache-archive:
- dist/(?P<name>maven)/maven-3/(?P<version>[^/]+)/binaries/(?P<file>[^/]+)
- dist/maven/(?P<name>mvnd)/(?P<version>[^/]+)/(?P<file>[^/]+)
godl:
- (?P<file>go(?P<version>[0-9][^/]*?)\.[a-z0-9]+-[a-z0-9]+\.(?:tar\.gz|zip)(?:\.sha256)?)
nodejs:
- dist/(?P<version>v[0-9][^/]*)/(?P<file>[^/]+)
gradle:
build_cache:
read_only: false
max_upload_size: "100MB"
max_age: "168h"
sweep_interval: "10m"
health:
storage_probe_interval: "30s"
cooldown:
{}
the errors i'm getting on the second run are as an example
[WARNING] Could not validate integrity of download from http://xxxxx:8080/maven/org/apache/maven/surefire/surefire-api/3.0.0-M5/surefire-api-3.0.0-M5.pom
and the fatal error
ERROR] Error resolving version for plugin 'org.codehaus.mojo:tomcat-maven-plugin' from the repositories [local (/root/.m2/xxxx), pkgsproxy (http://xxx:8080/maven/)]: Plugin not found in any plugin repository -> [Help 1]#
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested
Activity
gilesw commentedon Oct 14, 2026
multiple runs have removed the error but the warnings remain
andrew commentedon Oct 14, 2026
I couldn't reproduce this on current main: through the proxy,
surefire-api-3.0.0-M5.pomand its.sha1match each other and Maven Central, both on the first fetch and from cache, andorg/codehaus/mojo/tomcat-maven-plugin/maven-metadata.xmlcomes through unchanged. A few things would help narrow it down:proxy -version) and the Maven version from the Forgejo runner.mvn -Xoutput around one of the integrity warnings, which shows the checksum Maven expected, what it got, and where it fetched it from..pom, its.sha1, and thetomcat-maven-pluginmaven-metadata.xmlfrom the run that failed.gilesw commentedon Oct 14, 2026
hi @andrew sorry you were an eager beaver before i managed to get back on this thread. I found a few things that have been fixed with some pr's I've just added. Some things weren't being cache because I had central which I've now swapped with * but then I was also rate limited then banned by maven central. I've submitted a set of new pr's that handle the rate limiting and cache the checksums to cover that rate limiting.
andrew commentedon Oct 15, 2026
Thanks for tracking this down.
<mirrorOf>*</mirrorOf>explains the missing plugin, and #484 now caches checksum and signature files with their artifacts, so a build no longer refetches them from Central each run. The rate-limit handling is being worked through in #483.