Class MavenRepository

java.lang.Object
aQute.bnd.maven.MavenRepository
All Implemented Interfaces:
BsnToMavenPath, Plugin, RepositoryPlugin

@Deprecated public class MavenRepository extends Object implements RepositoryPlugin, Plugin, BsnToMavenPath
Deprecated.
  • Field Details

    • logger

      private static final org.slf4j.Logger logger
      Deprecated.
    • NAME

      public static final String NAME
      Deprecated.
      See Also:
    • MAVEN_REPO_LOCAL

      static final String MAVEN_REPO_LOCAL
      Deprecated.
    • root

      File root
      Deprecated.
    • reporter

      Reporter reporter
      Deprecated.
    • name

      String name
      Deprecated.
  • Constructor Details

    • MavenRepository

      public MavenRepository()
      Deprecated.
  • Method Details

    • toString

      public String toString()
      Deprecated.
      Overrides:
      toString in class Object
    • canWrite

      public boolean canWrite()
      Deprecated.
      Description copied from interface: RepositoryPlugin
      Answer if this repository can be used to store files.
      Specified by:
      canWrite in interface RepositoryPlugin
      Returns:
      true if writable
    • get

      private File[] get(String bsn, String version) throws Exception
      Deprecated.
      Throws:
      Exception
    • find

      File[] find(String groupId, String artifactId, VersionRange range)
      Deprecated.
    • list

      public List<String> list(String regex)
      Deprecated.
      Description copied from interface: RepositoryPlugin
      Return a list of bsns that are present in the repository.
      Specified by:
      list in interface RepositoryPlugin
      Parameters:
      regex - A <ahref="https://en.wikipedia.org/wiki/Glob_%28programming%29"> glob pattern to be matched against bsns present in the repository, or null.
      Returns:
      A list of bsns that match the pattern parameter or all if pattern is null; repositories that do not support browsing or querying should return an empty list.
    • find

      void find(List<String> bsns, Pattern pattern, File base, String name)
      Deprecated.
    • put

      Deprecated.
      Description copied from interface: RepositoryPlugin
      Put an artifact (from the InputStream) into the repository.

      There is no guarantee that the artifact on the input stream has not been modified after it's been put in the repository since that is dependent on the implementation of the repository.
      Specified by:
      put in interface RepositoryPlugin
      Parameters:
      stream - The input stream with the artifact
      options - The put options. See RepositoryPlugin.PutOptions, can be null, which will then take the default options like new PutOptions().
      Returns:
      The result of the put, never null. See RepositoryPlugin.PutResult
      Throws:
      Exception - When the repository root directory doesn't exist, when the repository is read-only, when the specified checksum doesn't match the checksum of the fetched artifact (see RepositoryPlugin.PutOptions.digest), when the implementation wants to modify the artifact but isn't allowed, or when another error has occurred.
    • versions

      public SortedSet<Version> versions(String bsn) throws Exception
      Deprecated.
      Description copied from interface: RepositoryPlugin
      Return a list of versions.
      Specified by:
      versions in interface RepositoryPlugin
      Throws:
      Exception
    • setProperties

      public void setProperties(Map<String,String> map)
      Deprecated.
      Description copied from interface: Plugin
      Give the plugin the remaining properties. When a plugin is declared, the clause can contain extra properties. All the properties and directives are given to the plugin to use.
      Specified by:
      setProperties in interface Plugin
      Parameters:
      map - attributes and directives for this plugin's clause
    • setReporter

      public void setReporter(Reporter processor)
      Deprecated.
      Description copied from interface: Plugin
      Set the current reporter. This is called at init time. This plugin should report all errors and warnings to this reporter.
      Specified by:
      setReporter in interface Plugin
    • getGroupAndArtifact

      public String[] getGroupAndArtifact(String bsn)
      Deprecated.
      Specified by:
      getGroupAndArtifact in interface BsnToMavenPath
    • getName

      public String getName()
      Deprecated.
      Specified by:
      getName in interface RepositoryPlugin
      Returns:
      The name of the repository
    • get

      public File get(String bsn, String range, Strategy strategy, Map<String,String> properties) throws Exception
      Deprecated.
      Throws:
      Exception
    • setRoot

      public void setRoot(File f)
      Deprecated.
    • getLocation

      public String getLocation()
      Deprecated.
      Description copied from interface: RepositoryPlugin
      Return a location identifier of this repository
      Specified by:
      getLocation in interface RepositoryPlugin
    • get

      public File get(String bsn, Version version, Map<String,String> properties, RepositoryPlugin.DownloadListener... listeners) throws Exception
      Deprecated.
      Description copied from interface: RepositoryPlugin
      Return a URL to a matching version of the given bundle.

      If download listeners are specified then the returned file is not guaranteed to exist before a download listener is notified of success or failure. The callback can happen before the method has returned. If the returned file is null then download listeners are not called back.

      The intention of the Download Listeners is to allow a caller to obtain references to files that do not yet exist but are to be downloaded. If the downloads were done synchronously in the call, then no overlap of downloads could take place.

      Specified by:
      get in interface RepositoryPlugin
      Parameters:
      bsn - Bundle-SymbolicName of the searched bundle
      version - Version requested
      listeners - Zero or more download listener that will be notified of the outcome.
      Returns:
      A file to the revision or null if not found
      Throws:
      Exception - when anything goes wrong, in this case no listeners will be called back.