* Get ArtifactContext for given pom or artifact (jar, war, etc). A file can be
*/
public ArtifactContext getArtifactContext( IndexingContext context, File file )
{
// TODO shouldn't this use repository layout instead?
Gav gav = gavCalculator.pathToGav( file.getAbsolutePath().substring(
context.getRepository().getAbsolutePath().length() + 1 ).replace( '\\', '/' ) );
if ( gav == null )
{
// XXX what then? Without GAV we are screwed (look below).
// It should simply stop, since it is not an artifact.
return null;
}
String groupId = gav.getGroupId();
String artifactId = gav.getArtifactId();
String version = gav.getBaseVersion();
String classifier = gav.getClassifier();
File pom;
File artifact;