I am currently using sbt-assembly to make my Scala project into a jar.
In this program I have multiple config files:
\root
aws.properties
\src
\resource
application.conf
There is no problem when program running with sbt or an IDE.
However when I make it as a jar, the application can't find the config files, so that something can't start up.
Is there a way to tell sbt-assembly
where the file is?
Update
Here is how I tried to get access to config files:
val configPath: String = ConfigFactory.load.getConfig("aws").getString("configFile")
val regionName = ConfigFactory.load.getConfig("aws").getString("region")
val credentialFile: File = new File(credentialFilePath)
val credentials: AWSCredentials = new PropertiesCredentials(credentialFile)