You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Andrew Pennebaker <ap...@42six.com> on 2013/10/16 20:28:41 UTC

How can I scan arbitrary pom.xml files for conformance to a parent pom's configuration?

My high level goal is to tell a continuous integration server to report
projects that don't conform to the configuration specified by a parent pom.
I'd like a report for projects that override the parent configuration, or
neglecting to reference the parent pom correctly.

Is there some kind of Maven pom.xml linter that can do this? grep'ing for
"parent" is a start, but it wouldn't check that the snippet was written
correctly.

-- 
Cheers,

Andrew Pennebaker
apennebaker@42six.com

Re: How can I scan arbitrary pom.xml files for conformance to a parent pom's configuration?

Posted by Andrew Pennebaker <ap...@42six.com>.
Thanks, Cemo! That looks like exactly what I'm after!


On Wed, Oct 16, 2013 at 3:58 PM, Cemo <ce...@gmail.com> wrote:

> On 16 October 2013 21:28, Andrew Pennebaker <ap...@42six.com> wrote:
>
> > My high level goal is to tell a continuous integration server to report
> > projects that don't conform to the configuration specified by a parent
> pom.
> > I'd like a report for projects that override the parent configuration, or
> > neglecting to reference the parent pom correctly.
> >
> > Is there some kind of Maven pom.xml linter that can do this? grep'ing for
> > "parent" is a start, but it wouldn't check that the snippet was written
> > correctly.
> >
>
> How about writing a custom enforcer for enforce plugin [1] ?
>
> [1]: http://maven.apache.org/enforcer/maven-enforcer-plugin/
>



-- 
Cheers,

Andrew Pennebaker
apennebaker@42six.com

Re: How can I scan arbitrary pom.xml files for conformance to a parent pom's configuration?

Posted by Cemo <ce...@gmail.com>.
On 16 October 2013 21:28, Andrew Pennebaker <ap...@42six.com> wrote:

> My high level goal is to tell a continuous integration server to report
> projects that don't conform to the configuration specified by a parent pom.
> I'd like a report for projects that override the parent configuration, or
> neglecting to reference the parent pom correctly.
>
> Is there some kind of Maven pom.xml linter that can do this? grep'ing for
> "parent" is a start, but it wouldn't check that the snippet was written
> correctly.
>

How about writing a custom enforcer for enforce plugin [1] ?

[1]: http://maven.apache.org/enforcer/maven-enforcer-plugin/