I'm setting up my very first play app in a mixed build environment. My company uses maven for everything (so far) and I'm trying to get my play app to interact nicely with the rest of my artifacts.
Is there any way to get ivy/sbt/play to deal with SNAPSHOTs in a similar way to maven - namely, either update them from the remote repository always (for example, on a build worker) or use the local .m2 repository until the dependency 'expires' and then refresh it from the server.
I have declared a SNAPSHOT dependency in my Build.scala for an artifact, and I'd like local updates to this dependency to be visible to my play project. On the maven side, I do the following
mvn clean install
which (of course) builds and installs my external artifact to my local maven repository (at ~/.m2/repository). I'd like these changes to be immediately visible to my play project, but I can't figure out how to tell sbt/play to not cache SNAPSHOTs. No matter what I do, this dependency is never refreshed in play - I have to go into the actual play ivy cache and delete the dependency by hand for any changes to be picked up. Ideally, I'd like sbt/ivy to just resolve the path to my local maven repo and not cache it internally. I've got the following in my Build.scala
val main = PlayProject(appName, appVersion, appDependencies, mainLang = SCALA).settings(
resolvers += "Local Maven Repository" at "file://" + Path.userHome.absolutePath + "/.m2/repository",
testOptions in Test := Nil
)
When I run a build in play, it properly uses this repo, but then caches the results in the ivy cache. Is there an incantation I can tell Ivy/sbt to not do this? Perhaps something in ivysettings.xml?