I have rewritten the java cookbook to use the java_cpr lwrp (Crappy Package
Resource). This LWRP provides an easy way to manage java applications. It
is “crappy” because it is very simple and barely deserves being called a
package resource. Essentially, you provide the java_cpr with the URL to a
the commands within the extracted result that you want symlinked to
As I mentioned in an earlier post to this ML, the jpackage rpm repository
is no longer actively maintained and the versions of tomcat, jboss, maven,
ant, etc. available in the ubuntu and rhel/centos repositories are too far
behind to satisfy discerning java developers. Thus the java_cpr.
Here is an example
install jdk6 from Oracle
java_cpr “jdk” do
bin_cmds [“java”, “javac”]
I intend to rewrite the tomcat and my as yet-unpublished jboss cookbook
using this lwrp. Advice, criticism welcome!
I have put these new java cookbooks in this commit.
I attempted to create a “bare branch” that only includes the cookbooks I
want to merge, however this bare branch seems to do a lot of violence to
the branch. Please let me know if there is a better way to do this.
I followed this technique, as described to me by Atomic-Penguin