How to exclude/excludeAll com.google.code.findbugs from a Play application?

荒凉一梦 提交于 2020-02-06 06:11:02

问题


I have a play2.4.3 application. I'm trying to exclude com.google.code.findbugs library when I distribute my application (using activator dist command).

I don't directly include it, here is how I think it's included in the project:

http://mvnrepository.com/artifact/com.typesafe.play/play-java_2.10/2.4.3 depends on: http://mvnrepository.com/artifact/org.reflections/reflections/0.9.9 depends on: http://mvnrepository.com/artifact/com.google.code.findbugs/annotations/2.0.1

I want to use sbt's exclusions mentioned here: http://www.scala-sbt.org/0.12.4/docs/Detailed-Topics/Library-Management.html

The problem that I have is that when I look at the pom for the findbugs there is no organization name, so I'm not sure what to pass to the methods.

Also I've tried multiple variations of exclusion and excludeAll command and it doesn't seem to work.


回答1:


Try the following (very forceful approach):

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


来源:https://stackoverflow.com/questions/33789905/how-to-exclude-excludeall-com-google-code-findbugs-from-a-play-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!