Question

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

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.

Was it helpful?

Solution

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

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

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.

OTHER TIPS

I think the question could be better phrased as "How can i share my findbug configuration across projects?"

Stictly speaking, scopes apply only to dependency resolution. A plugin requests dependency resolution within a given scope. A phase or lifecycle by itself has no concept of scope so there technically isn't an answer to the question as phrased. ;-)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top