public class ModelPreprocessor extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ModelPreprocessor.Environment |
static class |
ModelPreprocessor.ProjectInfo |
| Constructor and Description |
|---|
ModelPreprocessor() |
| Modifier and Type | Method and Description |
|---|---|
void |
addDependencies(ModelPreprocessor.Environment env)
Add dependencies for all projects.
|
protected void |
mergeModels(org.apache.sling.provisioning.model.Model base,
org.apache.sling.provisioning.model.Model additional)
Hook to change the merge behavior
|
static String |
nodeValue(org.apache.maven.model.Plugin plugin,
String name,
String defaultValue)
Gets plugins configuration from POM (string parameter).
|
protected org.apache.sling.provisioning.model.Model |
postProcessReadModel(org.apache.sling.provisioning.model.Model result)
Hook to post process the local model
|
protected org.apache.sling.provisioning.model.Model |
readLocalModel(org.apache.maven.project.MavenProject project,
String inlinedModel,
File modelDirectory,
String pattern,
org.codehaus.plexus.logging.Logger logger)
Read all model files from the directory in alphabetical order.
|
public void addDependencies(ModelPreprocessor.Environment env) throws org.apache.maven.MavenExecutionException
env - The environment with all maven settings and projectsorg.apache.maven.MavenExecutionException - If anything goes wrong.public static String nodeValue(org.apache.maven.model.Plugin plugin, String name, String defaultValue)
plugin - Pluginname - Configuration parameter.defaultValue - Default value that is returned if parameter is not setprotected org.apache.sling.provisioning.model.Model readLocalModel(org.apache.maven.project.MavenProject project,
String inlinedModel,
File modelDirectory,
String pattern,
org.codehaus.plexus.logging.Logger logger)
throws org.apache.maven.MavenExecutionException,
IOException
project - The current maven projectinlinedModel - the inlined model to be merged with the models in modelDirectory (may be null)modelDirectory - The directory to scan for modelspattern - Pattern used to find the textual models within the modelDirectorylogger - The loggerorg.apache.maven.MavenExecutionExceptionIOExceptionprotected org.apache.sling.provisioning.model.Model postProcessReadModel(org.apache.sling.provisioning.model.Model result)
throws org.apache.maven.MavenExecutionException
result - The read modelorg.apache.maven.MavenExecutionExceptionprotected void mergeModels(org.apache.sling.provisioning.model.Model base,
org.apache.sling.provisioning.model.Model additional)
throws org.apache.maven.MavenExecutionException
base - The base modeladditional - The additional modelorg.apache.maven.MavenExecutionExceptionCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.