Reputation: 7985
it's better that once mvn archetype:generate is runed, it can do all the things needed to create a project which support mvn jetty:run, but the fact is there are so many templates that i don't even know which one i should choose in order to create a project which support mvn jetty:run, even when -Dfilter option is used, i cannot find the right template to do the thing i want. so how to how to create a project which support mvn jetty:run quickly? it's better that i can do all the things simply with one command, that is command 1: create projects command 2: mvn jetty:run to run this web application:)
Upvotes: 0
Views: 89
Reputation: 23812
From the Maven Jetty plugin doc:
In order to run Jetty on a webapp project which is structured according to the usual Maven defaults (resources in
${basedir}/src/main/webapp
, classes in${project.build.outputDirectory}
and theweb.xml
descriptor at${basedir}/src/main/webapp/WEB-INF/web.xml
, you don't need to configure anything.Simply type:
mvn jetty:run
This will start Jetty running on port 8080 and serving your project.
So you need to use the jee6-basic-archetype
(number 414) which will generate the required folder structure.
More information about configuring the plugin is available in the doc.
Upvotes: 2