Java – ‘Maven jetty: run’ how does it work?
What I learned is:
>Jetty is a java servlet > Maven is a build automation tool mainly used for Java projects > the website of the wharf in GitHub is https://github.com/eclipse/jetty.project >MVN jetty: run runs a web project from POM config > MVN jetty: run is supported by Maven jetty plugin
So, what should I do next?
I want to know what happens when I execute the command MVN jetty: run?
What does it send to code hair when it is used?
Solution
The running target runs on a webapp that does not have to be built into the war Instead, jetty deploys webapp. Com from its source code It looks for webapp components in Maven's default project location, but you can override them in the plug-in configuration For example, by default it looks for:
>Resources in ${project. Basedir} / SRC / main / webapp > classes in ${project. Build. Outputdirectory} > ${project. Basedir} / SRC / main / webapp / WEB-INF / xml
The plug - in automatically ensures that classes are rebuilt and kept up - to - date before deployment If you change the source of a class and the IDE compiles it automatically in the background, the plug-in selects the changed class
You save time in the development cycle by eliminating the need to assemble web applications into the war Once invoked, you can configure the plug-in to run continuously, scan for changes in the project, and automatically perform hot redeployment if necessary Any changes you make will be immediately reflected in jetty's running instance, allowing you to quickly jump from coding to testing, rather than going through the following cycles: code, compilation, reorganization, redeployment, testing
https://www.eclipse.org/jetty/documentation/9.4.x/jetty-maven-plugin.html#jetty -run-goal