Red Hat Bugzilla – Bug 535151
Should clean (or generate uniformly) .xml files with regards to CRLF
Last modified: 2011-05-23 21:17:28 EDT
I'm putting this under "Build System" because this is probably something that can be done as a release engineering task.
The vast majority of our xml files are generated with a standard 'CR'. However, a small subset of these have the full, dos/window style CRLF in them. This is a slight annoyance when having to edit one of these xml files on a unix system. I am not sure if the inverse is noticeable in Windows.
One example is $SERVERROOT/jbossas/server/default/deploy/rhq.ear/rhq-portal.war/WEB-INF/web.xml.
In either case, our xml should probably be clean/uniform in one style or the other. This can probably be done on the build system, by piping every xml file through `dos2unix` (or unix2dos, should such be the desire...)
I'm attaching a text file containing the results, against a recent build, of the following cmd sequence:
for i in `find -name *\.xml`; do echo "$i:"; grep -c "^M" $i; done
(The ^M is generated in *nix by typing "Ctrl-V Ctrl-M")
The output is a list of all xml files as they exist on my build, with a number 'n', where 'n' equals the total number of CRLFs in that xml document.
(from within $ROOT on the build tree):
for i in `find -name *\.xml`; do dos2unix $i; done;
This bug was previously known as http://jira.rhq-project.org/browse/RHQ-1877
Imported an attachment (id=368681)
mass add of key word FutureFeature to help track
we are all now working with LF EOL characters in the code base. I just ran that script from the root of my git repo and found no ^M chars in any .xml.
From the distro, there is only one file that has this now, that's:
which is a separately packaged WAR (its the JBoss/Remoting WAR that we had patched to fix a particular bug in JBoss/Remoting). Customers/users will never want to look in the war, let alone mess with that .xml file, so this is OK.
All other xml files have LF EOLs.
spot checked .xml files in the 04/29/2011 release. verified.
Bookkeeping - closing bug - fixed in recent release.