How to create installers with Maven

后端 未结 6 2090
离开以前
离开以前 2020-12-23 22:05

I\'m migrating a medium sized Java application\'s build from Ant to Maven. I could easily migrate the basic building stuff, but I would also like to create the installer pac

6条回答
  •  [愿得一人]
    2020-12-23 22:15

    I'd use the IzPack maven plugin if you need a full-blown installer, or the appassembler-maven-plugin if you simply need to generate daemons for java services.

    There are also plugins for NSIS, Debian, and RPM packaging, but using those means you have to maintain configurations for each platform, on the other hand IzPack allows you to generate an installer for Windows XP / Vista / 2003 / 2000, Mac OS X, Solaris, Linux and *BSD.


    The appassembler plugin provides a goal to generate JSW daemons for each platform. Here is an example configuration:

    
      org.codehaus.mojo
      appassembler-maven-plugin
      1.0
      
        generate-jsw-scripts
        package
        
          generate-daemons
        
        
          
            
              myApp
              name.seller.rich.MainClass
              
                start
              
              
                jsw
                            
            
          
          ${project.build.directory}/appassembler
        
      
    
    

提交回复
热议问题