Maven::Maven - The main interface to maven
version 1.10
use Maven::Maven; my $maven = Maven::Maven->new(); my $artifact = $maven->repositories()->resolve( 'javax.servlet:servlet-api:2.5');
Or more likely
use Maven::Agent; my $agent = Maven::Agent->new(); my $maven = $agent->maven(); my $global_settings_file = $maven->m2_home('conf', 'settings.xml'); my $user_settings_file = $maven->dot_m2('settings.xml'); my $artifact = $agent->resolve('javax.servlet:servlet-api:2.5');
This class is a container for maven configuration data. When constructed it parses the settings files (both user and global), and generates Maven::Repositories that can be used to resolve Maven::Artifact's.
Constructs a new instance. It is uncommon to construct Maven::Maven directly, instead you should use one of the agents (Maven::Agent, Maven::MvnAgent) and then obtain access through their get_maven method. The currently supported options are:
An instance of LWP::UserAgent that will be used to connect to the remote repositories.
The path to the maven install directory. Defaults to $ENV{HOME}.
$ENV{HOME}
The path to the users home directory. Defaults to $ENV{HOME} || $ENV{USERPROFILE}.
$ENV{HOME} || $ENV{USERPROFILE}
Returns a path indicated by joining all of @parts to the user maven dot directory.
@parts
Returns the value of the effective settings property indicated by $key.
$key
Returns the repositories configured in the effective settings.
Returns the resolved maven settings (combines global and user settings).
Returns a path indicated by joining all of @parts to the maven install directory.
Returns a path indicated by joining all of @parts to the user home directory.
Lucas Theisen <lucastheisen@pastdev.com>
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.
Please see those modules/websites for more information related to this module.
Maven::Agent
Maven::MvnAgent
Maven::Artifact
To install Maven::Agent, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Maven::Agent
CPAN shell
perl -MCPAN -e shell install Maven::Agent
For more information on module installation, please visit the detailed CPAN module installation guide.