Multi-module Maven project and jetty:run

后端 未结 6 538
无人共我
无人共我 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:08

    Add jetty plugin to the root pom and configure a contextHandler pointing to the desired war. This works for me in a project with multiple jar modules and two overlay wars.

    
    org.eclipse.jetty
    jetty-maven-plugin
    9.3.0.M2
    
            10
            
                
                    ${project.basedir}/project-war/target/project-war-${project.version}.war
                    /
                
            
        
    
    

    http://eclipse.org/jetty/documentation/current/jetty-maven-plugin.html#running-more-than-one-webapp

提交回复
热议问题