Skip to content
This repository has been archived by the owner on Jun 2, 2019. It is now read-only.

Error: mvn returned 1: Is Maven installed? #66

Open
souravbiswas opened this issue May 5, 2017 · 3 comments
Open

Error: mvn returned 1: Is Maven installed? #66

souravbiswas opened this issue May 5, 2017 · 3 comments

Comments

@souravbiswas
Copy link

Hi Maestro,

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

$repo = {
id => "myrepo",
username => "admin",
password => "password",
url => "http://car-build-001.abc.com:8081/artifactory/simple/libs-snapshot-local/",
#mirrorof => "external:*" # if you want to use the repo as a mirror, see maven::settings below
}

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

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

Thanks!

@souravbiswas
Copy link
Author

I found one error and the name of the tmp folder was incorrect. But I still get the issue -

Error: /Stage[main]/Main/Node[car-lnxd-001.abc.com]/Maven[/tmp/]: Could not evaluate: mvn returned 1: Is Maven installed?

Could you please take a look?

@sreev
Copy link

sreev commented Jun 5, 2017

from Setup: (but this is not working, though). workaround, install maven, before running your puppet code.

Install Maven

class { "maven::maven":
version => "3.2.5", # version to install
# you can get Maven tarball from a Maven repository instead than from Apache servers, optionally with a user/password
repo => {
#url => "http://repo.maven.apache.org/maven2",
#username => "",
#password => "",
}
} ->

@sreev
Copy link

sreev commented Jun 6, 2017

workaround:
use, ensure_packages(['maven'], {'ensure' => 'present'})

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants