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 517014 2007-03-11 21:15:50Z ltheussl $
Author:
Jason van Zyl

Field Summary
static java.lang.String OVERRIDE_NONE
           
static java.lang.String OVERRIDE_PATH
           
static java.lang.String OVERRIDE_VERSION
           
 
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.
 org.apache.maven.project.Dependency getDependency()
          Get the dependency.
 java.lang.String getDescription()
           
 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 getOverrideType()
           
 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(org.apache.maven.project.Dependency dependency)
          Set the dependency for this JAR artifact.
 void setOverrideType(java.lang.String overrideType)
           
 void setPath(java.lang.String path)
          Set the path to the artifact.
 void verify()
          Verify the artifact.
 

Field Detail

OVERRIDE_NONE

public static final java.lang.String OVERRIDE_NONE

OVERRIDE_VERSION

public static final java.lang.String OVERRIDE_VERSION
See Also:
Constant Field Values

OVERRIDE_PATH

public static final java.lang.String OVERRIDE_PATH
See Also:
Constant Field Values
Method Detail

setDependency

public void setDependency(org.apache.maven.project.Dependency dependency)
Set the dependency for this JAR artifact.

Parameters:
dependency - Dependency this artifact is based on.

getDependency

public org.apache.maven.project.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

setOverrideType

public void setOverrideType(java.lang.String overrideType)

getOverrideType

public java.lang.String getOverrideType()

getDescription

public java.lang.String getDescription()


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