public class DefaultProfileInjector extends java.lang.Object implements ProfileInjector
ROLE
Constructor and Description |
---|
DefaultProfileInjector() |
Modifier and Type | Method and Description |
---|---|
void |
inject(Profile profile,
Model model) |
private void |
injectBuild(Profile profile,
Model model) |
private void |
injectConfigurationContainer(ConfigurationContainer profileContainer,
ConfigurationContainer modelContainer) |
private java.util.List |
injectDependencies(java.util.List profileDeps,
java.util.List modelDeps) |
private void |
injectDependencyManagement(Profile profile,
Model model) |
private void |
injectDistributionManagement(Profile profile,
Model model) |
private void |
injectModules(Profile profile,
Model model)
Append modules specified in the profile to the end of the list supplied by the model, if
they don't already exist.
|
private void |
injectPluginDefinition(Plugin profilePlugin,
Plugin modelPlugin) |
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
|
private void |
injectReporting(Profile profile,
Model model) |
private org.codehaus.plexus.util.xml.Xpp3Dom |
merge(org.codehaus.plexus.util.xml.Xpp3Dom dominant,
org.codehaus.plexus.util.xml.Xpp3Dom recessive)
Merge two DOMs.
|
private void |
mergeReportPlugins(ReportPlugin dominant,
ReportPlugin recessive) |
public void inject(Profile profile, Model model)
inject
in interface ProfileInjector
protected void injectPlugins(PluginContainer profileContainer, PluginContainer modelContainer)
private void injectPluginDefinition(Plugin profilePlugin, Plugin modelPlugin)
private org.codehaus.plexus.util.xml.Xpp3Dom merge(org.codehaus.plexus.util.xml.Xpp3Dom dominant, org.codehaus.plexus.util.xml.Xpp3Dom recessive)
Use this method instead of a direct call to Xpp3Dom.mergeXpp3Dom(Xpp3Dom, Xpp3Dom)
.
Profiles are dominant, thus they are merge targets, but they may be merged in several times
(e.g. if they are inherited). So with the second merge, you don't get the profile's original
DOM, but an already merged one.
dominant
- Dominant DOMrecessive
- Recessive DOMprivate void injectConfigurationContainer(ConfigurationContainer profileContainer, ConfigurationContainer modelContainer)
private void injectModules(Profile profile, Model model)
private void injectDistributionManagement(Profile profile, Model model)
private void mergeReportPlugins(ReportPlugin dominant, ReportPlugin recessive)
private java.util.List injectDependencies(java.util.List profileDeps, java.util.List modelDeps)