Package org.apache.maven.index.artifact
Interface GavCalculator
-
- All Known Implementing Classes:
M1GavCalculator
,M2GavCalculator
public interface GavCalculator
An interface to calculateGav
based on provided artifact path and to calculate an artifact path from providedGav
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
gavToPath(Gav gav)
Reassembles the repository path from the supplied GAV.Gav
pathToGav(java.lang.String path)
Calculates GAV from provided repository path.
-
-
-
Method Detail
-
pathToGav
Gav pathToGav(java.lang.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
java.lang.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.
-
-