NAME

Maven::Repositories - An ordered collection of repositories from which to resolve artifacts

VERSION

version 1.10

SYNOPSIS

    # Dont use Repositories directly...  instead:
    use Maven::Agent;
    my $agent = Maven::Agent->new();
    $agent->resolve('javax.servlet:servlet-api:2.5');

DESCRIPTION

Represents an ordered collection of repositories that can be used to resolve Maven::Artifact's. This class should not be used directly. Instead you should use an Maven::Agent.

METHODS

add_central(agent => $agent, [%options])

Adds maven central to the list of repositories. Passes all arguments through to add_repository.

add_local($local_repository_path)

Add your $local_repository_path to the list of repositories.

add_repository($url, agent => $agent, [%options])

Adds $url to the list of repositories. $agent will be used to connect to the repository. The current options are:

metadata_filename

The name of the metadata file. Defaults to 'maven-metadata.xml'.

get_repository($url)

Returns the repository that contains $url.

resolve($artifact, [%parts])

Will attempt to resolve $artifact. $artifact can be either an instance of Maven::Artifact or a coordinate string of the form groupId:artifactId[:packaging[:classifier]]:version If resolution was successful, a new Maven::Artifact will be returned with its uri set. Otherwise, undef will be returned. If %parts are supplied, their values will be used to override the corresponding values in $artifact before resolution is attempted.

resolve_or_die($artifact, [%parts])

Calls resolve, and, if resolution was successful, the new $artifact will be returned, otherwise, croak will be called.

AUTHOR

Lucas Theisen <lucastheisen@pastdev.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2014 by Lucas Theisen.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

SEE ALSO

Please see those modules/websites for more information related to this module.