org.apache.maven.plugin.dependency.utils
public final class DependencyUtil extends java.lang.Object
Constructor and Description |
---|
DependencyUtil() |
Modifier and Type | Method and Description |
---|---|
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.
|
static void |
log(java.lang.String string,
org.apache.maven.plugin.logging.Log log)
Writes the specified string to the log at info level.
|
static void |
write(java.lang.String string,
java.io.File file,
org.apache.maven.plugin.logging.Log log)
Writes the specified string to the specified file.
|
public static java.lang.String getFormattedFileName(org.apache.maven.artifact.Artifact artifact, boolean removeVersion)
artifact
- File to be formatted.removeVersion
- Specifies if the version should be removed from the file name.public static java.io.File getFormattedOutputDirectory(boolean useSubdirsPerType, boolean useSubdirPerArtifact, boolean useRepositoryLayout, boolean removeVersion, java.io.File outputDirectory, org.apache.maven.artifact.Artifact artifact)
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.public static void write(java.lang.String string, java.io.File file, org.apache.maven.plugin.logging.Log log) throws java.io.IOException
string
- the string to writefile
- the file to write tojava.io.IOException
- if an I/O error occurspublic static void log(java.lang.String string, org.apache.maven.plugin.logging.Log log) throws java.io.IOException
string
- the string to writejava.io.IOException
- if an I/O error occursCopyright © 2014. All Rights Reserved.