Don't define a function for this.

You want `(share/"java").install "springloaded-1.1.5.RELEASE.jar" => "springloaded.jar"`.