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.
-
-
Field Summary
Fields Modifier and Type Field Description private org.codehaus.plexus.interpolation.InterpolatorinterpolatorDeprecated.private PathTranslatorpathTranslatorDeprecated.private static java.util.List<java.lang.String>PROJECT_PREFIXESDeprecated.private org.codehaus.plexus.interpolation.RecursionInterceptorrecursionInterceptorDeprecated.private static java.util.List<java.lang.String>TRANSLATED_PATH_EXPRESSIONSDeprecated.-
Fields inherited from interface org.apache.maven.project.interpolation.ModelInterpolator
BUILD_TIMESTAMP_FORMAT_PROPERTY, DEFAULT_BUILD_TIMESTAMP_FORMAT, ROLE
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractStringBasedModelInterpolator()Deprecated.protectedAbstractStringBasedModelInterpolator(PathTranslator pathTranslator)Deprecated.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected abstract org.codehaus.plexus.interpolation.InterpolatorcreateInterpolator()Deprecated.protected java.util.List<org.codehaus.plexus.interpolation.InterpolationPostProcessor>createPostProcessors(Model model, java.io.File projectDir, ProjectBuilderConfiguration config)Deprecated.protected java.util.List<org.codehaus.plexus.interpolation.ValueSource>createValueSources(Model model, java.io.File projectDir, ProjectBuilderConfiguration config)Deprecated.protected org.codehaus.plexus.interpolation.InterpolatorgetInterpolator()Deprecated.protected org.codehaus.plexus.interpolation.RecursionInterceptorgetRecursionInterceptor()Deprecated.voidinitialize()Deprecated.java.lang.Stringinterpolate(java.lang.String src, Model model, java.io.File projectDir, ProjectBuilderConfiguration config, boolean debug)Deprecated.Interpolates all expressions in the src parameter.Modelinterpolate(Model model, java.io.File projectDir, ProjectBuilderConfiguration config, boolean debugEnabled)Deprecated.Modelinterpolate(Model model, java.util.Map<java.lang.String,?> context)Deprecated.Modelinterpolate(Model model, java.util.Map<java.lang.String,?> context, boolean strict)Deprecated.protected java.lang.StringinterpolateInternal(java.lang.String src, java.util.List<org.codehaus.plexus.interpolation.ValueSource> valueSources, java.util.List<org.codehaus.plexus.interpolation.InterpolationPostProcessor> postProcessors, boolean debug)Deprecated.protected voidsetRecursionInterceptor(org.codehaus.plexus.interpolation.RecursionInterceptor recursionInterceptor)Deprecated.
-
-
-
Field Detail
-
PROJECT_PREFIXES
private static final java.util.List<java.lang.String> PROJECT_PREFIXES
Deprecated.
-
TRANSLATED_PATH_EXPRESSIONS
private static final java.util.List<java.lang.String> TRANSLATED_PATH_EXPRESSIONS
Deprecated.
-
pathTranslator
@Requirement private PathTranslator pathTranslator
Deprecated.
-
interpolator
private org.codehaus.plexus.interpolation.Interpolator interpolator
Deprecated.
-
recursionInterceptor
private org.codehaus.plexus.interpolation.RecursionInterceptor recursionInterceptor
Deprecated.
-
-
Constructor Detail
-
AbstractStringBasedModelInterpolator
protected AbstractStringBasedModelInterpolator(PathTranslator pathTranslator)
Deprecated.
-
AbstractStringBasedModelInterpolator
protected AbstractStringBasedModelInterpolator()
Deprecated.
-
-
Method Detail
-
interpolate
public Model interpolate(Model model, java.util.Map<java.lang.String,?> context) throws ModelInterpolationException
Deprecated.- Specified by:
interpolatein interfaceModelInterpolator- Throws:
ModelInterpolationException
-
interpolate
public Model interpolate(Model model, java.util.Map<java.lang.String,?> context, boolean strict) throws ModelInterpolationException
Deprecated.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 interfaceModelInterpolator- Parameters:
model- The inbound Model instance, to serialize and reference for expression resolutioncontext- The other context map to be used during resolution- Returns:
- The resolved instance of the inbound Model. This is a different instance!
- Throws:
ModelInterpolationException
-
interpolate
public Model interpolate(Model model, java.io.File projectDir, ProjectBuilderConfiguration config, boolean debugEnabled) throws ModelInterpolationException
Deprecated.- Specified by:
interpolatein interfaceModelInterpolator- Throws:
ModelInterpolationException
-
interpolate
public java.lang.String interpolate(java.lang.String src, Model model, java.io.File projectDir, ProjectBuilderConfiguration config, boolean debug) throws ModelInterpolationExceptionDeprecated.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 interfaceModelInterpolator- Throws:
ModelInterpolationException
-
createValueSources
protected java.util.List<org.codehaus.plexus.interpolation.ValueSource> createValueSources(Model model, java.io.File projectDir, ProjectBuilderConfiguration config)
Deprecated.
-
createPostProcessors
protected java.util.List<org.codehaus.plexus.interpolation.InterpolationPostProcessor> createPostProcessors(Model model, java.io.File projectDir, ProjectBuilderConfiguration config)
Deprecated.
-
interpolateInternal
protected java.lang.String interpolateInternal(java.lang.String src, java.util.List<org.codehaus.plexus.interpolation.ValueSource> valueSources, java.util.List<org.codehaus.plexus.interpolation.InterpolationPostProcessor> postProcessors, boolean debug) throws ModelInterpolationExceptionDeprecated.- Throws:
ModelInterpolationException
-
getRecursionInterceptor
protected org.codehaus.plexus.interpolation.RecursionInterceptor getRecursionInterceptor()
Deprecated.
-
setRecursionInterceptor
protected void setRecursionInterceptor(org.codehaus.plexus.interpolation.RecursionInterceptor recursionInterceptor)
Deprecated.
-
createInterpolator
protected abstract org.codehaus.plexus.interpolation.Interpolator createInterpolator()
Deprecated.
-
initialize
public void initialize() throws org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationExceptionDeprecated.- Specified by:
initializein interfaceorg.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable- Throws:
org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException
-
getInterpolator
protected final org.codehaus.plexus.interpolation.Interpolator getInterpolator()
Deprecated.
-
-