Class Layers
java.lang.Object
de.iip_ecosphere.platform.tools.maven.dependencies.Layers
Knows plugin artifact-layer-dependencies/exclusions.
- Author:
- Holger Eichelberger, SSE
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddMainPatterns(Collection<String> mainPatterns, boolean includeNonPlugins) Adds the main plugin artifactId name patterns to#mainPatterns.private static StringAppendsadditiontotextusing "," as separator.(package private) static FilecomposeArtifact(File targetDirectory, String classifier, String type, org.apache.maven.project.MavenProject project) Composes the own artifact.(package private) static FilecomposeGroupArtifact(File targetDirectory, String classifier, String type, org.apache.maven.project.MavenProject project) Composes the group prepended artifact, i.e., combinescomposeArtifact(File, String, String, MavenProject)andprependGroup(File, MavenProject).(package private) static FilecopyGroupArtifact(File targetDirectory, String classifier, String type, org.apache.maven.project.MavenProject project, org.apache.maven.plugin.logging.Log log) Prepends the group id before an usual Maven artifact as we need it that way for resolution on unpacking.static StringgetExcludeArtifactIds(String artifactId, String excludeIds, boolean asTest, org.apache.maven.plugin.logging.Log log) Determines the exclude artifact ids.(package private) static booleanisIndexFile(File file) Returns whetherfileis an index file.(package private) static booleanisIndexFile(String file) Returns whetherfileis an index file.(package private) static booleanisOsCpFile(File file) Returns whether a classpathfileis operating system specific.(package private) static booleanisOsCpFile(String file) Returns whether a classpathfileis operating system specific.(package private) static FileprependGroup(File file, org.apache.maven.project.MavenProject project) Prepends the group id before an usual Maven artifact as we need it that way for resolution on unpacking.(package private) static FileprependGroupAndCopy(File file, org.apache.maven.project.MavenProject project, org.apache.maven.plugin.logging.Log log) Prepends the group id before an usual Maven artifact as we need it that way for resolution on unpacking.
-
Field Details
-
DEFAULT_JAR_PREFIX
- See Also:
-
LAYERS
-
MAIN_ARTID_PATTERNS
-
-
Constructor Details
-
Layers
public Layers()
-
-
Method Details
-
addMainPatterns
Adds the main plugin artifactId name patterns to#mainPatterns.- Parameters:
mainPatterns- the collection to add the patterns toincludeNonPlugins- also include (preliminary) patterns needed during migration
-
getExcludeArtifactIds
public static String getExcludeArtifactIds(String artifactId, String excludeIds, boolean asTest, org.apache.maven.plugin.logging.Log log) Determines the exclude artifact ids.- Parameters:
artifactId- the actual artifact idexcludeIds- the given excludeArtifactids- Returns:
excludeIdsor the known exclude ids
-
append
Appendsadditiontotextusing "," as separator.- Parameters:
text-addition-- Returns:
-
isOsCpFile
Returns whether a classpathfileis operating system specific.- Parameters:
file- the file to check for- Returns:
truefor OS specific,falseelse
-
isOsCpFile
Returns whether a classpathfileis operating system specific.- Parameters:
file- the file to check for- Returns:
truefor OS specific,falseelse
-
isIndexFile
Returns whetherfileis an index file.- Parameters:
file- the file to check for- Returns:
truefor index,falseelse
-
isIndexFile
Returns whetherfileis an index file.- Parameters:
file- the file to check for- Returns:
truefor index,falseelse
-
composeArtifact
static File composeArtifact(File targetDirectory, String classifier, String type, org.apache.maven.project.MavenProject project) Composes the own artifact.- Parameters:
targetDirectory- the folder whether the file to prependclassifier- optional classifier, may be null or empty for nonetype- the artifact type/file extension (without ".")project- the Maven project- Returns:
- the artifact file
-
prependGroup
Prepends the group id before an usual Maven artifact as we need it that way for resolution on unpacking.- Parameters:
file- the file to prepend, seecomposeArtifact(File, String, String, MavenProject)project- the Maven project- Returns:
- the prepended file
-
composeGroupArtifact
static File composeGroupArtifact(File targetDirectory, String classifier, String type, org.apache.maven.project.MavenProject project) Composes the group prepended artifact, i.e., combinescomposeArtifact(File, String, String, MavenProject)andprependGroup(File, MavenProject).- Parameters:
targetDirectory- the folder whether the file to prependclassifier- optional classifier, may be null or empty for nonetype- the artifact type/file extension (without ".")project- the Maven project- Returns:
- the group-prepended artifact file
-
copyGroupArtifact
static File copyGroupArtifact(File targetDirectory, String classifier, String type, org.apache.maven.project.MavenProject project, org.apache.maven.plugin.logging.Log log) Prepends the group id before an usual Maven artifact as we need it that way for resolution on unpacking.- Parameters:
targetDirectory- the folder whether the file to prependclassifier- optional classifier, may be null or empty for nonetype- the artifact type/file extension (without ".")project- the Maven projectlog- the log instance- Returns:
- the prepended file
- See Also:
-
prependGroupAndCopy
static File prependGroupAndCopy(File file, org.apache.maven.project.MavenProject project, org.apache.maven.plugin.logging.Log log) Prepends the group id before an usual Maven artifact as we need it that way for resolution on unpacking.- Parameters:
file- the file to prepend, copy fromproject- the Maven projectlog- the log instance- Returns:
- the prepended file
-