Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where should the META-INF/services be in sbt

Tags:

scala

sbt

Where should the META-INF directory be in order for sbt to pick up custom configurations. I had this issue when trying to use the ServiceLoader and I was trying to create a custom services in META-INF/services

like image 592
gdoubleod Avatar asked Oct 02 '15 21:10

gdoubleod


2 Answers

The META-INF folder will get automatically picked up by sbt if you put the folder in src/main/resources/

like image 190
gdoubleod Avatar answered Oct 20 '22 04:10

gdoubleod


For Play application code the META-INF should be put inside the conf directory inside service/conf

I have verified this on my own application where I used it for putting META-INF/services/ file with the name of api.ImplementationClass in it and it worked with ServiceLoader.load

like image 32
user8425083 Avatar answered Oct 20 '22 02:10

user8425083