There actually is a slightly better way (which is to generate a policy jar, which contains the config files for PMD, checkstyle etc) and reference that from the POMs.
See https://github.com/kitei/kitei-policy for an example. (kitei-root is the base pom and kitei-rules builds the rules jar). -h On Mon, Oct 20, 2014 at 8:47 AM, Jason van Zyl <ja...@takari.io> wrote: > The best mechanism I have seen to date for sharing configuration amongst > many projects is the Airbase POM in the Airlift project that was developed > by Henning (I've cc'd him). > > Airbase uses PMD but you can probably use a similar technique for > Checkstyle. I always point people at the Airbase POM as it's what I > consider the best way to configure a Maven build. > > On Oct 20, 2014, at 10:56 AM, James Green <james.mk.gr...@gmail.com> > wrote: > > Is there a good practice to achieve this? > > I have a company-parent POM which has config to deal with site generation > and distributionMangement. Everything has this as it's parent. > > I also have a build-tools JAR that supplies checkstyle.xml. The problem is > company-parent depends-on build-tools within the site configuration, yet > build-tools requires company-parent to inherit distributionManagement... > Yuck. > > I now note there is an in-line configuration for checkstyle possible. Is > this the way forward for our case? > > Thanks, > > James > > > Thanks, > > Jason > > ---------------------------------------------------------- > Jason van Zyl > Founder, Apache Maven > http://twitter.com/jvanzyl > http://twitter.com/takari_io > --------------------------------------------------------- > > > What matters is not ideas, but the people who have them. Good people can fix > bad ideas, but good ideas can't save bad people. > > -- Paul Graham > > > > > > > > > >