org.apache.maven.shared.mapping
Class MappingUtils

java.lang.Object
  extended by org.apache.maven.shared.mapping.MappingUtils

public class MappingUtils
extends Object

Utilities used to evaluate an expression.

The expression might use any field of the Artifact interface. Some examples might be:

Although parts of this code comes from the Assembly Plugin, it cannot be shared with the Assembly Plugin. The reason for this is that the Assembly Plugin always uses a prefix for the expressions, whereas this code does not.

Version:
$Id: MappingUtils.java 1512271 2013-08-09 12:03:31Z dennisl $
Author:
Stephane Nicoll, Dennis Lundberg

Field Summary
static String DEFAULT_FILE_NAME_MAPPING
           
static String DEFAULT_FILE_NAME_MAPPING_CLASSIFIER
           
 
Constructor Summary
MappingUtils()
           
 
Method Summary
static String evaluateFileNameMapping(String expression, Artifact artifact)
          Evaluates the specified expression for the given artifact.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_FILE_NAME_MAPPING

public static final String DEFAULT_FILE_NAME_MAPPING
See Also:
Constant Field Values

DEFAULT_FILE_NAME_MAPPING_CLASSIFIER

public static final String DEFAULT_FILE_NAME_MAPPING_CLASSIFIER
See Also:
Constant Field Values
Constructor Detail

MappingUtils

public MappingUtils()
Method Detail

evaluateFileNameMapping

public static String evaluateFileNameMapping(String expression,
                                             Artifact artifact)
                                      throws InterpolationException
Evaluates the specified expression for the given artifact.

Parameters:
expression - the expression to evaluate
artifact - the artifact to use as value object for tokens
Returns:
expression the evaluated expression
Throws:
InterpolationException


Copyright © 2002–2013 The Apache Software Foundation. All rights reserved.