Description of problem:
When the Maven plugin looks for XLIFF files, by default it picks up all .xml files, because there is no particular standard for naming XLIFF files. (The project is expected to specify -Dzanata.includes to narrow down the file list.) But we could simplify things by checking each XML file for an <xliff> element, and then skip over unsuitable files.
Version-Release number of selected component (if applicable):
100% if the uploaded project contains XML files which aren't XLIFF. eg spacewalk project.
Steps to Reproduce:
1. Run mvn zanata:push in a directory tree which contains XLIFF and other XML files. Don't use the -Dzanata.includes option.
Client attempts to upload random .xml files, fails because they aren't XLIFF.
XLIFF files uploaded, other XML files ignored (or warnings generated).
Workaround is to specify '-Dzanata.includes=**/StringResource_en_US.xml' or similar.
Actually according to OASIS Standard, D.4. XLIFF File Extension
XLIFF documents use the .xlf extension. No other extension is recommended by the specification.
That's true. And the translate toolkit works with XLIFF files (eg for 'pomerge'), but only if they have the extension .xlf.
I think we should change the default file extension to .xlf (for push *and* pull). Then we won't have to check for XLIFF contents.
And someone wants to use .xml, they can, but it will be their responsibility to get the 'includes' right.
This should be fixed with the new file mapping rule mechanism.