Building a fat jar using maven

后端 未结 6 1954
梦毁少年i
梦毁少年i 2020-11-21 23:51

I have a code base which I want to distribute as jar. It also have dependency on external jars, which I want to bundle in the final jar.

I heard that this can be do

6条回答
  •  长发绾君心
    2020-11-22 00:25

    actually, adding the

    
       
        true
        com.some.pkg                     
        com.MainClass
      
    
    

    declaration to maven-jar-plugin does not add the main class entry to the manifest file for me. I had to add it to the maven-assembly-plugin in order to get that in the manifest

提交回复
热议问题