Class TestResourcesClasspath

java.lang.Object
io.micronaut.testresources.buildtools.TestResourcesClasspath
All Implemented Interfaces:
KnownModules

public final class TestResourcesClasspath extends Object implements KnownModules
Utility class which deduces the server classpath from the user classpath. For example, the application may use Micronaut Data + Mysql, in which case we need to put on the test resources classpath the Micronaut test resources modules for JDBC and the MySQL driver.
  • Method Details

    • inferTestResourcesClasspath

      public static List<MavenDependency> inferTestResourcesClasspath(List<MavenDependency> input)
      Determines a list of dependencies which should be added to the test resources classpath, given a user supplied classpath. In general the result will consist of modules from the test-resources project, but it may consist of additional entries, for example database drivers.
      Parameters:
      input - the user classpath
      Returns:
      the inferred test resources classpath
    • inferTestResourcesClasspath

      public static List<MavenDependency> inferTestResourcesClasspath(List<MavenDependency> input, String testResourcesVersion)
      Determines a list of dependencies which should be added to the test resources classpath, given a user supplied classpath. In general the result will consist of modules from the test-resources project, but it may consist of additional entries, for example database drivers.
      Parameters:
      input - the user classpath
      testResourcesVersion - the version of the test resources libraries
      Returns:
      the inferred test resources classpath