Interface PropertyContributor

All Superinterfaces:
SpiService

@Experimental @Consumer @Named public interface PropertyContributor extends SpiService
Component able to contribute to Maven session user properties. This SPI component is invoked very early, while there is no session created yet.
Since:
4.0.0
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    contribute(Map<String,String> userProperties)
    Invoked just before session is created with a mutable map that carries collected user properties so far.
    default Map<String,String>
    contribute(ProtoSession protoSession)
    Invoked just before session is created with proto session instance.
  • Method Details

    • contribute

      default void contribute(Map<String,String> userProperties)
      Invoked just before session is created with a mutable map that carries collected user properties so far.
      Parameters:
      userProperties - The mutable user properties, never null.
      See Also:
    • contribute

      default Map<String,String> contribute(ProtoSession protoSession)
      Invoked just before session is created with proto session instance. The proto session contains user and system properties collected so far, along with other information. This method should return altered (contributions applied) user properties, not only the "new" or "added" properties!
      Parameters:
      protoSession - The proto session, never null.
      Returns:
      The user properties with contributions.