Ask Your Question
0

how to run maven scripts in puppet

asked 2017-04-05 10:50:13 -0600

r5122477@gmail.com gravatar image

I want to run maven scripts using puppet.

edit retag flag offensive close merge delete

Comments

1

I want a cheeseburger.

puser gravatar imagepuser ( 2017-04-06 06:31:13 -0600 )edit

https://forge.puppet.com/maestrodev/maven The forge has tons of modules created by the community. Check them out. Here is one for maven.

puser gravatar imagepuser ( 2017-04-06 06:31:37 -0600 )edit

That plugin is specifically for accessing maven url's for artifacts via puppet. Since the OP was very unclear on what they want to accomplish, I don't fault you for your response.

DarylW gravatar imageDarylW ( 2017-04-06 10:02:09 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-04-06 10:06:58 -0600

DarylW gravatar image

I would question if puppet is the right place to run your maven scripts. That should probably be done on a dedicated CI/CD server to crate the appropriate artifacts/packages that you will install on your system, which you then install/manage with puppet (using the above mentioned maven plugin to pull them from your maven server).

However, I have come across an example of someone doing this in the wild in the exhibitor module on thye forge - https://forge.puppet.com/slackey/exhi...

Sadly, it was simply an exec running the maven command after pulling down the appropriate files in install.pp, it(specifically to build exhibitor, since there doesn't appear to be any kind of complete, hosted artifact/archive for it).

https://github.com/scottlackey/exhibi...

  exec { 'build-exhibitor':
    command => "/usr/bin/mvn clean package -f ${install_dir}/${version}/pom.xml && /bin/cp ${install_dir}/${version}/target/exhibitor-${version}.jar ${install_dir}/exhibitor-standalone-${version}.jar",
    creates => "${install_dir}/exhibitor-standalone-${version}.jar",
    require => File["${install_dir}/${version}/pom.xml"],
    unless  => "/usr/bin/test -f ${install_dir}/exhibitor-standalone-${version}.jar",
    notify  => Service['exhibitor'],
  }
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2017-04-05 10:40:52 -0600

Seen: 47 times

Last updated: Apr 06