Package org.terrier.utility
Class MavenResolver
- java.lang.Object
-
- org.terrier.utility.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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MavenResolver.MutableURLClassLoader
-
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 filesvoid
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 pluginvoid
initialise(java.lang.String coordinates)
Usually called via initialise() from ApplicationSetupstatic 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)
-
-
-
Method Detail
-
initialise
public void initialise() throws java.lang.Exception
Description copied from interface:ApplicationSetup.TerrierApplicationPlugin
Called by ApplicationSetup to initialise the plugin- Specified by:
initialise
in interfaceApplicationSetup.TerrierApplicationPlugin
- Throws:
java.lang.Exception
-
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
-
-