Package org.apache.maven.index.artifact
Class M2GavCalculator
- java.lang.Object
-
- org.apache.maven.index.artifact.M2GavCalculator
-
- All Implemented Interfaces:
GavCalculator
@Singleton @Named("maven2") public class M2GavCalculator extends java.lang.Object implements GavCalculatorAn M2GavCalculator.- Author:
- Jason van Zyl, Tamas Cservenak
-
-
Constructor Summary
Constructors Constructor Description M2GavCalculator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringcalculateArtifactName(Gav gav)java.lang.StringgavToPath(Gav gav)Reassembles the repository path from the supplied GAV.GavpathToGav(java.lang.String str)Calculates GAV from provided repository path.
-
-
-
Method Detail
-
pathToGav
public Gav pathToGav(java.lang.String str)
Description copied from interface:GavCalculatorCalculates 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.- Specified by:
pathToGavin interfaceGavCalculator- Parameters:
str- the repository path- Returns:
- Gav parsed from the path
-
gavToPath
public java.lang.String gavToPath(Gav gav)
Description copied from interface:GavCalculatorReassembles the repository path from the supplied GAV. It will be an absolute path.- Specified by:
gavToPathin interfaceGavCalculator- Returns:
- the path calculated from GAV, obeying current layout.
-
calculateArtifactName
public java.lang.String calculateArtifactName(Gav gav)
-
-