Are there tools for easily creating installers from jars for various
platforms? Ideally, the installers would be native and would check
whether jvm is installed and do something user-friendly if it's not.
For .deb, I'd consider using the deb-maven-plugin from Codehaus:
<
http://mojo.codehaus.org/deb-maven-plugin/using-deb.html>
However, I've never used it so I can't speak for how well it
does/doesn't work, and if you're not already using maven, the migration
may be more than you want to bite off. The biggest gotcha that I can
spot is related to generated dependencies: I'm not sure how well its
autoGenerateDepends directive works, so do some experiments.
There is a similar plugin for RPMs:
<
http://mojo.codehaus.org/rpm-maven-plugin/>
I don't see an MSI plugin floating around, either on codehaus or
anywhere else. Java programs are pretty close to xcopy-installable by
default, unless you have strange beliefs about installing JARs
"globally" to the system -- don't do that, it's against the grain of
Java's deployment model in practice. Both Redhat and Debian have gone
to a lot of lengths to fake global library installation, but even with
all the manpower spent, it's not great.
Building a Mac .app bundle is probably better done through the assembly
plugin, since Java .apps are little more than directory trees. Details
on the correct structure are available online:
<
http://developer.apple.com/document...apple_ref/doc/uid/TP40001885-208447-TPXREF120>
(<
http://tinyurl.com/ct2mlg>)
As for the assembly plugin itself, the documentation for it is at:
<
http://maven.apache.org/plugins/maven-assembly-plugin/>
To bundle it up as a .dmg, you'll need to run something like
$ hdiutil create -srcfolder root-of-distribution my-project-1.0.dmg
$ hdiutil internet-enable -yes my-project-1.0.dmg
(The internet-enable step is semi-optional but I do wish more DMGs
would use it.)
For a few bucks I'd be happy to write and release as open source a
maven plugin that ties together the steps in building a complete .dmg
from a JAR project; it's not hard, but it's not something I
particularly care about doing ferfree.
HTH.
-o