NAME
Maven::Artifact - An maven artifact definition
VERSION
version 1.05
SYNOPSIS
use Maven::Artifact;
my $artifact = Maven::Artifact->new('javax.servlet:servlet-api:2.5);
my $artifact = Maven::Artifact->new('javax.servlet:servlet-api',
version => 2.5
packaging => 'jar');
Or, more commonly:
use Maven::Agent;
my $agent = Maven::Agent->new();
my $artifact = $agent->resolve('javax.servlet:servlet-api:2.5);
DESCRIPTION
Represents a maven artifact. Artifacts are identified by coordinates. An artifacts coordinate is made up of: groupId:artifactId[:packaging[:classifier]]:version Packaging and classifier are optional, and if not specified, then packaging defaults to jar
and classifier is left empty. This representation also contains a uri that is specified by when this artifact gets resolved.
CONSTRUCTORS
new($artifact, %parts)
Returns a new artifact indicated by $artifact
. If %parts
are supplied, their values will be used to override the corresponding values in $artifact
before resolution is attempted.
METHODS
get_artifactId()
Returns the artifactId
.
get_artifact_name()
Returns the artifact_name
.
get_classifier()
Returns the classifier
.
get_coordinate()
Returns the coordinate representation of this artifact.
get_groupId()
Returns the groupId
.
get_packaging()
Returns the packaging
.
get_uri()
Returns the url
as an URI object.
get_url()
Returns the url
.
get_version()
Returns the version
.
set_groupId($group_id)
Sets the groupId
to $group_id
.
set_artifactId($artifact_id)
Sets the artifactId
to $artifact_id
.
set_artifact_name($artifact_name)
Sets the artifact_name
to $artifact_name
.
set_classifier($classifier)
Sets the classifier
to $classifier
.
set_packaging($packaging)
Sets the packaging
to $packaging
.
set_url($url)
Sets the url
to $url
.
set_version($version)
Sets the version
to $version
.
to_string()
Returns the value of get_coordinate.
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.