How to refer external class path to play framework application?

508 Views Asked by At

I have a small play framework application, which will create a spark session with enableHiveSupport() option, so i have to refer the hive-site.xml configuration file to the application

In eclipse i am able to refer the configuration file hive-site.xml by choosing Build Path -> Configure Build Path -> Add External Class Folder.

In Play framework:

i have no idea about how to achieve this case in play framework.

Note:

i have tried by adding the hive-site.xml file in conf/ folder , lib folder etc. Nothing works.

1

There are 1 best solutions below

0
Igor Berman On

Put it in some directory under your project(e.g. dir-with-hive) and then in sbt, you would write:

resourceDirectory in Compile := baseDirectory.value / "dir-with-hive"

it will add "dir-with-hive" and everything in it into jar and classpath in runtime