Class PluginUtils

java.lang.Object
ru.akman.maven.plugins.jlink.PluginUtils

public final class PluginUtils extends Object
Helper class for utilities.
  • Method Details

    • getThrowableCause

      public static String getThrowableCause(Throwable throwable)
      Get the cause message for throwable.
      Parameters:
      throwable - the throwable
      Returns:
      the cause error message
    • normalizeFileSetBaseDir

      public static File normalizeFileSetBaseDir(File baseDir, org.apache.maven.shared.model.fileset.FileSet fileSet) throws IOException
      Fix base directory of the fileset by resolving it relative to the specified base directory.
      Parameters:
      baseDir - base directory
      fileSet - fileset
      Returns:
      normalized fileset dir
      Throws:
      IOException - if error occurred while resolving a canonical path
    • getArtifactSetDebugInfo

      public static String getArtifactSetDebugInfo(Set<org.apache.maven.artifact.Artifact> artifacts)
      Get debug info about artifact set.
      Parameters:
      artifacts - set of project artifacts
      Returns:
      formatted string contains info about the artifacts
    • getArtifactDebugInfo

      public static String getArtifactDebugInfo(org.apache.maven.artifact.Artifact artifact)
      Get debug info about the artifact.
      Parameters:
      artifact - the artifact
      Returns:
      formatted string contains info about the artifact
    • getPathElementsDebugInfo

      public static String getPathElementsDebugInfo(String title, List<File> pathelements)
      Get debug info about path elements.
      Parameters:
      title - title
      pathelements - list of path elements
      Returns:
      formatted string contains info about the path elements
    • getFileSetDebugInfo

      public static String getFileSetDebugInfo(String title, org.apache.maven.shared.model.fileset.FileSet fileSet, String data)
      Get debug info about a fileset.
      Parameters:
      title - title
      fileSet - fileset
      data - fileset data
      Returns:
      formatted string contains info about the fileset
    • getDependencySetDebugInfo

      public static String getDependencySetDebugInfo(String title, DependencySet depSet, String data)
      Get debug info about a dependencyset.
      Parameters:
      title - title
      depSet - dependencyset
      data - dependencyset data
      Returns:
      formatted string contains info about the dependencyset
    • getDependencyDebugInfo

      public static String getDependencyDebugInfo(File file, org.codehaus.plexus.languages.java.jpms.JavaModuleDescriptor descriptor, boolean isIncluded)
      Get debug info about a dependency.
      Parameters:
      file - the dependency file
      descriptor - the dependency descriptor
      isIncluded - will the dependency be included
      Returns:
      formatted string contains info about the dependency