How can I deploy my Java project?

I work in the Java development team. We write code in Eclipse, and then we use maven to build a war. Subsequently, we deploy the war in Tomcat.

Is there a free way to automatically deploy files when saving?

Thanks.

+4
source share
6 answers

JRebel gives you exactly that: automatic deployment of files when saving using Eclipse AND Tomcat , but you have to pay for it.

I recommend JRebel, but a quick look at free alternatives raises this SO question , where someone suggested Dynamic Code Evolution VM as a similar product.

There is a good article on the various ways to hot deploy Java web applications here , which also details some of the other approaches mentioned.

+10
source

If you want to deploy a developer to test on your machine, you should use Tomcat Maven Plugin or, better, Maven Jetty Plugin (this is better because it is easier and faster).

If you want to deploy it to a remote server, say that for every commit on your SCM you should use Contiuous Integration tools like Jenkins or Apache Continuum.

+3
source
  • OSGi is a versatile hot plug deployment system
  • Clojure is a dynamic JVM language that provides a lot of interactivity at runtime. Clojure is often used for live coding - almost anything can be hot-swapped and redefined at runtime. Clojure is a functional language with a strong emphasis on immutability and concurrency, therefore, in a sense, has some interesting similarities with Erlang. Clojure has some very good web frameworks, such as Noir, which are suitable for hot swapping srever web code.
  • The playback platform is designed to include hot-swap code to improve performance, which avoids restarting the web server). May be relevant if you are looking primarily for hot swappable web applications.
  • Most Java application servers, such as JBoss, support some form of hot swap for web applications.
+1
source

If you have class files, you can put them in WEB-INF / classes. Is this what you were looking for?

0
source

You can use the maven plugin

0
source

Do not build using maven, use exploded deployment so that static user interface and JSP files can be automatically loaded by the container. To reload changes to class files, you can run the application in a debugging session and use hotswap (which allows you to only change the methods bodies) or overcome your demand for free software and buy a JRebel license that can be used for free without any - commercial projects ( http://social.jrebel.com )

0
source

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


All Articles