You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Trevor Harmon <tr...@vocaro.com> on 2008/11/13 15:48:36 UTC
Validate POM
The Maven 1.x documentation describes a way to validate a POM file:
http://maven.apache.org/maven-1.x/plugins/pom/validation.html
This uses the XML schema to determine whether the POM is well-formed.
However, the "pom" plugin apparently no longer exists in Maven 2.x. In
that case, how does one validate a POM file?
Trevor
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
RE: Validate POM
Posted by "Hoover, William " <wh...@nemours.org>.
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
-----Original Message-----
From: Trevor Harmon [mailto:trevor@vocaro.com]
Sent: Thursday, November 13, 2008 9:49 AM
To: Maven Users List
Subject: Validate POM
The Maven 1.x documentation describes a way to validate a POM file:
http://maven.apache.org/maven-1.x/plugins/pom/validation.html
This uses the XML schema to determine whether the POM is well-formed.
However, the "pom" plugin apparently no longer exists in Maven 2.x. In
that case, how does one validate a POM file?
Trevor
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
RE: Validate POM
Posted by "Brian E. Fox" <br...@reply.infinity.nu>.
No, the parser is overly lenient.
-----Original Message-----
From: Trevor Harmon [mailto:trevor@vocaro.com]
Sent: Thursday, November 13, 2008 11:29 AM
To: Maven Users List
Subject: Re: Validate POM
On Nov 13, 2008, at 11:00 AM, Jason van Zyl wrote:
> mvn validate
As a follow-up question, I am finding many cases where a seemingly
invalid POM is not being flagged as invalid. For example:
...
<exclusions>
<mainClass>foo.bar</mainClass>
</exclusions>
...
This is clearly invalid because the exclusions section should only
have exclusion tags as children. But "mvn validate" doesn't complain
about it. In fact, you can put any known POM tag in the exclusions
section and it will still validate.
Is the XSD wrong?
Trevor
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Validate POM
Posted by Trevor Harmon <tr...@vocaro.com>.
On Nov 13, 2008, at 11:00 AM, Jason van Zyl wrote:
> mvn validate
As a follow-up question, I am finding many cases where a seemingly
invalid POM is not being flagged as invalid. For example:
...
<exclusions>
<mainClass>foo.bar</mainClass>
</exclusions>
...
This is clearly invalid because the exclusions section should only
have exclusion tags as children. But "mvn validate" doesn't complain
about it. In fact, you can put any known POM tag in the exclusions
section and it will still validate.
Is the XSD wrong?
Trevor
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Validate POM
Posted by Jason van Zyl <jv...@sonatype.com>.
mvn validate
On 13-Nov-08, at 9:48 AM, Trevor Harmon wrote:
> The Maven 1.x documentation describes a way to validate a POM file:
>
> http://maven.apache.org/maven-1.x/plugins/pom/validation.html
>
> This uses the XML schema to determine whether the POM is well-formed.
>
> However, the "pom" plugin apparently no longer exists in Maven 2.x.
> In that case, how does one validate a POM file?
>
> Trevor
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
Thanks,
Jason
----------------------------------------------------------
Jason van Zyl
Founder, Apache Maven
jason at sonatype dot com
----------------------------------------------------------
We all have problems. How we deal with them is a measure of our worth.
-- Unknown
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org