Only create executable jar-with-dependencies in Maven

前端 未结 6 1229
悲&欢浪女
悲&欢浪女 2020-12-05 13:21

In my pom.xml I use the maven-assembly-plugin to create an executable jar-with-dependencies when running \"mvn clean install\". Now it first creates the non-exe

6条回答
  •  误落风尘
    2020-12-05 13:55

    You can use this build below and compile with this command :

    mvn clean compile assembly:single

    
        
            
                maven-assembly-plugin
                3.1.0
                    
                        
                            jar-with-dependencies
                        
                        
                            
                                youMainClass
                            
                        
    
                        ${artifactId}
                        false
                    
                    
                        
                            package
                            
                                single
                            
                        
                    
            
        
    
    

提交回复
热议问题