Class MavenArtifact
- java.lang.Object
-
- org.apache.maven.repository.legacy.MavenArtifact
-
- All Implemented Interfaces:
ArtifactTransferResource
class MavenArtifact extends java.lang.Object implements ArtifactTransferResource
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
repositoryUrl
private org.apache.maven.wagon.resource.Resource
resource
private long
transferStartTime
-
Constructor Summary
Constructors Constructor Description MavenArtifact(java.lang.String repositoryUrl, org.apache.maven.wagon.resource.Resource resource)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getContentLength()
The size of the artifact in bytes.java.lang.String
getName()
The path of the artifact relative to the repository's base URL.java.lang.String
getRepositoryUrl()
The base URL of the repository, e.g.long
getTransferStartTime()
Gets the timestamp when the transfer of this artifact was started.java.lang.String
getUrl()
Gets the full URL of the artifact.java.lang.String
toString()
-
-
-
Method Detail
-
getRepositoryUrl
public java.lang.String getRepositoryUrl()
Description copied from interface:ArtifactTransferResource
The base URL of the repository, e.g. "http://repo1.maven.org/maven2/". Unless the URL is unknown, it will be terminated by a trailing slash.- Specified by:
getRepositoryUrl
in interfaceArtifactTransferResource
- Returns:
- The base URL of the repository or an empty string if unknown, never
null
.
-
getName
public java.lang.String getName()
Description copied from interface:ArtifactTransferResource
The path of the artifact relative to the repository's base URL.- Specified by:
getName
in interfaceArtifactTransferResource
- Returns:
- The path of the artifact, never
null
.
-
getUrl
public java.lang.String getUrl()
Description copied from interface:ArtifactTransferResource
Gets the full URL of the artifact.- Specified by:
getUrl
in interfaceArtifactTransferResource
- Returns:
- The full URL of the artifact, never
null
.
-
getContentLength
public long getContentLength()
Description copied from interface:ArtifactTransferResource
The size of the artifact in bytes.- Specified by:
getContentLength
in interfaceArtifactTransferResource
- Returns:
- The of the artifact in bytes or a negative value if unknown.
-
getTransferStartTime
public long getTransferStartTime()
Description copied from interface:ArtifactTransferResource
Gets the timestamp when the transfer of this artifact was started.- Specified by:
getTransferStartTime
in interfaceArtifactTransferResource
- Returns:
- The timestamp when the transfer of this artifact was started.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-