问题
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