org.apache.maven.project.injection

## Class DefaultProfileInjector

- java.lang.Object
- - org.apache.maven.project.injection.DefaultProfileInjector

- All Implemented Interfaces:
    ProfileInjector

      public class DefaultProfileInjector
      extends java.lang.Object
      implements ProfileInjector

  Inject profile data into a Model, using the profile as the dominant data source, and persisting results of the injection in the Model. This will look similar to the ModelUtils/DefaultModelInheritanceAssembler code, but they are distinct. In model inheritance, the child provides data dominance AND persists the results of the merge...sort of a 'merge-out' system. In this system, the profile is dominant, but the model receives the merge result...sort of a 'merge-in' system. The two pieces of code look like they could be combined with a set of flags to determine which direction to merge 'to', but there are enough differences in the code to justify the extra code involved with separating them, in order to simplify the logic.

- - ### Field Summary

    - ### Fields inherited from interface org.apache.maven.project.injection.ProfileInjector

      `ROLE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultProfileInjector()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `inject(Profile profile, Model model)`
    `protected void` | `injectPlugins(PluginContainer profileContainer, PluginContainer modelContainer)` This should be the resulting ordering of plugins after injection: Given: model: X -> A -> B -> D -> E profile: Y -> A -> C -> D -> F Result: X -> Y -> A -> B -> C -> D -> E -> F

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DefaultProfileInjector

          public DefaultProfileInjector()

  - ### Method Detail

    - #### inject

          public void inject(Profile profile,
                    Model model)

      Specified by:
        `inject` in interface `ProfileInjector`

    - #### injectPlugins

          protected void injectPlugins(PluginContainer profileContainer,
                           PluginContainer modelContainer)

      This should be the resulting ordering of plugins after injection: Given: model: X -> A -> B -> D -> E profile: Y -> A -> C -> D -> F Result: X -> Y -> A -> B -> C -> D -> E -> F