org.apache.maven.plugin.dependency.utils
Class DependencyUtil
java.lang.Object
org.apache.maven.plugin.dependency.utils.DependencyUtil
public final class DependencyUtil
- extends java.lang.Object
Utility class with static helper methods
- Version:
- $Id: DependencyUtil.java 552528 2007-07-02 16:12:47Z markh $
- Author:
- Brian Fox
Method Summary |
static java.lang.String |
getFormattedFileName(org.apache.maven.artifact.Artifact artifact,
boolean removeVersion)
Builds the file name. |
static java.io.File |
getFormattedOutputDirectory(boolean useSubdirsPerType,
boolean useSubdirPerArtifact,
boolean useRepositoryLayout,
boolean removeVersion,
java.io.File outputDirectory,
org.apache.maven.artifact.Artifact artifact)
Formats the outputDirectory based on type. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DependencyUtil
public DependencyUtil()
getFormattedFileName
public static java.lang.String getFormattedFileName(org.apache.maven.artifact.Artifact artifact,
boolean removeVersion)
- Builds the file name. If removeVersion is set, then the file name must be
reconstructed from the artifactId, Classifier (if used) and Type.
Otherwise, this method returns the artifact file name.
- Parameters:
artifact
- File to be formatted.removeVersion
- Specifies if the version should be removed from the file name.
- Returns:
- Formatted file name in the format
artifactId-[version]-[classifier].[type]
getFormattedOutputDirectory
public static java.io.File getFormattedOutputDirectory(boolean useSubdirsPerType,
boolean useSubdirPerArtifact,
boolean useRepositoryLayout,
boolean removeVersion,
java.io.File outputDirectory,
org.apache.maven.artifact.Artifact artifact)
- Formats the outputDirectory based on type.
- Parameters:
useSubdirsPerType
- if a new sub directory should be used for each type.useSubdirPerArtifact
- if a new sub directory should be used for each artifact.useRepositoryLayout
- if dependendies must be moved into a Maven repository layout, if
set, other settings will be ignored.removeVersion
- if the version must not be mentioned in the filenameoutputDirectory
- base outputDirectory.artifact
- information about the artifact.
- Returns:
- a formatted File object to use for output.
Copyright © 2002-2009 Apache Software Foundation. All Rights Reserved.