如何从Play应用程序中排除/ excludeAll com.google.code.findbugs?

时间:2015-11-18 20:38:37

标签: maven playframework sbt dependency-management typesafe-activator

我有一个play2.4.3应用程序。 我在分发应用程序时使用com.google.code.findbugs命令尝试排除activator dist库。

我没有直接包含它,以下是我认为它包含在项目中的方式:

  

http://mvnrepository.com/artifact/com.typesafe.play/play-java_2.10/2.4.3   依赖于取决于:   http://mvnrepository.com/artifact/org.reflections/reflections/0.9.9   依赖于取决于:   http://mvnrepository.com/artifact/com.google.code.findbugs/annotations/2.0.1

我想使用此处提到的sbt排除:http://www.scala-sbt.org/0.12.4/docs/Detailed-Topics/Library-Management.html

我遇到的问题是,当我查看用于findbugs的pom时,没有组织名称,因此我不确定要传递给方法的内容。

此外,我尝试过排除和排除所有命令的多种变体,但它似乎无法正常工作。

1 个答案:

答案 0 :(得分:2)

尝试以下(非常有力的方法):

libraryDependencies := libraryDependencies.value.map(_.excludeAll(ExclusionRule("com.google.code.findbugs", "annotations")))