如何为 sbt 中提供的传递依赖项提供版本?

How to provide version for provided transitive dependencies in sbt?

[error] (*:update) sbt.ResolveException: unresolved dependency: com.atlassian.sal#sal-api;${sal.version}: not found

[error] unresolved dependency: com.atlassian.event#atlassian-event;${event.version}: not found

有什么方法可以为提供的传递依赖项提供版本?

当您尝试添加 https://mvnrepository.com/artifact/com.atlassian.jira/jira-rest-java-client-core?repo=atlassian-public 依赖项并编译项目时,它可以在任何 playframework 应用程序中轻松重现。

https://github.com/sanjeevpande/play-jira-client 带有示例播放应用程序的回购协议。 "play compile" 将导致错误。

我设法通过在 build.sbt

中添加 notTransitive() 属性来修复它

"com.atlassian.jira" % "jira-rest-java-client-core" % "5.1.0" notTransitive(),

并通过手动添加传递依赖项。