NAME

Maven::Command - A command builder for mvn

VERSION

version 1.10

SYNOPSIS

use Maven::Command qw(mvn_artifact_params mvn_command);

# mvn -X package
my $command = mvn_command({'-X' => undef}, 'package');
`$command`;

# mvn --settings "/opt/shared/.m2/settings.xml" dependency:get \
#     -DgroupId="javax.servlet" \
#     -DartifactId="servlet-api" \
#     -Dversion="2.5"
my $artifact = Maven::Artifact->new('javax.servlet:servlet-api:2.5');
my $command = mvn_command(
    {'--settings' => "/opt/shared/.m2/settings.xml"}
    'package', 
    mvn_artifact_params($artifact));
`$command`;

DESCRIPTION

The base class for agents specifying the minimal interface. Subclasses must implement the _download_remote method.

EXPORT_OK

mvn_artifact_params($artifact)

Generates a parameter hash from the coordinate values of $artifact.

mvn_command([\%mvn_options], @goals_and_phases, [\%parameters])

Builds an mvn command as a string. %mvn_options can be any supported option to mvn, @goals_and_phases can be any list of goals or phases to be executed and %parameters are any parameters that should be supplied as system properties (typically used to specify parameters to the goals as needed).

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.