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 Description DefaultProfileInjector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
inject(org.apache.maven.model.Profile profile, org.apache.maven.model.Model model)
protected void
injectPlugins(org.apache.maven.model.PluginContainer profileContainer, org.apache.maven.model.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
-
-
-
Method Detail
-
inject
public void inject(org.apache.maven.model.Profile profile, org.apache.maven.model.Model model)
- Specified by:
inject
in interfaceProfileInjector
-
injectPlugins
protected void injectPlugins(org.apache.maven.model.PluginContainer profileContainer, org.apache.maven.model.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
-
-