Class MavenLocalRepoFileInitializer

java.lang.Object
org.eclipse.jetty.start.FileInitializer
org.eclipse.jetty.start.fileinits.MavenLocalRepoFileInitializer

public class MavenLocalRepoFileInitializer extends FileInitializer
Attempt to download a maven:// URI, by first attempting to find the resource in the maven repository system (starting with local, then central)

Valid URI Formats:

maven://<groupId>/<artifactId>/<version>
minimum requirement (type defaults to jar, with no classifier)
maven://<groupId>/<artifactId>/<version>/<type>
optional type requirement
maven://<groupId>/<artifactId>/<version>/<type>/<classifier>
optional type and classifier requirement
  • Constructor Details

    • MavenLocalRepoFileInitializer

      public MavenLocalRepoFileInitializer(BaseHome baseHome)
    • MavenLocalRepoFileInitializer

      public MavenLocalRepoFileInitializer(BaseHome baseHome, Path localRepoDir, boolean readonly)
    • MavenLocalRepoFileInitializer

      public MavenLocalRepoFileInitializer(BaseHome baseHome, Path localRepoDir, boolean readonly, String mavenRepoUri)
  • Method Details

    • create

      public boolean create(URI uri, String location) throws IOException
      Description copied from class: FileInitializer
      Initialize a file resource
      Specified by:
      create in class FileInitializer
      Parameters:
      uri - the URI of the resource acting as its source
      location - the simple string reference to the output file, suitable for searching for the file in other locations (like ${jetty.home} or ${jetty.dir}) *
      Returns:
      true if local file system is modified.
      Throws:
      IOException - if there was an attempt to initialize, but an error occurred.
    • getRemoteUri

      public String getRemoteUri()
    • getCoordinates

      public MavenLocalRepoFileInitializer.Coordinates getCoordinates(URI uri)
    • download

      protected void download(URI uri, Path destination) throws IOException
      protected only for testing purpose
      Overrides:
      download in class FileInitializer
      Parameters:
      uri - the the uri to download
      destination - the destination File
      Throws:
      IOException