maven jetty基本命令

来源:互联网 发布:阿里云 nodejs 编辑:程序博客网 时间:2024/05/24 15:43
This plugin has 8 goals:


jetty:deploy-war
  This goal is used to run Jetty with a pre-assembled war.


  It accepts exactly the same options as the run-war goal. However, it doesn't
  assume that the current artifact is a webapp and doesn't try to assemble it
  into a war before its execution. So using it makes sense only when used in
  conjunction with the webApp configuration parameter pointing to a pre-built
  WAR.


  This goal is useful e.g. for launching a web app in Jetty as a target for
  unit-tested HTTP client components.


jetty:help
  Display help information on jetty-maven-plugin.
  Call mvn jetty:help -Ddetail=true -Dgoal=<goal-name> to display parameter
  details.


jetty:run
  This goal is used in-situ on a Maven project without first requiring that the
  project is assembled into a war, saving time during the development cycle. The


  plugin forks a parallel lifecycle to ensure that the 'compile' phase has been
  completed before invoking Jetty. This means that you do not need to explicity
  execute a 'mvn compile' first. It also means that a 'mvn clean jetty:run' will


  ensure that a full fresh compile is done before invoking Jetty.


  Once invoked, the plugin can be configured to run continuously, scanning for
  changes in the project and automatically performing a hot redeploy when
  necessary. This allows the developer to concentrate on coding changes to the
  project using their IDE of choice and have those changes immediately and
  transparently reflected in the running web container, eliminating development
  time that is wasted on rebuilding, reassembling and redeploying.


  You may also specify the location of a jetty.xml file whose contents will be
  applied before any plugin configuration. This can be used, for example, to
  deploy a static webapp that is not part of your maven build.


  There is a reference guide to the configuration parameters for this plugin,
  and more detailed information with examples in the Configuration Guide.


jetty:run-exploded
  This goal is used to assemble your webapp into an exploded war and
  automatically deploy it to Jetty.


  Once invoked, the plugin can be configured to run continuously, scanning for
  changes in the pom.xml and to WEB-INF/web.xml, WEB-INF/classes or WEB-INF/lib
  and hot redeploy when a change is detected.


  You may also specify the location of a jetty.xml file whose contents will be
  applied before any plugin configuration. This can be used, for example, to
  deploy a static webapp that is not part of your maven build.


  There is a reference guide to the configuration parameters for this plugin,
  and more detailed information with examples in the Configuration Guide.


jetty:run-forked
  This goal is used to assemble your webapp into a war and automatically deploy
  it to Jetty in a forked JVM.


  You need to define a jetty.xml file to configure connectors etc and a context
  xml file that sets up anything special about your webapp. This plugin will
  fill in the:


  - context path
  - classes
  - web.xml
  - root of the webapp
  Based on a combination of information that you supply and the location of
  files in your unassembled webapp.




  There is a reference guide to the configuration parameters for this plugin,
  and more detailed information with examples in the Configuration Guide.


jetty:run-war
  This goal is used to assemble your webapp into a war and automatically deploy
  it to Jetty.


  Once invoked, the plugin can be configured to run continuously, scanning for
  changes in the project and to the war file and automatically performing a hot
  redeploy when necessary.


  You may also specify the location of a jetty.xml file whose contents will be
  applied before any plugin configuration. This can be used, for example, to
  deploy a static webapp that is not part of your maven build.


  There is a reference guide to the configuration parameters for this plugin,
  and more detailed information with examples in the Configuration Guide.


jetty:start
  This goal is similar to the jetty:run goal, EXCEPT that it is designed to be
  bound to an execution inside your pom, rather than being run from the command
  line.


  When using it, be careful to ensure that you bind it to a phase in which all
  necessary generated files and classes for the webapp will have been created.
  If you run it from the command line, then also ensure that all necessary
  generated files and classes for the webapp already exist.


jetty:stop
  JettyStopMojo - stops a running instance of jetty. The ff are required:
  -DstopKey=someKey -DstopPort=somePort

0 0
原创粉丝点击