Hi,

You could try an XML validation using Maven XSD 
(http://maven.apache.org/maven-v4_0_0.xsd). If the validation is ok => this is 
a valid POM. If the validation is ko... it can be anything else.

Regards,

Julien



----- Message d'origine ----
> De : amaresh mourya <[email protected]>
> À : Maven Users List <[email protected]>
> Envoyé le : Lun 8 Mars 2010, 11 h 40 min 05 s
> Objet : How to differentiate between pom.xml and ant's build file
> 
> Hi All,
> I want to write a recognizer class which takes input any xml file and
> returns true or false based on , whether or not the xml is POM.
> 
> Problem : Since Ant's build file and POM both have root element
> with/without Namespace.
> 
> I don't want POM Name to be restricted to just "pom.xml", this could be
> anything say "myproj.xml" etc. Still I want this "myProj.xml" to be
> recognized as POM with above Recognizer class.
> 
> Can same one suggest me the conditions to differentiate between them.



  

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to