

- Maven install descriptorref .exe#
- Maven install descriptorref .dll#
- Maven install descriptorref zip file#
- Maven install descriptorref manual#
Maven install descriptorref zip file#
Maven install descriptorref .dll#
dll (to be honest, I’m not sure if this will work if there is no other java installation on the machine it should) StdOutput="%cd%\logs\stdout.log" -StdError="%cd%\logs\stderr.log"Ĭommons-daemon\prunsrv //ES//OpenDataPusher Classpath="%cd%\opendata-ckan-pusher.jar" -LogLevel=DEBUG^ -LogPath="%cd%\logs" -LogPrefix=procrun.log^ StartParams=start -StopParams=stop -StartMethod=windowsService -StopMethod=windowsService^ Startup=auto -StartClass=bg. -StopClass=bg.^ Install="%cd%\commons-daemon\prunsrv.exe" -Jvm="%cd%\jre1.8.0_91\bin\client\jvm.dll" -StartMode=jvm -StopMode=jvm^ Here’s the whole installer.bat: commons-daemon\prunsrv //IS//OpenDataPusher -DisplayName="OpenData Pusher" -Description="OpenData Pusher"^ The StartClass/StartMethod/StopClass/StopMethod parameters are for that. exe), but the JVM allows you to have a designated method to control your running application. I could use all three options (including the launch4j created. exe, but for java applications) and JVM (which runs the java application in the same process I don’t know how exactly though).

Maven install descriptorref .exe#
exe (which allows you to wrap an arbitrary executable), Java (which is like. You will notice the installer.bat and uninstaller.bat which are the files that use commons-daemon to manage the service.

Before doing that, I had to assemble every component needed into a single target folder – the fat jar (including all dependencies), the JRE, the commons-daemon binaries, and the config file. So I had to “daemonize” it, using commons-daemon procrun. The problem with that is that the java program uses a scheduled executor, so it never exits, which makes starting it as a process impossible. exe (with launch4j) and then registering it as a service. So, with maven project with jar packaging, I first thought of packaging an.
Maven install descriptorref manual#
The tool has to run periodically, so it’s a prime candidate for a service (which would make the upload possible even if the civil servant forgets about this task altogether, and besides, repetitive manual upload is a waste of time).Įven though there are numerous posts and StackOverflow answers on the topic, it still took me a lot of time because of minor caveats and one important prerequisite that few people seemed to have – having a bundled JRE, so that nobody has to download and install a JRE (would complicate the installation process unnecessarily, and the target audience is not necessarily tech-savvy). I had to do it because I developed a tool for civil servants to automatically convert and push their Excel files to the opendata portal of my country. It sounds like something you’d never need, but sometimes, when you distribute end-user software, you may need to install a java program as a Windows service.
