Skip to content

Remove dead BeanConfigurator API and replace Plexus-coupled mojo configurator #13528

Closed

Description

@gnodet

Part of #13460 — Migrate Maven internals from v3 to v4 API

Context

The org.apache.maven.configuration package in impl/maven-core contains:

Public API (unused — zero callers in production code):

  • BeanConfigurator — single-method interface
  • BeanConfigurationRequest / DefaultBeanConfigurationRequest
  • BeanConfigurationException
  • BeanConfigurationValuePreprocessor
  • BeanConfigurationPathTranslator / BasedirBeanConfigurationPathTranslator

Internal (Plexus-coupled):

  • EnhancedComponentConfigurator — extends Plexus BasicComponentConfigurator
  • EnhancedConfigurationConverter — extends Plexus ObjectWithFieldsConverter
  • EnhancedConverterLookup — extends Plexus DefaultConverterLookup
  • EnhancedCompositeBeanHelper — record/constructor injection support

The internal classes import 37 Plexus types (BasicComponentConfigurator, ObjectWithFieldsConverter, ConverterLookup, ClassRealm, PlexusConfiguration, ExpressionEvaluator, Xpp3Dom, etc.).

The package is not exported in module-info.

Usage

  • BeanConfigurator interface: zero callers outside its own package
  • EnhancedComponentConfigurator: used in one place — DefaultMavenPluginManager, which selects "enhanced" vs "basic" configurator by name for v4 API mojos

Goal

  1. Drop the unused BeanConfigurator / BeanConfigurationRequest public API — no callers, no breakage
  2. Replace EnhancedComponentConfigurator with a v4-native mojo configuration mechanism using Maven's own DI/XML infrastructure instead of Plexus component configurator
  3. Removes a significant chunk of Plexus coupling from maven-core

Dependencies

None — self-contained. Can be picked up independently.

Complexity

Low-medium. The main work is writing a replacement mojo configurator that doesn't depend on Plexus internals.

Claude Code on behalf of Guillaume Nodet

Activity

  1. added
    enhancement
    on Oct 14, 2026
  2. added a commit that references this issue on Nov 6, 2026
    7c2ee31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions