Is Maven installed?

asked 2017-05-07 00:14:41 -0500

Sourav gravatar image

updated 2017-05-07 19:29:13 -0500

Hi there,

I am trying to download war files from my maven repository. It is hosted in http://car-build-001.abc.com:8081/art...

$repo = { id => "myrepo", username => "admin", password => "password", url => "http://car-build-001.abc.com:8081/artifactory/simple/libs-snapshot-local/", }

maven { "/tmp/myfile.war": groupid => "com.abc.aus", artifactid => "assess-maven", version => "latest", packaging => "war", repos => $repo, ensure => "latest", }

The error which I am seeing -

Error: mvn returned 1: Is Maven installed? Error: /Stage[main]/Main/Node[car-lnxd-001.abc.com]/Maven[/temp/myfile.war]/ensure: change from absent to latest failed: mvn returned 1: Is Maven installed?

I am probably doing it wrong. Can anyone please take a look?

Thanks!

edit retag flag offensive close merge delete

Comments

What module are you using for the 'maven' class? Does that have an expected path/configuration/installation for ensuring that it knows how to find maven if it's installed, or a way to install it for you? Without knowing more about your modules, we can't help much.

DarylW gravatar imageDarylW ( 2017-05-07 22:29:53 -0500 )edit

Hi Daryl, I am using puppet-maven - https://github.com/maestrodev/puppet-maven

Sourav gravatar imageSourav ( 2017-05-07 22:40:23 -0500 )edit

Could you please post the debug output of your agent run? It looks to be falling over about line 137 of https://github.com/maestrodev/puppet-maven/blob/master/lib/puppet/provider/maven/mvn.rb but a debug would help see why.

ross.murray gravatar imageross.murray ( 2017-05-09 02:39:45 -0500 )edit