Class MavenLocator

java.lang.Object
com.soebes.itf.jupiter.extension.MavenLocator

class MavenLocator extends Object
It's the intention to find the mvn executable.

The maven.home is set during the execution of the test by the user. The maven.home has precedence over searching of Maven via PATH. This gives the opportunity to overload the given Maven version in cases where needed.

Author:
Karl Heinz Marbaise
Implementation Note:
Currently maven.home is given to the maven-failsafe-plugin configuration as a system property. The parameter isRunningOnWindows is used instead of using things like org.junit.jupiter.api.condition.OS.WINDOWS.isCurrentOs() because they contain static initializers etc. which can't be tested.
  • Constructor Details

    • MavenLocator

      MavenLocator(FileSystem fileSystem, Optional<String> pathEnvironment, boolean isRunningOnWindows)
      Parameters:
      fileSystem - The FileSystem which is used.
      pathEnvironment - The value of PATH if it exists otherwise Optional.empty().
      isRunningOnWindows - true when running on Windows, false otherwise.
  • Method Details