Class AbstractStringBasedModelInterpolator
java.lang.Object
org.codehaus.plexus.logging.AbstractLogEnabled
org.apache.maven.project.interpolation.AbstractStringBasedModelInterpolator
- All Implemented Interfaces:
- ModelInterpolator,- org.codehaus.plexus.logging.LogEnabled,- org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable
- Direct Known Subclasses:
- RegexBasedModelInterpolator,- StringSearchModelInterpolator
@Deprecated
public abstract class AbstractStringBasedModelInterpolator
extends org.codehaus.plexus.logging.AbstractLogEnabled
implements ModelInterpolator, org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable
Deprecated.
Use a regular expression search to find and resolve expressions within the POM.
- Author:
- jdcasey Created on Feb 3, 2005 TODO Consolidate this logic with the PluginParameterExpressionEvaluator, minus deprecations/bans.
- 
Field SummaryFields inherited from interface org.apache.maven.project.interpolation.ModelInterpolatorBUILD_TIMESTAMP_FORMAT_PROPERTY, DEFAULT_BUILD_TIMESTAMP_FORMAT, ROLE
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedDeprecated.protectedAbstractStringBasedModelInterpolator(PathTranslator pathTranslator) Deprecated.
- 
Method SummaryModifier and TypeMethodDescriptionprotected abstract org.codehaus.plexus.interpolation.InterpolatorDeprecated.protected List<org.codehaus.plexus.interpolation.InterpolationPostProcessor>createPostProcessors(Model model, File projectDir, ProjectBuilderConfiguration config) Deprecated.protected List<org.codehaus.plexus.interpolation.ValueSource>createValueSources(Model model, File projectDir, ProjectBuilderConfiguration config) Deprecated.protected final org.codehaus.plexus.interpolation.InterpolatorDeprecated.protected org.codehaus.plexus.interpolation.RecursionInterceptorDeprecated.voidDeprecated.interpolate(String src, Model model, File projectDir, ProjectBuilderConfiguration config, boolean debug) Deprecated.Interpolates all expressions in the src parameter.interpolate(Model model, File projectDir, ProjectBuilderConfiguration config, boolean debugEnabled) Deprecated.interpolate(Model model, Map<String, ?> context) Deprecated.interpolate(Model model, Map<String, ?> context, boolean strict) Deprecated.protected StringinterpolateInternal(String src, List<org.codehaus.plexus.interpolation.ValueSource> valueSources, List<org.codehaus.plexus.interpolation.InterpolationPostProcessor> postProcessors, boolean debug) Deprecated.protected voidsetRecursionInterceptor(org.codehaus.plexus.interpolation.RecursionInterceptor recursionInterceptor) Deprecated.Methods inherited from class org.codehaus.plexus.logging.AbstractLogEnabledenableLogging, getLogger, setupLogger, setupLogger, setupLogger
- 
Constructor Details- 
AbstractStringBasedModelInterpolatorDeprecated.
- 
AbstractStringBasedModelInterpolatorprotected AbstractStringBasedModelInterpolator()Deprecated.
 
- 
- 
Method Details- 
interpolateDeprecated.- Specified by:
- interpolatein interface- ModelInterpolator
- Throws:
- ModelInterpolationException
 
- 
interpolatepublic Model interpolate(Model model, Map<String, ?> context, boolean strict) throws ModelInterpolationExceptionDeprecated.Serialize the inbound Model instance to a StringWriter, perform the regex replacement to resolve POM expressions, then re-parse into the resolved Model instance.NOTE: This will result in a different instance of Model being returned!!! - Specified by:
- interpolatein interface- ModelInterpolator
- Parameters:
- model- The inbound Model instance, to serialize and reference for expression resolution
- context- The other context map to be used during resolution
- Returns:
- The resolved instance of the inbound Model. This is a different instance!
- Throws:
- ModelInterpolationException
 
- 
interpolatepublic Model interpolate(Model model, File projectDir, ProjectBuilderConfiguration config, boolean debugEnabled) throws ModelInterpolationException Deprecated.- Specified by:
- interpolatein interface- ModelInterpolator
- Throws:
- ModelInterpolationException
 
- 
interpolatepublic String interpolate(String src, Model model, File projectDir, ProjectBuilderConfiguration config, boolean debug) throws ModelInterpolationException Deprecated.Interpolates all expressions in the src parameter.The algorithm used for each expression is: - If it starts with either "pom." or "project.", the expression is evaluated against the model.
- If the value is null, get the value from the context.
- If the value is null, but the context contains the expression, don't replace the expression string with the value, and continue to find other expressions.
- If the value is null, get it from the model properties.
 - Specified by:
- interpolatein interface- ModelInterpolator
- Throws:
- ModelInterpolationException
 
- 
createValueSourcesprotected List<org.codehaus.plexus.interpolation.ValueSource> createValueSources(Model model, File projectDir, ProjectBuilderConfiguration config) Deprecated.
- 
createPostProcessorsprotected List<org.codehaus.plexus.interpolation.InterpolationPostProcessor> createPostProcessors(Model model, File projectDir, ProjectBuilderConfiguration config) Deprecated.
- 
interpolateInternalprotected String interpolateInternal(String src, List<org.codehaus.plexus.interpolation.ValueSource> valueSources, List<org.codehaus.plexus.interpolation.InterpolationPostProcessor> postProcessors, boolean debug) throws ModelInterpolationException Deprecated.- Throws:
- ModelInterpolationException
 
- 
getRecursionInterceptorprotected org.codehaus.plexus.interpolation.RecursionInterceptor getRecursionInterceptor()Deprecated.
- 
setRecursionInterceptorprotected void setRecursionInterceptor(org.codehaus.plexus.interpolation.RecursionInterceptor recursionInterceptor) Deprecated.
- 
createInterpolatorprotected abstract org.codehaus.plexus.interpolation.Interpolator createInterpolator()Deprecated.
- 
initializepublic void initialize() throws org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationExceptionDeprecated.- Specified by:
- initializein interface- org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable
- Throws:
- org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException
 
- 
getInterpolatorprotected final org.codehaus.plexus.interpolation.Interpolator getInterpolator()Deprecated.
 
- 
ModelInterpolator.interpolate(Model, File, ProjectBuilderConfiguration, boolean)instead.