Best practices for scripting Java services or daemons

I am looking for a tool to start java server processes as daemon services on Linux (and possibly for Windows and other OSs). I'm looking for best practices when it comes to how to create scripts that can create scripts and run configurations.

I am familiar with best practices when it comes to building a project using Apache Maven or something like Apache ANT + Ivy to control the build process and manage external dependencies and create artifacts and assemblies.

When it comes to creating a project assembly containing configuration and launch scripts, as well as all compiled code and dependencies, I don't know which is the best choice. Is there a good open source project that I could consider as an example that links the service wrapper and configuration scripts to their build process?

I was able to use Maven with the Jetty Launch plugin to run my web applications, the Terracotta Maven plugin to test multiple JVM cluster server nodes, and I used Maven exec: java to run my custom Java servers, but I'm not sure if using Maven in This quality is really โ€œproductionโ€ quality, and also means that my production servers depend on creating servers from source code and loading dependencies on potentially inaccessible servers.

Here are some potential things I'm looking for in a solution to run a Java service:

  • Must be run as a Linux service or as a Windows maintenance process.
  • Maven ANT script
  • Apache Ant
  • - Java (, Jetty 7) -
  • Java ( java-)

, , Java Service Wrapper, Maven appassembler.

, Maven , .

+3
2

Java Service Wrapper . , , nexus.

+3

(, " " ) Linux- script, , /etc/init.d. "rc. *" . . "man" Linux "init (8)", "chkconfig (8)" ..

+3

Source: https://habr.com/ru/post/1714842/


All Articles