RE: Validate POM
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:[EMAIL PROTECTED] 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Validate POM
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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
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 mainClassfoo.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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Validate POM
No, the parser is overly lenient. -Original Message- From: Trevor Harmon [mailto:[EMAIL PROTECTED] 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 mainClassfoo.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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]