如何从Play应用程序中排除/排除所有com.google.code.findbug? [英] How to exclude/excludeAll com.google.code.findbugs from a Play application?

查看:212
本文介绍了如何从Play应用程序中排除/排除所有com.google.code.findbug?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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 取决于: http://mvnrepository.com/artifact/org.reflections/reflections/0.9.9 取决于: http://mvnrepository.com/artifact/com.google.code .findbugs/annotations/2.0.1

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

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

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

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

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.

我还尝试了exclusion和excludeAll命令的多种变体,但它似乎不起作用.

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

推荐答案

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

Try the following (very forceful approach):

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

这篇关于如何从Play应用程序中排除/排除所有com.google.code.findbug?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆