org.apache.maven.repository
Interface Artifact

All Known Implementing Classes:
AbstractArtifact

public interface Artifact

The interface defining an artifact (which probably lives in the repository).

Version:
$Id: Artifact.java,v 1.18.10.2 2004/03/01 22:36:39 evenisse Exp $
Author:
Jason van Zyl

Method Summary
 boolean exists()
          Boolean flag indicating whether this artifact exists.
 java.lang.String generatePath()
          Generate the path for this artifact given its dependency attributes.
 java.lang.String getChecksumUrl()
          Return the url to the checksum file for this artifact.
 Dependency getDependency()
          Get the dependency.
 java.io.File getFile()
          Get the location of the artifact in the local file system.
 java.lang.String getName()
          Return the name of the artifact.
 java.lang.String getPath()
          Return the path of the artifact using platform specific naming conventions.
 java.lang.String getUrlPath()
          Return an URL path that is platform agnostic.
 boolean isSnapshot()
          Boolean flag indicating whether this artifact is a snapshot.
 void setDependency(Dependency dependency)
          Set the dependency for this JAR artifact.
 void setPath(java.lang.String path)
          Set the path to the artifact.
 void verify()
          Verify the artifact.
 

Method Detail

setDependency

public void setDependency(Dependency dependency)
Set the dependency for this JAR artifact.

Parameters:
dependency - Dependency this artifact is based on.

getDependency

public Dependency getDependency()
Get the dependency.

Returns:
The dependency this artifact is based on.

setPath

public void setPath(java.lang.String path)
Set the path to the artifact. The maven jar override facilty can be used to change the path to the artifact if the user specifies the use of a specific version.

Parameters:
path - Path to the artifact.

getPath

public java.lang.String getPath()
Return the path of the artifact using platform specific naming conventions.

Returns:
Path to the artifact.

generatePath

public java.lang.String generatePath()
Generate the path for this artifact given its dependency attributes.

Returns:
The generated path of the artifact based on the dependency attributes.

getUrlPath

public java.lang.String getUrlPath()
Return an URL path that is platform agnostic.

Returns:
URL of the artifact.

getChecksumUrl

public java.lang.String getChecksumUrl()
Return the url to the checksum file for this artifact.

Returns:
URL of the checksum file for this artifact.

getName

public java.lang.String getName()
Return the name of the artifact.

Returns:
Name of the underlying dependency.

isSnapshot

public boolean isSnapshot()
Boolean flag indicating whether this artifact is a snapshot.

Returns:
Flag indicating whether this artifact is a snapshot.

exists

public boolean exists()
Boolean flag indicating whether this artifact exists.

Returns:
Flag indicating the existance of the artifact in the local repository.

getFile

public java.io.File getFile()
Get the location of the artifact in the local file system.

Returns:
The location of the artifact in the local file system.

verify

public void verify()
            throws ChecksumVerificationException
Verify the artifact.

Throws:
ChecksumVerificationException - if verification fails


Copyright © 2001-2005 Apache Software Foundation. All Rights Reserved.