public Artifact load(ArtifactName artifactName,File path) throws IOException {
  Preconditions.checkArgument(path.exists(),"Path must exist: " + path);
  Preconditions.checkArgument(path.isFile() || path.isDirectory(),"Path must be a file or directory: " + path);
  if (path.isFile()) {
    return loadFromJar(artifactName,path);
  }
  return loadFromDirectory(artifactName,path);
}

public Artifact load ( ArtifactName artifactName , File path ) throws IOException { Preconditions . checkArgument ( path . exists ( ) , "Path must exist: " + path ) ; Preconditions . checkArgument ( path . isFile ( ) || path . isDirectory ( ) , "Path must be a file or directory: " + path ) ; if ( path . isFile ( ) ) { return loadFromJar ( artifactName , path ) ; } return loadFromDirectory ( artifactName , path ) ; }
load artifact at path with a custom artifactid
