Maven - Include dependent libs in jar without unpacking dependencies?

后端 未结 3 453
Happy的楠姐
Happy的楠姐 2021-01-03 21:19

We\'re trying to build a client jar that includes unpacked dependent jar\'s. And the manifest should have class-path entries to the dependent jars. T

3条回答
  •  抹茶落季
    2021-01-03 22:22

    The solution proposed by Pascal Thivent defines a new assembly for the Maven assembly plugin. The Maven assembly plugin offers defaults assemblies which are 'bin', 'jar-with-dependencies', 'project' and 'src' producing various predefined bundles.

    A new assembly has to be defined in a new xml file, most of the time located in src/assemble. Then it will be loaded instead of the predefined one, this way:

    
          org.apache.maven.plugins
          maven-assembly-plugin
          2.2-beta-5
          
    
              
              
    
              
                 src/assemble/myAssembly.xml
              
          
    
    

提交回复
热议问题