Constructor and Description |
---|
DependencyUtil() |
Modifier and Type | Method and Description |
---|---|
static String |
cleanToBeTokenizedString(String str)
Clean up configuration string before it can be tokenized.
|
static String |
getFormattedFileName(org.apache.maven.artifact.Artifact artifact,
boolean removeVersion)
Builds the file name.
|
static String |
getFormattedFileName(org.apache.maven.artifact.Artifact artifact,
boolean removeVersion,
boolean prependGroupId)
Builds the file name.
|
static String |
getFormattedFileName(org.apache.maven.artifact.Artifact artifact,
boolean removeVersion,
boolean prependGroupId,
boolean useBaseVersion)
Builds the file name.
|
static String |
getFormattedFileName(org.apache.maven.artifact.Artifact artifact,
boolean removeVersion,
boolean prependGroupId,
boolean useBaseVersion,
boolean removeClassifier)
Builds the file name.
|
static File |
getFormattedOutputDirectory(boolean useSubdirsPerScope,
boolean useSubdirsPerType,
boolean useSubdirPerArtifact,
boolean useRepositoryLayout,
boolean removeVersion,
boolean removeType,
File outputDirectory,
org.apache.maven.artifact.Artifact artifact)
Formats the outputDirectory based on type.
|
static void |
log(String string,
org.apache.maven.plugin.logging.Log log)
Writes the specified string to the log at info level.
|
static String[] |
tokenizer(String str)
Mainly used to parse excludes, includes configuration.
|
static void |
write(String string,
File file,
boolean append,
org.apache.maven.plugin.logging.Log log)
Deprecated.
specify an encoding instead of a log
|
static void |
write(String string,
File file,
boolean append,
String encoding)
Writes the specified string to the specified file.
|
public static 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.getFormattedFileName(Artifact, boolean, boolean)
public static String getFormattedFileName(org.apache.maven.artifact.Artifact artifact, boolean removeVersion, boolean prependGroupId)
artifact
- File to be formatted.removeVersion
- Specifies if the version should be removed from the file name.prependGroupId
- Specifies if the groupId should be prepended to the file name.public static String getFormattedFileName(org.apache.maven.artifact.Artifact artifact, boolean removeVersion, boolean prependGroupId, boolean useBaseVersion)
artifact
- file to be formattedremoveVersion
- Specifies if the version should be removed from the file nameprependGroupId
- Specifies if the groupId should be prepended to the file nameuseBaseVersion
- Specifies if the baseVersion of the artifact should be used instead of the versionpublic static String getFormattedFileName(org.apache.maven.artifact.Artifact artifact, boolean removeVersion, boolean prependGroupId, boolean useBaseVersion, boolean removeClassifier)
artifact
- File to be formatted.removeVersion
- Specifies if the version should be removed from the file name.prependGroupId
- Specifies if the groupId should be prepended to the file name.useBaseVersion
- Specifies if the baseVersion of the artifact should be used instead of the version.removeClassifier
- Specifies if the classifier of the artifact should be remved from the file name.public static File getFormattedOutputDirectory(boolean useSubdirsPerScope, boolean useSubdirsPerType, boolean useSubdirPerArtifact, boolean useRepositoryLayout, boolean removeVersion, boolean removeType, File outputDirectory, org.apache.maven.artifact.Artifact artifact)
useSubdirsPerScope
- if a new sub directory should be used for each scope.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 dependencies 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 filenameremoveType
- if the type must not be mentioned in the filenameoutputDirectory
- base outputDirectory.artifact
- information about the artifact.@Deprecated public static void write(String string, File file, boolean append, org.apache.maven.plugin.logging.Log log) throws IOException
string
- the string to writefile
- the file to write toappend
- append to existing file or notlog
- ignoredIOException
- if an I/O error occurspublic static void write(String string, File file, boolean append, String encoding) throws IOException
string
- the string to writefile
- the file to write toappend
- append to existing file or notencoding
- character set nameIOException
- if an I/O error occurspublic static void log(String string, org.apache.maven.plugin.logging.Log log) throws IOException
string
- the string to writelog
- where to log informationIOException
- if an I/O error occurspublic static String[] tokenizer(String str)
str
- the string to splitCopyright © 2002–2023 The Apache Software Foundation. All rights reserved.