I am writing a web application with Maven in the Eclipse IDE and using the Tomcat servlet container.
So I run Maven follows: mvn clean compile. It is reasonable that after this operation I have to restart Tomcat so that it can reinitialize the context (Sysdeo Tomcat multi-user program).
mvn clean compile
The problem is running Maven, and then re-executing Tomcat requires a noticeable amount of time (e.g. 10 seconds for Maven and 20+ seconds for Tomcat due to registration, O / R mappings, etc.) every time I do this he.
Is there an automatic and faster solution for these operations? As I see it, the best solution would be to move the recompiled classes only to the destination directory.
So the question is why do you run cleanevery time? Performing incremental compilation would already speed up a lot.
clean
: @Carl Eclipse WTP, Tomcat ( Sysdeo). Eclipse WTP Maven , , . maven-eclipse-plugin m2eclipse ( Maven Eclipse) WTP, .. , .
Maven : . , Maven - , , ant.
ant , , . WEB-INF/classes web.xml, , Tomcat. / .
WEB-INF/classes
web.xml
. Maven .
EDIT: , , : Eclipse, WTP, Java EE. , Ctrl-S, , Eclipse Tomcat, -. Eclipse , , , , /. , Maven, .
JRebel. tomcat, . , , , .
, Maven tomcat, "mvn tomcat: redeploy", maven , tomcat, . tomcat .
, , Eclipse "Build Automatically" (Project → Build Automatically )., , Eclipse .class .
.class
Source: https://habr.com/ru/post/1743033/More articles:SnakeYAML: how to disable underline highlighting when parsing? - parsingRegisterStartupScript does not work after upgrading to 3.5 framework - c #Почему результат набора записей возвращается таким образом для запроса базы данных Python? - pythonDid you find a better feature in IE 8 Developer than firebug? - cssCreating a dynamic method - reflectionUsing CSS max-height on an outer div to force scroll on an inner div - htmlAsp.net MVC Ajax form that returns Json in javascript method - jqueryJavaDB / Derby Error 08006 - javaAdding an existing implementation file to an Xcode project will not work - fileIs there a cleaner way to bind a property to the owner of a DataContext? - c #All Articles