Skip to content

This repo is one of my librairies to download maven depency at runtime instead of export them in the jar

License

Notifications You must be signed in to change notification settings

HookWoods/MavenResolver

Repository files navigation

MavenResolver 1.0.0

MavenResolver is an api that allow you to download maven / gradle dependencies at runtime of your application / your plugins instead of exporting all your dependencies in your jar. One of the main advantage is it's completely Thread-Safe and also download the dependencies in parrallel to be faster

Usage

To start you have to call the api in the Main class of your program.

DependencyManager dependencyManager = new DependencyManager(this.getClass);

After you have to preload your dependencies

dependencyManager.preLoad(new Dependency("groupId", "artifactId", "version"));

and to finish

dependencyManager.load(new File(yourDependeciesFolder));

Example

private DependencyManager dependencyManager;

public static void main(String[] args){
    this.dependencyManager = new DependencyManager(this.getClass);
    loadDependencies();
}

public void loadDependencies(){
        dependencyManager.preLoad(new Dependency("org.redisson", "redisson", "3.13.2"));
        dependencyManager.preLoad(new Dependency("com.rabbitmq", "amqp-client", "5.9.0"));
        dependencyManager.preLoad(new Dependency("org.mongodb", "mongo-java-driver", "3.12.6"));
        dependencyManager.load();
}

Community

If you want to optimize, add new fonctionality or have a problem, you can open a PR with your commit oren an issue if you have a problem

I will soon push it to a public maven repository.

About

This repo is one of my librairies to download maven depency at runtime instead of export them in the jar

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages