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
|
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.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) 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.MavenExecutionException
IOException
protected 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.MavenExecutionException
protected 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.MavenExecutionException
Copyright © 2007–2017 The Apache Software Foundation. All rights reserved.