org.apache.maven.plugin.ear.output
Class AbstractFileNameMapping

java.lang.Object
  extended by org.apache.maven.plugin.ear.output.AbstractFileNameMapping
All Implemented Interfaces:
FileNameMapping
Direct Known Subclasses:
FullFileNameMapping, NoVersionFileNameMapping, NoVersionForEjbFileNameMapping, StandardFileNameMapping

public abstract class AbstractFileNameMapping
extends Object
implements FileNameMapping

A base class used to generate the standard name of an artifact instead of relying on the (potentially) wrong file name provided by Artifact.getFile().

Author:
Stephane Nicoll

Constructor Summary
AbstractFileNameMapping()
           
 
Method Summary
protected  String generateFileName(Artifact a, boolean addVersion)
          Generates a standard file name for the specified Artifact.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.maven.plugin.ear.output.FileNameMapping
mapFileName
 

Constructor Detail

AbstractFileNameMapping

public AbstractFileNameMapping()
Method Detail

generateFileName

protected String generateFileName(Artifact a,
                                  boolean addVersion)
Generates a standard file name for the specified Artifact.

Returns something like artifactId-version[-classifier].extension if addVersion is true. Otherwise it generates something like artifactId[-classifier].extension

Parameters:
a - the artifact to generate a filename from
addVersion - whether the version should be added
Returns:
the filename, with a standard format


Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.