I’m currently building a desktop java application in a very clumsy manner. The application is deployed on Windows, Mac and Linux. Here’s my build process now:
On Windows:
- Update local repository
- Fire up Eclipse
- Refresh the project
- Double click the .jardesc file to generate an executable jar file
- Commit the executable jar to source control
- Open up the .nsi script and click the build button (I have NSSI plugin installed) to produce the .exe installer
- Upload installer to ftp server to publish
On Mac:
- Update local repository
- Run shell script to generate .dmg file using .jar in source control
- Upload to ftp server to publish
On Linux:
- Update local repository
- Run shell script to generate .deb file using .jar in source control
- Upload to ftp server to publish
I’d also like to include some extra steps in my build in the future, such as:
- Setting build date
- Setting the HEAD git commit-id
- Performing some code obfuscation
Any suggestions on how I can streamline and speed up this process?
If you are serious about having a good build system, then I’d recommend learning and using Maven, which provides:
This is not for the faint hearted (Maven is a complex beast) but in the long run it is a great solution.