Executable war file that starts jetty without maven

后端 未结 9 549
野趣味
野趣味 2020-12-04 05:03

I\'m trying to make an \"executable\" war file (java -jar myWarFile.war) that will start up a Jetty webserver that hosts the webapp contained in the WAR file I

9条回答
  •  生来不讨喜
    2020-12-04 05:47

    We have figured this out by using jetty-console-maven-plugin.

    Whenever you run mvn package it creates another war that can be used with java -jar whateverpackage-runnable.war

            
                org.simplericity.jettyconsole
                jetty-console-maven-plugin
                1.45
                
                    
                        
                            createconsole
                        
                    
                
    
                
                    
                        
                            jetty-console-requestlog-plugin
                        
                        
                            jetty-console-gzip-plugin
                        
                        
                            jetty-console-ajp-plugin
                        
                        
                            jetty-console-startstop-plugin
                        
                    
                
            
    

    It also generates the init.d scripts and everything for you!

提交回复
热议问题