camptocamp/puppet-tomcat — pull request #95 by pmauduit (2014-05-03 11:55:28+00:00)
Title: Adds a parameter extra_jars to tomcat instances

This PR is meant to provide the way to easily add some extra dependencies that have to be shared across the different webapps that would be deployed into the tomcat instance.

Here is an example of manifest I used to test it:

```puppet
Exec {
path => '/usr/bin:/usr/local/bin:/usr/sbin:/bin:/sbin:/usr/local/sbin'
}
include tomcat
package {'libjai-imageio-core-java': ensure => 'installed' }
tomcat::instance {'tc-lib-extra-jars':
ensure => present,
http_port => '8080',
extra_jars => [ '/usr/share/java/jai_imageio.jar',
'/usr/share/java/jai_core.jar',
'/usr/share/java/jai_codec.jar' ]
}
```

This would create symlinks as follows:

```
admin@debian-7-amd64:/srv/tomcat/tc-lib-extra-jars/lib$ ls -lh
total 0
lrwxrwxrwx 1 root adm 29 May 3 13:36 jai_codec.jar -> /usr/share/java/jai_codec.jar
lrwxrwxrwx 1 root adm 28 May 3 13:36 jai_core.jar -> /usr/share/java/jai_core.jar
lrwxrwxrwx 1 root adm 31 May 3 13:36 jai_imageio.jar -> /usr/share/java/jai_imageio.jar
```

Since I'm pretty new to puppet, I don't know if this is the perfect way to do so, but if you've any feedback, do not hesitate to comment ; i deliberately left some TODOs in the code on some unsure statements.

Hth,