Artem Barger wrote:
> Hi,
>
> While working on creating multi module configuration for commons-rng
> component I've extracted all configurations for maven plugins such as:
> pmd, findbugs, checkstyle into separate module "commons-rng-build-tools".
> Such that parent project can now refer to it within build plugins section
> and will imply it for all modules reducing the need to repeat it for each
> module again (or copy same files into new modules).
>
> Now I think that it could be beneficial to have this "build-tools" common
> component across all Apache Commons, so it will provide same
> configurations for checkstyle, pmd and etc at once.
>
> For example configuration of pmd could look something like:
>
> <build>
> <plugins>
> <plugin>
> <artifactId>maven-pmd-plugin</artifactId>
> <version>${pmd.version}</version>
> <configuration>
> <targetJdk>${maven.compiler.target}</targetJdk>
> <skipEmptyReport>false</skipEmptyReport>
> <rulesets>
> <ruleset>pmd/pmd-ruleset.xml</ruleset>
> </rulesets>
> </configuration>
> <dependencies>
> <dependency>
> <groupId>org.apache.commons</groupId>
> <artifactId>commons-build-tools</artifactId>
> <version>1.0-SNAPSHOT</version>
> </dependency>
> </dependencies>
> </plugin>
> </plugins>
> </build>
>
> And reporting section:
>
> <reporting>
> <plugins>
> <plugin>
> <artifactId>maven-pmd-plugin</artifactId>
> <version>${pmd.version}</version>
> <configuration>
> <targetJdk>${maven.compiler.target}</targetJdk>
> <skipEmptyReport>false</skipEmptyReport>
> <rulesets>
> <ruleset>pmd/pmd-ruleset.xml</ruleset>
> </rulesets>
> </configuration>
> <reportSets>
> <reportSet>
> <reports>
> <report>pmd</report>
> <report>cpd</report>
> </reports>
> </reportSet>
> </reportSets>
> </plugin>
> </plugins>
> </reporting>
>
> At some sense this will be similar to "commons-parent", while keeping only
> configuration resources for report generating plugins and for static
> analysis tools.
>
> WDYT?
You may put both parts into an own profile that is activated automatically
at the extistence of pmd/pmd-ruleset.xml. Each component has then a chance
to use it or not simply by providing that file.
> PS. There is temporal example within "commons-rng" git repo inside
> "multimodule" branch.
Cheers,
Jörg
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]