play-swagger
play-swagger copied to clipboard
Support for "sbt assembly"
Hi. I've been trying to use your plugin in a project that is packaged using sbt-assembly. It didn't seem to work. I've been able to have a working JAR adding these lines to my build.sbt:
fullClasspath in assembly += Attributed.blank(PlayKeys.playPackageAssets.value),
assembledMappings in assembly += {
sbtassembly.MappingSet(None, Vector(
swagger.value → s"public/${swaggerFileName.value}"
))
},
(assemblyOutputPath in assembly) := (assemblyOutputPath in assembly).dependsOn(swagger).value
For my understanding you would need to add a dependency to sbt-assembly in order to also add these settings. If that's not ideal then I'd propose to add this or a similar solution to the README for those that want to use sbt-assembly.
Hi Francesco, as a workaround you can use the alternative setup described here: https://github.com/iheartradio/play-swagger/blob/master/docs/AlternativeSetup.md It works well together with sbt-assembly. The swagger file would be generated on the fly tough.