java.lang.Object
de.iip_ecosphere.platform.tools.maven.dependencies.Layers

public class Layers extends Object
Knows plugin artifact-layer-dependencies/exclusions.
Author:
Holger Eichelberger, SSE
  • Field Details

    • DEFAULT_JAR_PREFIX

      public static final String DEFAULT_JAR_PREFIX
      See Also:
    • LAYERS

      private static final String[] LAYERS
    • MAIN_ARTID_PATTERNS

      private static final String[] MAIN_ARTID_PATTERNS
  • Constructor Details

    • Layers

      public Layers()
  • Method Details

    • addMainPatterns

      public static void addMainPatterns(Collection<String> mainPatterns, boolean includeNonPlugins)
      Adds the main plugin artifactId name patterns to #mainPatterns.
      Parameters:
      mainPatterns - the collection to add the patterns to
      includeNonPlugins - 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 id
      excludeIds - the given excludeArtifactids
      Returns:
      excludeIds or the known exclude ids
    • append

      private static String append(String text, String... addition)
      Appends addition to text using "," as separator.
      Parameters:
      text -
      addition -
      Returns:
    • isOsCpFile

      static boolean isOsCpFile(File file)
      Returns whether a classpath file is operating system specific.
      Parameters:
      file - the file to check for
      Returns:
      true for OS specific, false else
    • isOsCpFile

      static boolean isOsCpFile(String file)
      Returns whether a classpath file is operating system specific.
      Parameters:
      file - the file to check for
      Returns:
      true for OS specific, false else
    • isIndexFile

      static boolean isIndexFile(File file)
      Returns whether file is an index file.
      Parameters:
      file - the file to check for
      Returns:
      true for index, false else
    • isIndexFile

      static boolean isIndexFile(String file)
      Returns whether file is an index file.
      Parameters:
      file - the file to check for
      Returns:
      true for index, false else
    • 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 prepend
      classifier - optional classifier, may be null or empty for none
      type - the artifact type/file extension (without ".")
      project - the Maven project
      Returns:
      the artifact file
    • prependGroup

      static File prependGroup(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.
      Parameters:
      file - the file to prepend, see composeArtifact(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., combines composeArtifact(File, String, String, MavenProject) and prependGroup(File, MavenProject).
      Parameters:
      targetDirectory - the folder whether the file to prepend
      classifier - optional classifier, may be null or empty for none
      type - 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 prepend
      classifier - optional classifier, may be null or empty for none
      type - the artifact type/file extension (without ".")
      project - the Maven project
      log - 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 from
      project - the Maven project
      log - the log instance
      Returns:
      the prepended file