Maven项目打包为可执行Jar包

maven pom.xml配置文件如下:


        jar-test
        
            
                org.apache.maven.plugins
                maven-shade-plugin
                2.1
                
                    
                        package
                        
                            shade
                        
                        
                            true
                            
								
                                
                                    org.eclipse.jetty:jetty-http
                                    org.eclipse.jetty:jetty-client
                                    org.eclipse.jetty:jetty-util
                                    org.eclipse.jetty:jetty-io
                                
                            
                        
                    
                
            
            
                org.apache.maven.plugins
                maven-jar-plugin
                
                    
                        
							
                            com.test.Main
                        
                    
                
            
            
                org.apache.maven.plugins
                maven-compiler-plugin
                3.0
                
                    1.7
                    1.7
                    UTF-8
                
            
        
    

你可能感兴趣的:(Java相关)