Repository navigation
feat(manager): Maven repository ids and resolver configuration for zpm - #2614
Merged
Merged
Conversation
…m properties zpm built its resolver sessions from its own fixed settings only, so standard maven-resolver configuration had no effect on it. In particular a remote repository group-id filter (aether.remoteRepositoryFilter.groupId) could not stop zpm from requesting every artifact from each configured repository in turn, and an unreachable repository then cost a connect timeout per uncached artifact. zpm now copies -Daether.* system properties into its resolver sessions, as Maven does, before its own settings. When zpm runs inside Maven via zpm-maven-plugin it inherits Maven's -D properties, including those from .mvn/maven.config. zpm names remote repositories after their host, so this repository adds a group-id filter file for maven.packages.aklivity.io alongside the one for Maven's github repository id. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_015AUJDQphhDuZTjetPaNsBg
zpm.json listed repositories as bare URLs, so zpm had no repository id to use and derived one from each URL's host. That host was also the key for the settings.xml server holding the repository's credentials, and for any maven-resolver per-repository configuration such as a group-id filter file, so neither could be shared with a Maven build of the same repositories. zpm.json repositories may now be an object mapping each repository id to its URL, in resolution order. The id names the remote repository and selects its settings.xml server, as in Maven. The array form is still accepted, with the host as the id, as before. cloud/docker-image names its repositories github and central, so the group-id filter file for github covers zpm too and the host-named copy is removed. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_015AUJDQphhDuZTjetPaNsBg
jfallows
added a commit
that referenced
this pull request
Sep 26, 2026
#2614) * feat(manager): apply maven-resolver configuration from aether.* system properties zpm built its resolver sessions from its own fixed settings only, so standard maven-resolver configuration had no effect on it. In particular a remote repository group-id filter (aether.remoteRepositoryFilter.groupId) could not stop zpm from requesting every artifact from each configured repository in turn, and an unreachable repository then cost a connect timeout per uncached artifact. zpm now copies -Daether.* system properties into its resolver sessions, as Maven does, before its own settings. When zpm runs inside Maven via zpm-maven-plugin it inherits Maven's -D properties, including those from .mvn/maven.config. zpm names remote repositories after their host, so this repository adds a group-id filter file for maven.packages.aklivity.io alongside the one for Maven's github repository id. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_015AUJDQphhDuZTjetPaNsBg * feat(manager): name zpm.json repositories with Maven repository ids zpm.json listed repositories as bare URLs, so zpm had no repository id to use and derived one from each URL's host. That host was also the key for the settings.xml server holding the repository's credentials, and for any maven-resolver per-repository configuration such as a group-id filter file, so neither could be shared with a Maven build of the same repositories. zpm.json repositories may now be an object mapping each repository id to its URL, in resolution order. The id names the remote repository and selects its settings.xml server, as in Maven. The array form is still accepted, with the host as the id, as before. cloud/docker-image names its repositories github and central, so the group-id filter file for github covers zpm too and the host-named copy is removed. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_015AUJDQphhDuZTjetPaNsBg --------- Co-authored-by: Claude <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
zpm's repository handling couldn't share configuration with a Maven build of the same repositories:
zpm.jsonlisted repositories as bare URLs. zpm derived each repository's id from its host, and that host was also the key for the repository'ssettings.xmlserver and for any per-repository resolver configuration.As a result, zpm requested every artifact from each repository in turn, and an unreachable repository cost a 10s connect timeout per uncached artifact.
manager (zpm)
-Daether.*system properties are applied to zpm's resolver sessions, the same way Maven passes-Dproperties to its resolver.noopsync-context factory and bounded timeouts still take precedence.zpm-maven-plugin, it shares Maven's JVM system properties, so.mvn/maven.configapplies tozpm resolveas well. Maven sets them with${session.rootDirectory}already interpolated.zpm.json.repositoriesmay now be an object mapping each repository id to its URL, in resolution order:settings.xmlserver, as in Maven.cloud/docker-image
zpm.json.templatenames its repositoriesgithubandcentral. The existing.mvn/rrf/groupId-github.txttherefore covers zpm too, and no host-named filter file is needed.Tests
ZpmCacheRepositoryFilterTest. A counting HTTP repository is listed first and filtered to another group; the artifact lives in a second, file-based repository.ZpmConfigurationTest. The object form reads in declaration order and writes back as an object. The existing array and empty-list cases are unchanged.ZpmDependencyCommandTest. A named repository takes its id and its matchingsettings.xmlserver's credentials. An array entry still takes its host as the id.Verification
./mvnw clean install -pl managerpasses: 33 tests, checkstyle, license and coverage../mvnw package -pl cloud/docker-image -Ddocker.skiprenders the object-form template andzpm-maven-pluginresolves all 428 dependencies.zpm resolveon that renderedzpm.jsonwith a local repository holding onlyio/aklivity, so every third-party artifact had to be downloaded:maven.packages.aklivity.io-Daether.*.mvn/maven.config's filter properties,groupId-github.txtonlyFixes # (none)
🤖 Generated with Claude Code
https://claude.ai/code/session_015AUJDQphhDuZTjetPaNsBg