You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "slachiewicz (via GitHub)" <gi...@apache.org> on 2026/09/30 18:39:10 UTC
[PR] Build an ScmManager without Sisu through ServiceLoader [maven-scm]
slachiewicz opened a new pull request, #1418:
URL: https://github.com/apache/maven-scm/pull/1418
Adds `BasicScmManager.fromServiceLoader(ClassLoader)`, which builds a populated `ScmManager` without a Sisu container, and registers the five providers for `ServiceLoader`. Closes #1417.
- Providers are keyed by their `@Named` value (`javax.inject` or `jakarta.inject`, read reflectively because maven-scm-api has no `javax.inject` dependency), the same key Sisu uses, so `git` and `jgit` stay distinct. A provider without `@Named` falls back to its SCM type.
- A provider that cannot be loaded, for example the jgit provider without JGit on the class path, is skipped with a warning, as Sisu skips a bean it cannot load. The other providers are still registered.
- `JGitScmProvider` gets a public no-arg constructor for `ServiceLoader`. It never prompts: credential items that need input are refused, and informational messages are dropped. The `@Inject` constructor is unchanged, so Sisu users keep the interactive prompter. Like the Sisu route, which also instantiates every provider, creating the jgit provider sets JGit's default `CredentialsProvider`.
- The Sisu index files are unchanged.
- The test sits in maven-scm-client because it is the one module that already depends on all providers; putting it next to `DefaultScmManager` would create a module cycle through maven-scm-test.
Verified: `mvn verify` → 343 tests, 0 failures (340 before); the new unload test fails against a plain for-each over `ServiceLoader`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Build an ScmManager without Sisu through ServiceLoader [maven-scm]
Posted by "slachiewicz (via GitHub)" <gi...@apache.org>.
slachiewicz closed pull request #1418: Build an ScmManager without Sisu through ServiceLoader
URL: https://github.com/apache/maven-scm/pull/1418
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Build an ScmManager without Sisu through ServiceLoader [maven-scm]
Posted by "slachiewicz (via GitHub)" <gi...@apache.org>.
slachiewicz commented on PR #1418:
URL: https://github.com/apache/maven-scm/pull/1418#issuecomment-6023147661
Not needed: Maven 4 API mojos will inject Sisu components from their plugin realm through `javax.inject` (https://github.com/apache/maven/issues/13326), so the Maven 4 port injects this manager as on Maven 3. Tracked in https://github.com/apache/maven/issues/13309.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org