Class ArtifactRecorder


  • public class ArtifactRecorder
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected static java.lang.String ARTIFACT_LIST_FILE  
    • Constructor Summary

      Constructors 
      Constructor Description
      ArtifactRecorder​(java.nio.file.Path stagedDir, java.nio.file.Path cacheDir)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void cache​(org.jboss.galleon.universe.maven.MavenArtifact artifact, java.nio.file.Path jarSrc)
      save a copy of jarSrc in the cacheDir and record it using record(MavenArtifact, Path)
      void record​(org.jboss.galleon.universe.maven.MavenArtifact artifact, java.nio.file.Path target)
      adds the artifact's coordinates to the artifacts list.
      void writeCacheManifest()
      persist list of recorded artifacts in cacheDir/"artifacts.txt"
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • ARTIFACT_LIST_FILE

        protected static final java.lang.String ARTIFACT_LIST_FILE
        See Also:
        Constant Field Values
    • Constructor Detail

      • ArtifactRecorder

        public ArtifactRecorder​(java.nio.file.Path stagedDir,
                                java.nio.file.Path cacheDir)
                         throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • record

        public void record​(org.jboss.galleon.universe.maven.MavenArtifact artifact,
                           java.nio.file.Path target)
                    throws java.io.IOException
        adds the artifact's coordinates to the artifacts list. If the artifact is recorded twice, the most recent target is used. If the artifact was recorded with a jar cached in cacheDir and is recorded again pointing to the external jar, the external jar will be used and cached copy will be removed.
        Parameters:
        artifact -
        target -
        Throws:
        java.io.IOException
      • cache

        public void cache​(org.jboss.galleon.universe.maven.MavenArtifact artifact,
                          java.nio.file.Path jarSrc)
                   throws org.jboss.galleon.universe.maven.MavenUniverseException,
                          java.io.IOException
        save a copy of jarSrc in the cacheDir and record it using record(MavenArtifact, Path)
        Parameters:
        artifact -
        jarSrc -
        Throws:
        org.jboss.galleon.universe.maven.MavenUniverseException
        java.io.IOException
      • writeCacheManifest

        public void writeCacheManifest()
                                throws java.io.IOException
        persist list of recorded artifacts in cacheDir/"artifacts.txt"
        Throws:
        java.io.IOException