Class RestoredArtifact

java.lang.Object
org.apache.maven.artifact.DefaultArtifact
org.apache.maven.buildcache.artifact.RestoredArtifact
All Implemented Interfaces:
Comparable<org.apache.maven.artifact.Artifact>, org.apache.maven.artifact.Artifact

public class RestoredArtifact extends org.apache.maven.artifact.DefaultArtifact
Overrides default file behavior with async file holder to restore files from cache lazy. Similar to AttachedArtifact
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
    static final String
     

    Fields inherited from interface org.apache.maven.artifact.Artifact

    LATEST_VERSION, RELEASE_VERSION, SCOPE_COMPILE, SCOPE_COMPILE_PLUS_RUNTIME, SCOPE_IMPORT, SCOPE_PROVIDED, SCOPE_RUNTIME, SCOPE_RUNTIME_PLUS_SYSTEM, SCOPE_SYSTEM, SCOPE_TEST, SNAPSHOT_VERSION, VERSION_FILE_PATTERN
  • Constructor Summary

    Constructors
    Constructor
    Description
    RestoredArtifact(org.apache.maven.artifact.Artifact parent, Future<File> fileFuture, String type, String classifier, org.apache.maven.artifact.handler.ArtifactHandler handler, Function<File,File> restoreToDiskConsumer)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns file using caller thread to download it if necessary
    void
    setFile(File destination)
     

    Methods inherited from class org.apache.maven.artifact.DefaultArtifact

    addMetadata, compareTo, equals, getArtifactHandler, getArtifactId, getAvailableVersions, getBaseVersion, getBaseVersionInternal, getClassifier, getDependencyConflictId, getDependencyFilter, getDependencyTrail, getDownloadUrl, getGroupId, getId, getMetadataList, getRepository, getScope, getSelectedVersion, getType, getVersion, getVersionRange, hasClassifier, hashCode, isOptional, isRelease, isResolved, isSelectedVersionKnown, isSnapshot, selectVersion, setArtifactHandler, setArtifactId, setAvailableVersions, setBaseVersion, setBaseVersionInternal, setDependencyFilter, setDependencyTrail, setDownloadUrl, setGroupId, setOptional, setRelease, setRepository, setResolved, setResolvedVersion, setScope, setVersion, setVersionRange, toString, updateVersion

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • MSG_INTERRUPTED_WHILE_RETRIEVING_ARTIFACT_FILE

      public static final String MSG_INTERRUPTED_WHILE_RETRIEVING_ARTIFACT_FILE
      See Also:
    • MSG_ERROR_RETRIEVING_ARTIFACT_FILE

      public static final String MSG_ERROR_RETRIEVING_ARTIFACT_FILE
      See Also:
  • Constructor Details

    • RestoredArtifact

      public RestoredArtifact(org.apache.maven.artifact.Artifact parent, Future<File> fileFuture, String type, String classifier, org.apache.maven.artifact.handler.ArtifactHandler handler, Function<File,File> restoreToDiskConsumer)
  • Method Details

    • getFile

      public File getFile()
      Returns file using caller thread to download it if necessary
      Specified by:
      getFile in interface org.apache.maven.artifact.Artifact
      Overrides:
      getFile in class org.apache.maven.artifact.DefaultArtifact
    • setFile

      public void setFile(File destination)
      Specified by:
      setFile in interface org.apache.maven.artifact.Artifact
      Overrides:
      setFile in class org.apache.maven.artifact.DefaultArtifact