I write a scala program that processes some wiki xml data. I want to get SBT to download not only the libraries needed to run my program but also large xml data from wikipedia. How can I do this in my main program code or in the sbt build files? Thanks in advance
Asked
Active
Viewed 33 times
1 Answers
0
For downloading it during the dependency resolution, I think you would need a custom SBT plugin. Doing it in the main program code is the recommended way.
To accomplish this on the main program, you could:
- Look where the XML resources are? e.g.URL, auth tokens
- Search how to save a file from URL in Scala. See this answer.
- Call a function that downloads the required files during application start-up, i.e. main(). You might also want to check if the file already exists to avoid re-downloading.

Community
- 1
- 1

Johnny Everson
- 8,343
- 7
- 39
- 75