Deprecated API

Contents

  • Deprecated Interfaces
    Interface
    Description
    Use Logger instead, which provides a richer API including structured key-value pairs, lazy message evaluation, and a fluent builder. Inject org.apache.maven.api.logging.Logger in your Mojo instead of Log.
  • Deprecated Annotation Interfaces
    Annotation Interface
    Description
    Unfinished — do not use. The Guice/Sisu binding for this scope is commented out in MojoExecutionScopeModule, so the annotation has no effect. Additionally, unlike SessionScoped, the mojo execution scope does not create a proxy when a scoped component is injected into a wider scope, causing a DIException at startup.

    For v4 plugins, no scope annotation is needed: DefaultMavenPluginManager creates a fresh injector per mojo execution and binds Session, Project, MojoExecution, and Log directly via bindInstance, so plain @Inject is sufficient.

    For legacy extension components in the shared Plexus/Sisu container, use org.apache.maven.execution.scope.MojoExecutionScoped instead.