Class MavenTestUtils

java.lang.Object
org.mule.maven.client.test.MavenTestUtils

public final class MavenTestUtils extends Object
Provide a set of utility methods to query data from the pom.xml file of a test's project.
Since:
1.0
  • Method Details

    • getMavenProperty

      public static String getMavenProperty(String property, Supplier<File> pomFolderFinder)
      Returns the value of the property defined or inherited in the pom.xml in the folder pointed by pomFolderFinder.
    • getMavenProjectVersion

      public static String getMavenProjectVersion(Supplier<File> pomFolderFinder)
      Returns the version of the project in the pom.xml in the folder pointed by pomFolderFinder.
    • mavenPomFinder

      public static Supplier<File> mavenPomFinder(Class clazz)
      Finds the Maven's pom file corresponding to a given class that is part of a Maven project
      Parameters:
      clazz - class used to locate the pom for the Maven project that the class belongs to
      Returns:
      a supplier that will provide the required file