在Maven站点生命周期中存在哪些范围 [英] Which scopes are present during maven site lifecycle

查看:146
本文介绍了在Maven站点生命周期中存在哪些范围的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在生成Maven站点的报告期间,哪些Maven范围可用?有空吗.

Which maven scopes are available during report generation for a maven site? Are any available.

我试图在多个模块之间共享一个FindBugs过滤器文件,而不会使其最终出现在任何应用程序jar中.我当时正在考虑建立一个commons项目,该项目将把它打包在一个单独的jar中,并带有"build-tools"的分类器以及我们可能拥有的任何其他此类文件.任何需要它的项目都将使用分类器导入该项目.

I'm trying to share a FindBugs filter file between several modules without having it end up in any of the application jars. I was thinking of putting in a commons project, which will package it in a separate jar with a classifier of "build-tools" with any other such files we might have. Any projects that need it will import the project with the classifier.

推荐答案

使用

With the checkstyle plugin, the trick is to declare your separate JAR as a dependency of the plugin (this works for PMD too).

不幸的是,这不适用于FindBugs插件,因为它似乎在文件系统而不是在类路径中查找过滤器.

Unfortunately, that won't work for the FindBugs plugin, as it seems to look for the filters in the filesystem rather than the classpath.

我要做的是绑定依赖性的执行:将解压缩到pre-site阶段,以便从存储库中获取单独的JAR并将其解压缩到target中,然后在FindBugs插件的配置中使用相对路径引用过滤器文件.

What I would do is bind an execution of dependency:unpack to the pre-site phase in order to get the separate JAR from the repository and unpack it in target, then reference the filters file with a relative path in the FindBugs plugin's configuration.

这篇关于在Maven站点生命周期中存在哪些范围的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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