How to include a config file in the “META-INF/services” folder of a JAR using Maven

前端 未结 3 1339
-上瘾入骨i
-上瘾入骨i 2020-12-12 23:36

I\'m working on a Java project in Eclipse, which is built using Maven. I\'m using some recycled code from an older project, and one of these classes looks for a file in the

3条回答
  •  孤街浪徒
    2020-12-13 00:00

    Alternatively, if your project does not use a standard directory structure (or your simply wish to have alternate resource directories), you can specify resource directories manually the POM file.

    For example, if your META-INF/services is located in a folder called resources which lies in the root of your project directory, could specify it as follows:

    
    ...
      
        ...
        
          
            resources
          
        
        ...
      
      ...
    
    

    You can use this to specify several directories by adding multiple elements.

提交回复
热议问题