| 1 | 6 | ▶ | use strict; | ||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||
| 2 | 6 | ▶ | use warnings; | ||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||
| 3 | |||||||||||||||||||||||||||||||
| 4 | package Maven::Xml::Settings; | ||||||||||||||||||||||||||||||
| 5 | 6 | $Maven::Xml::Settings::VERSION = '1.12'; | |||||||||||||||||||||||||||||
| 6 | # ABSTRACT: Maven Settings element | ||||||||||||||||||||||||||||||
| 7 | # PODNAME: Maven::Xml::Settings | ||||||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||||||
| 9 | 6 | ▶ | use Maven::Xml::Common::BaseProfile; | ||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||
| 10 | 6 | ▶ | use Maven::Xml::Common::Configuration; | ||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||
| 11 | 6 | ▶ | use Maven::Xml::Common::Repository; | ||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||
| 12 | |||||||||||||||||||||||||||||||
| 13 | 6 | ▶ | use parent qw(Maven::Xml::XmlFile); | ||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||
| 14 | 6 | __PACKAGE__->follow_best_practice; | |||||||||||||||||||||||||||||
| 15 | 6 | __PACKAGE__->mk_accessors( | |||||||||||||||||||||||||||||
| 16 | qw( | ||||||||||||||||||||||||||||||
| 17 | localRepository | ||||||||||||||||||||||||||||||
| 18 | interactiveMode | ||||||||||||||||||||||||||||||
| 19 | usePluginRegistry | ||||||||||||||||||||||||||||||
| 20 | offline | ||||||||||||||||||||||||||||||
| 21 | settings | ||||||||||||||||||||||||||||||
| 22 | proxies | ||||||||||||||||||||||||||||||
| 23 | servers | ||||||||||||||||||||||||||||||
| 24 | mirrors | ||||||||||||||||||||||||||||||
| 25 | profiles | ||||||||||||||||||||||||||||||
| 26 | activeProfiles | ||||||||||||||||||||||||||||||
| 27 | pluginGroups | ||||||||||||||||||||||||||||||
| 28 | ) | ||||||||||||||||||||||||||||||
| 29 | ); | ||||||||||||||||||||||||||||||
| 30 | |||||||||||||||||||||||||||||||
| 31 | sub _add_value { | ||||||||||||||||||||||||||||||
| 32 | 375 | ▶ | my ( $self, $name, $value ) = @_; | ||||||||||||||||||||||||||||
|
Subroutine
_add_value: called CC=14 SCAR=26.4
| |||||||||||||||||||||||||||||||
| 33 | |||||||||||||||||||||||||||||||
| 34 | 375 | ▶ | return if ( $name eq 'settings' ); | ||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||
| 35 | 348 | ▶ | return if ( $name eq 'proxies' ); | ||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||
| 36 | 323 | ▶ | return if ( $name eq 'servers' ); | ||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||
| 37 | 298 | ▶ | return if ( $name eq 'mirrors' ); | ||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||
| 38 | 273 | ▶ | return if ( $name eq 'profiles' ); | ||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||
| 39 | 246 | ▶ | return if ( $name eq 'activeProfiles' ); | ||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||
| 40 | 223 | ▶ | return if ( $name eq 'pluginGroups' ); | ||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||
| 41 | |||||||||||||||||||||||||||||||
| 42 | 198 | ▶ | if ( $name eq 'proxy' ) { | ||||||||||||||||||||||||||||
|
Branch: 6 branches
| |||||||||||||||||||||||||||||||
| 43 | 13 | push( @{ $self->{proxies} }, $value ); | |||||||||||||||||||||||||||||
| 44 | } | ||||||||||||||||||||||||||||||
| 45 | elsif ( $name eq 'server' ) { | ||||||||||||||||||||||||||||||
| 46 | 13 | push( @{ $self->{servers} }, $value ); | |||||||||||||||||||||||||||||
| 47 | } | ||||||||||||||||||||||||||||||
| 48 | elsif ( $name eq 'mirror' ) { | ||||||||||||||||||||||||||||||
| 49 | 13 | push( @{ $self->{mirrors} }, $value ); | |||||||||||||||||||||||||||||
| 50 | } | ||||||||||||||||||||||||||||||
| 51 | elsif ( $name eq 'profile' ) { | ||||||||||||||||||||||||||||||
| 52 | 15 | push( @{ $self->{profiles} }, $value ); | |||||||||||||||||||||||||||||
| 53 | } | ||||||||||||||||||||||||||||||
| 54 | elsif ( $name eq 'activeProfile' ) { | ||||||||||||||||||||||||||||||
| 55 | 11 | push( @{ $self->{activeProfiles} }, $value ); | |||||||||||||||||||||||||||||
| 56 | } | ||||||||||||||||||||||||||||||
| 57 | elsif ( $name eq 'pluginGroup' ) { | ||||||||||||||||||||||||||||||
| 58 | 33 | push( @{ $self->{pluginGroups} }, $value ); | |||||||||||||||||||||||||||||
| 59 | } | ||||||||||||||||||||||||||||||
| 60 | else { | ||||||||||||||||||||||||||||||
| 61 | 100 | $self->Maven::Xml::XmlNodeParser::_add_value( $name, $value ); | |||||||||||||||||||||||||||||
| 62 | } | ||||||||||||||||||||||||||||||
| 63 | } | ||||||||||||||||||||||||||||||
| 64 | |||||||||||||||||||||||||||||||
| 65 | sub _get_parser { | ||||||||||||||||||||||||||||||
| 66 | 262 | ▶ | my ( $self, $name ) = @_; | ||||||||||||||||||||||||||||
|
Subroutine
_get_parser: called CC=5 SCAR=16.1
| |||||||||||||||||||||||||||||||
| 67 | 262 | ▶ | if ( $name eq 'proxy' ) { | ||||||||||||||||||||||||||||
|
Branch: 4 branches
| |||||||||||||||||||||||||||||||
| 68 | 13 | return Maven::Xml::Settings::Proxy->new(); | |||||||||||||||||||||||||||||
| 69 | } | ||||||||||||||||||||||||||||||
| 70 | elsif ( $name eq 'server' ) { | ||||||||||||||||||||||||||||||
| 71 | 13 | return Maven::Xml::Settings::Server->new(); | |||||||||||||||||||||||||||||
| 72 | } | ||||||||||||||||||||||||||||||
| 73 | elsif ( $name eq 'mirror' ) { | ||||||||||||||||||||||||||||||
| 74 | 13 | return Maven::Xml::Settings::Mirror->new(); | |||||||||||||||||||||||||||||
| 75 | } | ||||||||||||||||||||||||||||||
| 76 | elsif ( $name eq 'profile' ) { | ||||||||||||||||||||||||||||||
| 77 | 15 | return Maven::Xml::Settings::Profile->new(); | |||||||||||||||||||||||||||||
| 78 | } | ||||||||||||||||||||||||||||||
| 79 | 208 | return $self; | |||||||||||||||||||||||||||||
| 80 | } | ||||||||||||||||||||||||||||||
| 81 | |||||||||||||||||||||||||||||||
| 82 | package Maven::Xml::Settings::Proxy; | ||||||||||||||||||||||||||||||
| 83 | 6 | $Maven::Xml::Settings::Proxy::VERSION = '1.12'; | |||||||||||||||||||||||||||||
| 84 | 6 | ▶ | use parent qw(Maven::Xml::XmlNodeParser); | ||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||
| 85 | 6 | __PACKAGE__->follow_best_practice; | |||||||||||||||||||||||||||||
| 86 | 6 | __PACKAGE__->mk_ro_accessors( | |||||||||||||||||||||||||||||
| 87 | qw( | ||||||||||||||||||||||||||||||
| 88 | active | ||||||||||||||||||||||||||||||
| 89 | protocol | ||||||||||||||||||||||||||||||
| 90 | username | ||||||||||||||||||||||||||||||
| 91 | password | ||||||||||||||||||||||||||||||
| 92 | port | ||||||||||||||||||||||||||||||
| 93 | host | ||||||||||||||||||||||||||||||
| 94 | nonProxyHosts | ||||||||||||||||||||||||||||||
| 95 | id | ||||||||||||||||||||||||||||||
| 96 | ) | ||||||||||||||||||||||||||||||
| 97 | ); | ||||||||||||||||||||||||||||||
| 98 | |||||||||||||||||||||||||||||||
| 99 | package Maven::Xml::Settings::Server; | ||||||||||||||||||||||||||||||
| 100 | 6 | $Maven::Xml::Settings::Server::VERSION = '1.12'; | |||||||||||||||||||||||||||||
| 101 | 6 | ▶ | use parent qw(Maven::Xml::XmlNodeParser); | ||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||
| 102 | 6 | __PACKAGE__->follow_best_practice; | |||||||||||||||||||||||||||||
| 103 | 6 | __PACKAGE__->mk_ro_accessors( | |||||||||||||||||||||||||||||
| 104 | qw( | ||||||||||||||||||||||||||||||
| 105 | username | ||||||||||||||||||||||||||||||
| 106 | password | ||||||||||||||||||||||||||||||
| 107 | privateKey | ||||||||||||||||||||||||||||||
| 108 | passphrase | ||||||||||||||||||||||||||||||
| 109 | filePermissions | ||||||||||||||||||||||||||||||
| 110 | directoryPermissions | ||||||||||||||||||||||||||||||
| 111 | configuration | ||||||||||||||||||||||||||||||
| 112 | id | ||||||||||||||||||||||||||||||
| 113 | ) | ||||||||||||||||||||||||||||||
| 114 | ); | ||||||||||||||||||||||||||||||
| 115 | |||||||||||||||||||||||||||||||
| 116 | sub _get_parser { | ||||||||||||||||||||||||||||||
| 117 | 20 | ▶ | my ( $self, $name ) = @_; | ||||||||||||||||||||||||||||
|
Subroutine
_get_parser: called CC=2 SCAR=6.9
| |||||||||||||||||||||||||||||||
| 118 | 20 | ▶ | if ( $name eq 'configuration' ) { | ||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||
| 119 | 1 | return Maven::Xml::Common::Configuration->new(); | |||||||||||||||||||||||||||||
| 120 | } | ||||||||||||||||||||||||||||||
| 121 | 19 | return $self; | |||||||||||||||||||||||||||||
| 122 | } | ||||||||||||||||||||||||||||||
| 123 | |||||||||||||||||||||||||||||||
| 124 | package Maven::Xml::Settings::Mirror; | ||||||||||||||||||||||||||||||
| 125 | 6 | $Maven::Xml::Settings::Mirror::VERSION = '1.12'; | |||||||||||||||||||||||||||||
| 126 | 6 | ▶ | use parent qw(Maven::Xml::XmlNodeParser); | ||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||
| 127 | 6 | __PACKAGE__->follow_best_practice; | |||||||||||||||||||||||||||||
| 128 | 6 | __PACKAGE__->mk_ro_accessors( | |||||||||||||||||||||||||||||
| 129 | qw( | ||||||||||||||||||||||||||||||
| 130 | mirrorOf | ||||||||||||||||||||||||||||||
| 131 | name | ||||||||||||||||||||||||||||||
| 132 | url | ||||||||||||||||||||||||||||||
| 133 | layout | ||||||||||||||||||||||||||||||
| 134 | mirrorOfLayouts | ||||||||||||||||||||||||||||||
| 135 | id | ||||||||||||||||||||||||||||||
| 136 | ) | ||||||||||||||||||||||||||||||
| 137 | ); | ||||||||||||||||||||||||||||||
| 138 | |||||||||||||||||||||||||||||||
| 139 | package Maven::Xml::Settings::Profile; | ||||||||||||||||||||||||||||||
| 140 | 6 | $Maven::Xml::Settings::Profile::VERSION = '1.12'; | |||||||||||||||||||||||||||||
| 141 | 6 | ▶ | use parent qw(Maven::Xml::Common::BaseProfile); | ||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||
| 142 | 6 | __PACKAGE__->follow_best_practice; | |||||||||||||||||||||||||||||
| 143 | 6 | __PACKAGE__->mk_ro_accessors( | |||||||||||||||||||||||||||||
| 144 | qw( | ||||||||||||||||||||||||||||||
| 145 | properties | ||||||||||||||||||||||||||||||
| 146 | ) | ||||||||||||||||||||||||||||||
| 147 | ); | ||||||||||||||||||||||||||||||
| 148 | |||||||||||||||||||||||||||||||
| 149 | sub _get_parser { | ||||||||||||||||||||||||||||||
| 150 | 99 | ▶ | my ( $self, $name ) = @_; | ||||||||||||||||||||||||||||
|
Subroutine
_get_parser: called CC=2 SCAR=6.9
| |||||||||||||||||||||||||||||||
| 151 | |||||||||||||||||||||||||||||||
| 152 | 99 | ▶ | if ( $name eq 'properties' ) { | ||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||
| 153 | 13 | return Maven::Xml::Settings::Profile::Properties->new(); | |||||||||||||||||||||||||||||
| 154 | } | ||||||||||||||||||||||||||||||
| 155 | |||||||||||||||||||||||||||||||
| 156 | 86 | return $self->Maven::Xml::Common::BaseProfile::_get_parser($name); | |||||||||||||||||||||||||||||
| 157 | } | ||||||||||||||||||||||||||||||
| 158 | |||||||||||||||||||||||||||||||
| 159 | package Maven::Xml::Settings::Profile::Properties; | ||||||||||||||||||||||||||||||
| 160 | 6 | $Maven::Xml::Settings::Profile::Properties::VERSION = '1.12'; | |||||||||||||||||||||||||||||
| 161 | 6 | ▶ | use parent qw(Maven::Xml::XmlNodeParser); | ||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||
| 162 | 6 | __PACKAGE__->follow_best_practice; | |||||||||||||||||||||||||||||
| 163 | |||||||||||||||||||||||||||||||
| 164 | 6 | 1; | |||||||||||||||||||||||||||||
| 165 | |||||||||||||||||||||||||||||||
| 166 | __END__ | ||||||||||||||||||||||||||||||