Le lundi 08 septembre 2008, Shane Isbell a écrit :
> I'm working on refactoring the project builder code, and I've come across
> an xml parser error, resulting from a pom claiming it's UTF-8 encoded while
> it's not. This causes the woodstox parser to fail. How is this currently
> handled in Maven? Should we fail the build if a dependency incorrectly
> states its encoding?
>
> Thanks,
> Shane

If an XML file incorrectly states its encoding, then this file is simply 
invalid or corrupted. I think the better that can be done is reporting this 
fact.
In Maven, encoding for XML streams is done by XmlStreamReader: it detects 
encoding defined in the stream, then uses it to decode bytes to characters. 
Then if a bytes sequence is invalid for the encoding used, the decoding 
fails: this is not a XML parsing problem but a low-level encoding problem.

Then Maven build fails: we don't fail the build, but the build fails due to 
corrupted data.

HTH.

Regards,

Hervé

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to