How to make a monolithic jar.file?

后端 未结 5 1685
眼角桃花
眼角桃花 2021-01-17 06:29

I need to create a hadoop job jar file that uses mahout and a bunch of other libraries. I need ti be able to run the job without needing additional jar.files such that all r

5条回答
  •  萌比男神i
    2021-01-17 07:01

    Note that the additional jars have to be put under a lib/ subdirectory (Yes, jars within a jar). I use the following maven assembly, which I found somewhere else.

    
      job
      
        jar
      
      false
      
        
          false
          runtime
          lib
          
            org.apache.hadoop:hadoop-core
            ${artifact.groupId}:${artifact.artifactId}
          
        
        
          false
          system
          lib
          
            ${artifact.groupId}:${artifact.artifactId}
          
        
      
      
        
          ${basedir}/target/classes
          / 
          
            *.jar
          
        
      
    
    

提交回复
热议问题