The configuration of the jetty plugin in Maven can be used for the deployment of the project in the built-in jetty server.
<plugin> <groupId>Org.mortbay.jetty</groupId> <Artifactid>Maven-jetty-plugin</Artifactid> <Configuration> <ContextPath>/demo1</ContextPath> <Connectors> <connectorImplementation= "Org.mortbay.jetty.nio.SelectChannelConnector"> <Port>8088</Port> </connector> </Connectors> <Scanintervalseconds>10</Scanintervalseconds> </Configuration> </plugin>
After this configuration my project started successfully on port 8088
[INFO] Starting Jetty 6.1.26 ... [INFO] Jetty-6.1.26[info] No Transaction Manager found-if Your webapp requires one, please configure one. [INFO] Started [Email protected]:8088[info] Started Jetty Server[info] Starting scanner at interval of seconds. [INFO] restarting [email protected]{/demo1,e:\eclipse4.2\workspace\demo1\src\main\webapp}[info] WebApp Source directory = E:\eclipse4.2\workspace\demo1\src\main\webapp[info] Reload mechanic:automatic[info] Classes = e:\ Eclipse4.2\workspace\demo1\target\classes[info] Context path =/demo1[info] Tmp directory = determined at Runtime[info] W EB defaults = Org/mortbay/jetty/webapp/webdefault.xml[info] Web overrides = none[info] XML file = E:\eclipse4.2\works Pace\demo1\src\main\webapp\web-inf\web.xml[info] WebApp directory = e:\eclipse4.2\workspace\demo1\src\main\webapp[ INFO] Reconfiguring scanner after change to pom.xml ... [INFO] No Transaction Manager Found-if Your webapp requires one, please configure one. [INFO] Restart Completed at Sun APR 13:32:10 CST 2016
Maven Jetty Plug-in configuration