org.apache.maven.project.interpolation
Class AbstractStringBasedModelInterpolator
java.lang.Object
org.codehaus.plexus.logging.AbstractLogEnabled
org.apache.maven.project.interpolation.AbstractStringBasedModelInterpolator
- All Implemented Interfaces:
- ModelInterpolator, LogEnabled, Initializable
- Direct Known Subclasses:
- RegexBasedModelInterpolator, StringSearchModelInterpolator
Deprecated.
@Deprecated
public abstract class AbstractStringBasedModelInterpolator
- extends AbstractLogEnabled
- implements ModelInterpolator, Initializable
Use a regular expression search to find and resolve expressions within the POM.
- Version:
- $Id: AbstractStringBasedModelInterpolator.java 987335 2010-08-19 22:26:55Z bentmann $
- Author:
- jdcasey Created on Feb 3, 2005
Method Summary |
protected abstract org.codehaus.plexus.interpolation.Interpolator |
createInterpolator()
Deprecated. |
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 org.codehaus.plexus.interpolation.Interpolator |
getInterpolator()
Deprecated. |
protected org.codehaus.plexus.interpolation.RecursionInterceptor |
getRecursionInterceptor()
Deprecated. |
void |
initialize()
Deprecated. |
Model |
interpolate(Model model,
File projectDir,
ProjectBuilderConfiguration config,
boolean debugEnabled)
Deprecated. |
Model |
interpolate(Model model,
Map<String,?> context)
Deprecated. |
Model |
interpolate(Model model,
Map<String,?> context,
boolean strict)
Deprecated. Use ModelInterpolator.interpolate(Model, File, ProjectBuilderConfiguration, boolean) instead. |
String |
interpolate(String src,
Model model,
File projectDir,
ProjectBuilderConfiguration config,
boolean debug)
Deprecated. Interpolates all expressions in the src parameter. |
protected String |
interpolateInternal(String src,
List<org.codehaus.plexus.interpolation.ValueSource> valueSources,
List<org.codehaus.plexus.interpolation.InterpolationPostProcessor> postProcessors,
boolean debug)
Deprecated. |
protected void |
setRecursionInterceptor(org.codehaus.plexus.interpolation.RecursionInterceptor recursionInterceptor)
Deprecated. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractStringBasedModelInterpolator
protected AbstractStringBasedModelInterpolator(PathTranslator pathTranslator)
- Deprecated.
AbstractStringBasedModelInterpolator
protected AbstractStringBasedModelInterpolator()
- Deprecated.
- Throws:
IOException
- This exception is not thrown any more, and needs to be removed.
interpolate
public Model interpolate(Model model,
Map<String,?> context)
throws ModelInterpolationException
- Deprecated.
- Specified by:
interpolate
in interface ModelInterpolator
- Throws:
ModelInterpolationException
interpolate
public Model interpolate(Model model,
Map<String,?> context,
boolean strict)
throws ModelInterpolationException
- Deprecated. Use
ModelInterpolator.interpolate(Model, File, ProjectBuilderConfiguration, boolean)
instead.
- 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:
interpolate
in interface ModelInterpolator
- 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,
File projectDir,
ProjectBuilderConfiguration config,
boolean debugEnabled)
throws ModelInterpolationException
- Deprecated.
- Specified by:
interpolate
in interface ModelInterpolator
- Throws:
ModelInterpolationException
interpolate
public 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:
interpolate
in interface ModelInterpolator
- Parameters:
overrideContext
- outputDebugMessages
-
- Throws:
ModelInterpolationException
createValueSources
protected List<org.codehaus.plexus.interpolation.ValueSource> createValueSources(Model model,
File projectDir,
ProjectBuilderConfiguration config)
- Deprecated.
createPostProcessors
protected List<org.codehaus.plexus.interpolation.InterpolationPostProcessor> createPostProcessors(Model model,
File projectDir,
ProjectBuilderConfiguration config)
- Deprecated.
interpolateInternal
protected 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
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 InitializationException
- Deprecated.
- Specified by:
initialize
in interface Initializable
- Throws:
InitializationException
getInterpolator
protected final org.codehaus.plexus.interpolation.Interpolator getInterpolator()
- Deprecated.
Copyright © 2001-2010 The Apache Software Foundation. All Rights Reserved.