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 Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
    private static final String[]
     
    private static final String[]
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    addMainPatterns(Collection<String> mainPatterns, boolean includeNonPlugins)
    Adds the main plugin artifactId name patterns to #mainPatterns.
    private static String
    append(String text, String... addition)
    Appends addition to text using "," as separator.
    (package private) 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.
    static String
    getExcludeArtifactIds(String artifactId, String excludeIds, boolean asTest, org.apache.maven.plugin.logging.Log log)
    Determines the exclude artifact ids.
    (package private) static boolean
    Returns whether file is an index file.
    (package private) static boolean
    Returns whether file is an index file.
    (package private) static boolean
    Returns whether a classpath file is operating system specific.
    (package private) static boolean
    Returns whether a classpath file is operating system specific.
    (package private) 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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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
    • 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
      Returns:
      the prepended file
    • 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
      Returns:
      the prepended file