Including dependencies in a jar with Maven

后端 未结 13 2200
盖世英雄少女心
盖世英雄少女心 2020-11-22 00:39

Is there a way to force maven(2.0.9) to include all the dependencies in a single jar file?

I have a project the builds into a single jar file. I want the classes fro

13条回答
  •  情书的邮戳
    2020-11-22 01:12

            
            
            
                org.apache.maven.plugins
                maven-dependency-plugin
                
                    ${project.build.directory}/lib
                    false 
                    false
                
                
                    
                        copy-dependencies
                        package
                        
                            copy-dependencies
                        
                    
                
            
            
            
                org.apache.maven.plugins
                maven-jar-plugin
                2.4
                
                    
                        
                            true
                            lib/
                        
                    
                
            
    
    
            
            
            
                maven-assembly-plugin
                
                  
                    package
                    
                      single
                    
                  
                
                
                  
                    jar-with-dependencies
                  
                
                        
    

提交回复
热议问题