I have a project consisting of several Maven modules that are children of the parent module. I have a parent set to use checkstyle, and child modules inherit this behavior correctly. I would like all child modules to use the parental suppression file defined in its plugin. I define the checkstyle.suppression property that is used in the checkstyle plugin
<properties> <checkstyle.suppressions>${basedir}\src\checkstyle\suppressions.xml</checkstyle.suppressions> </properties> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-checkstyle-plugin</artifactId> <version>2.2</version> <configuration> <configLocation>config/sun_checks.xml</configLocation> <suppressionsLocation>${checkstyle.suppressions}</suppressionsLocation> <suppressionsFileExpression>${checkstyle.suppressions}</suppressionsFileExpression> </configuration> </plugin> </plugins>
Which is great for the parent, but all child modules try to find the file in basedir , which makes sense.
I'm sure there should be a simple solution that I am missing, but is there a way to determine this location so that all child modules use the parent location without hard coding?
source share