Example usage for org.apache.maven.artifact InvalidArtifactRTException getMessage

List of usage examples for org.apache.maven.artifact InvalidArtifactRTException getMessage

Introduction

In this page you can find the example usage for org.apache.maven.artifact InvalidArtifactRTException getMessage.

Prototype

public String getMessage() 

Source Link

Usage

From source file:io.fabric8.maven.docker.assembly.MappingTrackArchiver.java

License:Apache License

private File getLocalMavenRepoFile(MavenSession session, File source) {
    ArtifactRepository localRepo = session.getLocalRepository();
    if (localRepo == null) {
        log.warn("No local repo found so not adding any extra watches in the local repository");
        return null;
    }//from  w w  w.j a  va 2s. c o  m

    Artifact artifact = getArtifactFromJar(source);
    if (artifact != null) {
        try {
            return new File(localRepo.getBasedir(), localRepo.pathOf(artifact));
        } catch (InvalidArtifactRTException e) {
            log.warn("Cannot get the local repository path for %s in base dir %s : %s", artifact,
                    localRepo.getBasedir(), e.getMessage());
        }
    }
    return null;
}