maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Osipov <>
Subject Re: rewrite StatelessXmlReporter fo JAXB
Date Sun, 16 Apr 2017 12:42:48 GMT
Am 2017-04-16 um 14:21 schrieb Tibor Digana:
> Hi,
> I want to first talk with you about XML marshaller StatelessXmlReporter [1]
> in Surefire which is built on the top of SharedUtils' PrettyPrintXMLWriter.
> I found out issues after a contributor opened this issue [2].
> The problem is that we are using two streams, OutputStream and Writer, to
> create XML in file system for one reason. We write CDATA directly to the
> stream apart of xml facility. We have bug with escaping illegal characters.
> Instead, my proposal is to create XSD and Jaxb stubs and marshal it to XML
> file and we do need to care about low level XML and escaping characters.
> The code will be easier to understand. The elements system-out and
> system-err can be large but we have the stream already in temp files
> Utf8RecodingDeferredFileOutputStream which means that the Jaxb mashaller
> will not keep String in memory too long - only while Marshaller needs the
> string.
> What is your opinion?

Looking at the current code -- a lot of boilerplate. I am quite 
experienced with JAXB, XJC and the Maven JAXB2 Plugin [1].

Consider that JAXB always holds the model in memory. If you intend to 
maintain streams within an XML you can resort fragments and other stuff 
MOXy supports. But let me tell you that it won't be that easy as you 
think if you want everything as streaming with little memory usage.


BTW: this should go to dev@


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message