Class MavenResolver

  • All Implemented Interfaces:
    ApplicationSetup.TerrierApplicationPlugin

    public class MavenResolver
    extends java.lang.Object
    implements ApplicationSetup.TerrierApplicationPlugin
    Resolves Maven dependencies specified in terrier.mvn.coords and adds to classpath. This can checkin in ~/.m2/, as well as Maven Central and Jitpack.

    Properties

    • terrier.mvn.coords - SBT-like expression of dependency. E.g. com.harium.database:sqlite:1.0.5 or com.harium.database:sqlite
    • .
    Since:
    5.0
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.util.Set<java.lang.String> PROVIDED_MODULES  
    • Constructor Summary

      Constructors 
      Constructor Description
      MavenResolver()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addDependencies​(java.util.List<java.lang.String> coords)
      Allows user-facing code to add more jar files
      void addJarFiles​(java.util.Collection<java.lang.String> newJars)  
      void addJarURLs​(java.util.Collection<java.net.URL> newJars)  
      void initialise()
      Called by ApplicationSetup to initialise the plugin
      void initialise​(java.lang.String coordinates)
      Usually called via initialise() from ApplicationSetup
      static void main​(java.lang.String[] args)  
      static java.util.List<org.eclipse.aether.repository.RemoteRepository> newRepositories​(org.eclipse.aether.RepositorySystem system, org.eclipse.aether.RepositorySystemSession session)  
      static org.eclipse.aether.RepositorySystem newRepositorySystem()  
      static org.eclipse.aether.DefaultRepositorySystemSession newRepositorySystemSession​(org.eclipse.aether.RepositorySystem system)  
      • Methods inherited from class java.lang.Object

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

      • PROVIDED_MODULES

        public static final java.util.Set<java.lang.String> PROVIDED_MODULES
    • Constructor Detail

      • MavenResolver

        public MavenResolver()
    • Method Detail

      • initialise

        public void initialise​(java.lang.String coordinates)
                        throws java.lang.Exception
        Usually called via initialise() from ApplicationSetup
        Throws:
        java.lang.Exception
      • addJarFiles

        public void addJarFiles​(java.util.Collection<java.lang.String> newJars)
                         throws java.lang.Exception
        Throws:
        java.lang.Exception
      • addJarURLs

        public void addJarURLs​(java.util.Collection<java.net.URL> newJars)
                        throws java.lang.Exception
        Throws:
        java.lang.Exception
      • addDependencies

        public void addDependencies​(java.util.List<java.lang.String> coords)
                             throws java.lang.Exception
        Allows user-facing code to add more jar files
        Throws:
        java.lang.Exception
      • newRepositorySystemSession

        public static org.eclipse.aether.DefaultRepositorySystemSession newRepositorySystemSession​(org.eclipse.aether.RepositorySystem system)
      • newRepositorySystem

        public static org.eclipse.aether.RepositorySystem newRepositorySystem()
      • newRepositories

        public static java.util.List<org.eclipse.aether.repository.RemoteRepository> newRepositories​(org.eclipse.aether.RepositorySystem system,
                                                                                                     org.eclipse.aether.RepositorySystemSession session)
      • main

        public static void main​(java.lang.String[] args)
                         throws java.lang.Exception
        Throws:
        java.lang.Exception