I have recently created a Java desktop application with the help of maven and it runs in Linux and Windows.
My problem is that this application in the future is going to have more functionality, so I want it to detect when it changes on the Github repository where the code is.
For this purpose I have found some “solutions”, but i don’t really know what is the best one for my case or if there is a better one. Here are some of the options I came across:
The command instruction:
java uf jar -file input -file(s) in order to have the new files from the repository get them with the clone option of JGit. (I’m not quite sure if I can modify a jar in run time)
Use an updater like install4J, UpdateFX or Java web start, but I don’t know really how to use them.
I’m a little bit noob in terms of maven so I don’t really know if maven has something implemented to update automatically the dependences of a project when it is in an executable jar. If there is something like that I will be happy to hear it.
Having the new version of the jar in the Github repository and if the application detects a new version downloads it and replace itself with the new one.
Create another maven project for upgrading the project, having the project as a maven dependence in the new one.