How to create installers with Maven

I am migrating a medium-sized version of a Java application from Ant to Maven. I could easily transfer the main building material, but I would also like to create installer packages from the Maven assembly. The easiest way is to invoke Ant source scripts through the Ant plugin, but I thought that maybe I should first check out some Maven support.

I need to create several different installers for different platforms:

  • Windows 32/64 bit
  • Linux 32/64 bit
  • MacOS 32/64 bit

For Linux, now I think that we only have tar.gz and some Bash scripts for running daemons - the Debian / RPM package will be much nicer, maybe with dependent package definitions. For Windows installers, we use the NullSoft installer. I have no idea how the MacOS package is going.

Are there any tools for this (or at least partially) from Maven?

+23
source share
6 answers

I would use the IzPack maven plugin if you need a fully functional installer, or appassembler-maven-plugin if you just need to create daemons for java services.

There are also plugins for NSIS , Debian and RPM , but with these tools you need to support the configuration for each platform, on the other hand, IzPack allows you to create an installer for Windows XP / Vista / 2003/2000, Mac OS X, Solaris, Linux and * BSD.


appassembler JSW . :

<plugin>
  <groupId>org.codehaus.mojo</groupId>
  <artifactId>appassembler-maven-plugin</artifactId>
  <version>1.0</version>
  <execution>
    <id>generate-jsw-scripts</id>
    <phase>package</phase>
    <goals>
      <goal>generate-daemons</goal>
    </goals>
    <configuration>
      <daemons>
        <daemon>
          <id>myApp</id>
          <mainClass>name.seller.rich.MainClass</mainClass>
          <commandLineArguments>
            <commandLineArgument>start</commandLineArgument>
          </commandLineArguments>
          <platforms>
            <platform>jsw</platform>
          </platforms>              
        </daemon>
      </daemons>
      <target>${project.build.directory}/appassembler</target>
    </configuration>
  </execution>
</plugin>
+18
+2
+1

Installjammer - maven, izPack .

0

BitRock InstallBuilder can be used with Maven (and other CI build tools) to create Windows exe installers, Linux / RPM / DEB binaries and OS X. It is commercial, but we have discounts for small companies / solo developers and free license for projects with open source (disclaimer, I am the author of InstallBuilder)

0
source

All Articles