I am developing a backend for an application using the Netty framework written in Java. Now I'm wondering what's the best way to deploy this application to my vServer. I see two general methods:

  • Install just the Java runtime on the server; upload and run a locally built jar file of the application.
  • Install the complete Java SDK with all dependencies on the server, checkout the source code from version control and build the application on the server.

Since I have no experience in deploying Java backends so far, I'd like to know what's the recommended/standard solution for this. I see pros and cons in both methods (method 1: easier setup, shorter downtimes between updates; method 2: less error-prone, tests can be run in production environment).

Thanks for your answers!

  • The production server is probably way too busy for that. Just deploy the JAR like everyone else does. – Michael Hampton Feb 25 '18 at 22:48
  • Tests being ran in the production environment is not a "pro". Standard practice is to separate build and deployment. You can store your build artifacts something like artifactory or nexus. – jordanm Feb 26 '18 at 0:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.