Xpp3DomBuilder.createXmlReader() (lines 119-129) clears and restores the global org.xml.sax.driver system property without synchronization. In a multi-threaded environment (like Maven parallel builds), one thread's clear/restore sequence can interfere with another thread's read or write of the same property. The code even acknowledges this with the comment: "There's a 'slight' problem with this an parallel maven: It does not work ;)"
The method already tries to directly instantiate com.sun.org.apache.xerces.internal.parsers.SAXParser first (line 114), which succeeds on all Oracle/OpenJDK JVMs. The system property manipulation fallback is both unnecessary and harmful.
Fix: remove the system property manipulation. If the direct instantiation fails, just call XMLReaderFactory.createXMLReader() without modifying any system properties.
Xpp3DomBuilder.createXmlReader()(lines 119-129) clears and restores the globalorg.xml.sax.driversystem property without synchronization. In a multi-threaded environment (like Maven parallel builds), one thread's clear/restore sequence can interfere with another thread's read or write of the same property. The code even acknowledges this with the comment: "There's a 'slight' problem with this an parallel maven: It does not work ;)"The method already tries to directly instantiate
com.sun.org.apache.xerces.internal.parsers.SAXParserfirst (line 114), which succeeds on all Oracle/OpenJDK JVMs. The system property manipulation fallback is both unnecessary and harmful.Fix: remove the system property manipulation. If the direct instantiation fails, just call
XMLReaderFactory.createXMLReader()without modifying any system properties.