2015年12月3日 星期四

How to use maven launch embedded tomcat or jetty with plugin

Tomcat maven plugin

setup pom.xml

    org.apache.tomcat.maven
    tomcat7-maven-plugin
    2.2

$> mvn tomcat7:start

jetty maven plugin

  • http://www.eclipse.org/jetty/documentation/current/jetty-maven-plugin.html
  • resources in ${project.basedir}/src/main/webapp
  • classes in ${project.build.outputDirectory}
  • web.xml in ${project.basedir}/src/main/webapp/WEB-INF/

    
    org.eclipse.jetty
    jetty-maven-plugin
    9.3.1-SNAPSHOT
    
        10
        
            /test
        
    

$>mvn jetty:run

沒有留言:

張貼留言