Interface GavCalculator

All Known Implementing Classes:
M1GavCalculator, M2GavCalculator

public interface GavCalculator
An interface to calculate Gav based on provided artifact path and to calculate an artifact path from provided Gav.
Author:
Tamas Cservenak
  • Method Summary

    Modifier and Type
    Method
    Description
    Reassembles the repository path from the supplied GAV.
    Calculates GAV from provided repository path.
  • Method Details

    • pathToGav

      Gav pathToGav(String path)
      Calculates GAV from provided repository path. The path has to be absolute starting from repository root. If path represents a proper artifact path (conforming to given layout), GAV is "calculated" from it and is returned. If path represents some file that is not an artifact, but is part of the repository layout (like maven-metadata.xml), or in any other case it returns null.
      Parameters:
      path - the repository path
      Returns:
      Gav parsed from the path
    • gavToPath

      String gavToPath(Gav gav)
      Reassembles the repository path from the supplied GAV. It will be an absolute path.
      Parameters:
      gav -
      Returns:
      the path calculated from GAV, obeying current layout.