java.lang.Object
org.mule.maven.pom.parser.internal.util.MavenUtils

public class MavenUtils extends Object
  • Constructor Details

    • MavenUtils

      public MavenUtils()
  • Method Details

    • getPomModel

      public static org.apache.maven.model.Model getPomModel(File artifact)
      Parameters:
      artifact - a maven artifact that may be a directory following the mule deployable archive structure a compressed file or file pointing to a pom.
      Returns:
      the pom model for the artifact.
    • getPomModelFolder

      public static org.apache.maven.model.Model getPomModelFolder(File artifactFolder)
      Returns the Model from a given artifact folder
      Parameters:
      artifactFolder - folder containing the exploded artifact file.
      Returns:
      the Model from the pom file if available
      Throws:
      BundleDescriptorCreationException - if the folder does not contain a pom file or the file can' be loaded
    • getPomModelFromJar

      public static org.apache.maven.model.Model getPomModelFromJar(URL pomUrl)
      Returns the Model from a given artifact folder
      Parameters:
      pomUrl - url pointing to the artifact content.
      Returns:
      the Model from the pom file if available
      Throws:
      BundleDescriptorCreationException - if the artifact jar does not contain a pom file or the file can' be loaded
    • getPomModelFromFile

      public static org.apache.maven.model.Model getPomModelFromFile(File pomFile)
      Returns the Model from a given artifact folder
      Parameters:
      pomFile - file containing the pom content.
      Returns:
      the Model from the pom file
      Throws:
      BundleDescriptorCreationException - if the file does not exist or the file can't be loaded
    • getAttribute

      public static String getAttribute(org.codehaus.plexus.util.xml.Xpp3Dom tag, String attributeName)