Do the "resource generation" build step on Jetty restart?

I am using the jetty-maven plugin to act as a local server for my web application. During the "resource generation" phase of my build, I run lessc and grunt to compile my CSS and JavaScript respectively.

I would like to use the Jetty "scanIntervalSeconds" and "scanTargetPattern" configurations to view my .less and .js files and trigger my build when I make changes to those files.

I have this part and Jetty reloads when I make changes to these files, however the restart does not perform the "resource generation" phase of my build (I'm not sure if it does any part of my build at all).

Is there a way to specify what should happen when Jetty restarts?

+3


source to share


2 answers


Maven manages the "resource generation" phase of your build.

Hot Jetty deployment for internal deployment manages redeployment.



There is no way to interact between them. And adding that the Jetty object will require Jetty to embed maven on its own is not a trivial task.

+1


source


If you are looking for a solution to view your LESS code changes on the reload page while developing with the jetty-maven plugin, but precompile your LESS code for maximum page speed when creating a WAR file, you may be interested in this article, I wrote: http://juplo.de/combining-jetty-maven-plugin-and-wro4j-maven-plugin-for-dynamic-reloading-of-less-resources/



0


source







All Articles