Skip to content

samskivert/mfetcher

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 

Maven Fetcher

This library provides a greatly simplified interface to Maven's Aether repository system, allowing one to download Maven artifacts into a user's local Maven repository with a minimum degree of fuss.

It is adapted from the Capsule project. Capsule is designed for all wrinkles to be ironed out up front and thus tends to handle any errors by blowing everything up. This library expects to be used in situations where developers will be editing Maven dependencies and may make mistakes, and thus it provides better failure handling for unresolvable dependencies.

Usage

Like so:

Path home = Paths.get(System.getProperty("user.home"));
Path m2 = home.resolve(".m2/repository");
DependencyManager mgr = new DependencyManager(m2, null, false, false);
Map<Coord,Path> results = mgr.resolveDependencies(Arrays.asList(
  new Coord("junit", "junit", "4.11", "jar")));

Et voila!

Set -Dmfetcher.log=verbose to see all the messy details and/or debug failures.

About

Simple API that wraps Maven's Aether repository management system.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages