Add Log.child(), Log.problem(), and injection-point-aware DI factory

- Injector.bindFactory(Class, Function<Key, T>): factory-based binding
  that receives the full injection-point Key (including @Named qualifier),
  enabling qualifier-derived instances like hierarchical logger names.

- Log.child(String): returns a child logger with hierarchical naming
  (e.g. "compiler:compile" → "compiler:compile.diagnostics"), useful
  when plugins delegate to sub-components that need independently
  filterable log output.

- Log.problem(BuilderProblem): reports a structured problem to the
  diagnostic collector with dedup key, suggestion, and documentation
  URL, while also logging at the appropriate level. Uses a thread-local
  flag to prevent double-counting by BuildReportCollector's WARN
  auto-promotion.

- DefaultMavenPluginManager: switched from bindInstance to bindFactory
  for Log injection, so @Inject @Named("diagnostics") Log in a
  DI-managed plugin component gets "compiler:compile.diagnostics".

- Fixed pre-existing bug: DefaultLog.warn(Supplier, Throwable) was
  calling logger.info() instead of logger.warn().

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
8 files changed
tree: 34cc80fa2bac2ffcd175fb44f49c84bd466b02f3
  1. .github/
  2. .idea/
  3. .mvn/
  4. apache-maven/
  5. api/
  6. compat/
  7. impl/
  8. its/
  9. src/
  10. .asf.yaml
  11. .git-blame-ignore-revs
  12. .gitattributes
  13. .gitignore
  14. AGENTS.md
  15. CONTRIBUTING.md
  16. deploySite.sh
  17. doap_Maven.rdf
  18. Jenkinsfile
  19. LICENSE
  20. NOTICE
  21. pom.xml
  22. README.md
  23. SECURITY.md
  24. THREAT_MODEL.md
README.md

Apache Maven

Apache License, Version 2.0, January 2004 Reproducible Builds

Apache Maven is a software project management and comprehension tool. Based on the concept of a project object model (POM), Maven can manage a project's build, reporting and documentation from a central piece of information.

If you think you have found a bug, please file an issue in the Maven Issue Tracker.

Documentation

More information can be found on Apache Maven Homepage. Questions related to the usage of Maven should be posted on the Maven User List.

Where can I get the latest release?

You can download the release source from our download page.

Contributing

If you are interested in the development of Maven, please consult the documentation first and afterward you are welcome to join the developers mailing list to ask questions or discuss new ideas/features/bugs etc.

Take a look into the contribution guidelines.

License

This code is under the Apache License, Version 2.0, January 2004.

See the NOTICE file for required notices and attributions.

Donations

Do you like Apache Maven? Then donate back to the ASF to support the development.

Quick Build

If you want to bootstrap Maven, you'll need:

  • Java 17+
  • Maven 3.9.0 or later
  • Run Maven, specifying a location into which the completed Maven distro should be installed:
    mvn -DdistributionTargetDir="$HOME/app/maven/apache-maven-4.1.x-SNAPSHOT" clean package