Making maven copy additional files inside the build jar (not resources but any file inside any package)?

后端 未结 3 1702
深忆病人
深忆病人 2020-12-18 04:21

I have a package org.myapp.mypackage with some ruby files (*.rb) and I need to include them in the generated build jar in the same package

3条回答
  •  隐瞒了意图╮
    2020-12-18 04:50

    You can modify the resources section of the bit of the POM:

    
      
        src/main/resources
      
      
        false
        src/main/java
        
          *.rb
        
        
          **/*.java
        
      
    
    

    Or, the other answer (create the same package structure in src/main/resources) will also work.

提交回复
热议问题