Multi-module Maven project and jetty:run

后端 未结 6 537
无人共我
无人共我 2020-12-12 17:40

I\'m trying to split a Maven WAR project into two modules, so that I can build a separate JAR file with command line tools. The result has the following structure:

6条回答
  •  [愿得一人]
    2020-12-12 18:06

    The documentation for jetty:run notes that

    As of Jetty 9.4.7, when using jetty:run in a multi-module build, it is no longer necessary to build each of the modules that form dependencies of the webapp first. Thus, if your webapp depends on other modules in your project and they are present in the reactor at the same time, jetty will use their compiled classes rather than their jar files from your local maven repository.

    Thus, add the jetty-maven-plugin to the Maven root project and run mvn jetty:run

提交回复
热议问题